From a5a75ad6406c21b1876ca57591c803d09245a677 Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Tue, 18 Jul 2023 15:58:35 -0700 Subject: [PATCH] Prep latest armnetwork beta for release --- .../network/armnetwork/CHANGELOG.md | 6 + .../network/armnetwork/autorest.md | 4 +- .../network/armnetwork/build.go | 2 +- .../network/armnetwork/client_factory.go | 462 +- .../network/armnetwork/constants.go | 2 +- .../fake/adminrulecollections_server.go | 42 +- .../armnetwork/fake/adminrules_server.go | 42 +- ...atewayprivateendpointconnections_server.go | 58 +- ...ationgatewayprivatelinkresources_server.go | 26 +- .../fake/applicationgateways_server.go | 158 +- ...cationgatewaywafdynamicmanifests_server.go | 26 +- ...atewaywafdynamicmanifestsdefault_server.go | 4 +- .../fake/applicationsecuritygroups_server.go | 76 +- .../fake/availabledelegations_server.go | 26 +- .../fake/availableendpointservices_server.go | 26 +- .../availableprivateendpointtypes_server.go | 44 +- ...vailableresourcegroupdelegations_server.go | 26 +- .../fake/availableservicealiases_server.go | 44 +- .../fake/azurefirewallfqdntags_server.go | 26 +- .../armnetwork/fake/azurefirewalls_server.go | 124 +- .../armnetwork/fake/bastionhosts_server.go | 92 +- .../fake/bgpservicecommunities_server.go | 26 +- .../fake/configurationpolicygroups_server.go | 58 +- .../fake/connectionmonitors_server.go | 104 +- .../fake/connectivityconfigurations_server.go | 42 +- .../fake/customipprefixes_server.go | 76 +- .../fake/ddoscustompolicies_server.go | 40 +- .../fake/ddosprotectionplans_server.go | 76 +- .../fake/defaultsecurityrules_server.go | 26 +- .../fake/dscpconfiguration_server.go | 76 +- ...xpressroutecircuitauthorizations_server.go | 58 +- .../expressroutecircuitconnections_server.go | 58 +- .../expressroutecircuitpeerings_server.go | 58 +- .../fake/expressroutecircuits_server.go | 124 +- .../fake/expressrouteconnections_server.go | 40 +- ...ressroutecrossconnectionpeerings_server.go | 58 +- .../expressroutecrossconnections_server.go | 108 +- .../fake/expressroutegateways_server.go | 56 +- .../fake/expressroutelinks_server.go | 26 +- .../expressrouteportauthorizations_server.go | 58 +- .../fake/expressrouteports_server.go | 76 +- .../fake/expressrouteportslocations_server.go | 26 +- ...xpressrouteproviderportslocation_server.go | 4 +- .../expressrouteserviceproviders_server.go | 26 +- .../fake/firewallpolicies_server.go | 76 +- .../firewallpolicyidpssignatures_server.go | 4 +- ...policyidpssignaturesfiltervalues_server.go | 4 +- ...allpolicyidpssignaturesoverrides_server.go | 4 +- ...rewallpolicyrulecollectiongroups_server.go | 58 +- .../armnetwork/fake/flowlogs_server.go | 58 +- .../network/armnetwork/fake/groups_server.go | 42 +- .../armnetwork/fake/hubroutetables_server.go | 58 +- .../hubvirtualnetworkconnections_server.go | 58 +- .../armnetwork/fake/inboundnatrules_server.go | 58 +- .../fake/inboundsecurityrule_server.go | 24 +- .../fake/interfaceipconfigurations_server.go | 26 +- .../fake/interfaceloadbalancers_server.go | 26 +- .../armnetwork/fake/interfaces_server.go | 198 +- .../fake/interfacetapconfigurations_server.go | 58 +- .../network/armnetwork/fake/internal.go | 45 + .../armnetwork/fake/ipallocations_server.go | 76 +- .../armnetwork/fake/ipgroups_server.go | 76 +- .../loadbalancerbackendaddresspools_server.go | 58 +- ...balancerfrontendipconfigurations_server.go | 26 +- .../loadbalancerloadbalancingrules_server.go | 26 +- .../loadbalancernetworkinterfaces_server.go | 26 +- .../fake/loadbalanceroutboundrules_server.go | 26 +- .../fake/loadbalancerprobes_server.go | 26 +- .../armnetwork/fake/loadbalancers_server.go | 108 +- .../fake/localnetworkgateways_server.go | 58 +- .../armnetwork/fake/management_server.go | 108 +- ...ntgroupnetworkmanagerconnections_server.go | 26 +- .../armnetwork/fake/managercommits_server.go | 24 +- .../fake/managerdeploymentstatus_server.go | 4 +- .../armnetwork/fake/managers_server.go | 60 +- .../armnetwork/fake/natgateways_server.go | 76 +- .../armnetwork/fake/natrules_server.go | 58 +- .../armnetwork/fake/operations_server.go | 26 +- .../armnetwork/fake/p2svpngateways_server.go | 172 +- .../armnetwork/fake/packetcaptures_server.go | 88 +- ...erexpressroutecircuitconnections_server.go | 26 +- .../fake/privatednszonegroups_server.go | 58 +- .../fake/privateendpoints_server.go | 76 +- .../fake/privatelinkservices_server.go | 178 +- .../armnetwork/fake/profiles_server.go | 60 +- .../fake/publicipaddresses_server.go | 164 +- .../fake/publicipprefixes_server.go | 76 +- .../fake/resourcenavigationlinks_server.go | 4 +- .../fake/routefilterrules_server.go | 58 +- .../armnetwork/fake/routefilters_server.go | 76 +- .../armnetwork/fake/routemaps_server.go | 58 +- .../network/armnetwork/fake/routes_server.go | 58 +- .../armnetwork/fake/routetables_server.go | 76 +- .../armnetwork/fake/routingintent_server.go | 58 +- .../fake/scopeconnections_server.go | 26 +- .../securityadminconfigurations_server.go | 42 +- .../armnetwork/fake/securitygroups_server.go | 76 +- .../fake/securitypartnerproviders_server.go | 76 +- .../armnetwork/fake/securityrules_server.go | 58 +- .../fake/serviceassociationlinks_server.go | 4 +- .../fake/serviceendpointpolicies_server.go | 76 +- ...serviceendpointpolicydefinitions_server.go | 58 +- .../fake/servicetaginformation_server.go | 26 +- .../armnetwork/fake/servicetags_server.go | 4 +- .../armnetwork/fake/staticmembers_server.go | 26 +- .../network/armnetwork/fake/subnets_server.go | 90 +- ...riptionnetworkmanagerconnections_server.go | 26 +- .../network/armnetwork/fake/usages_server.go | 26 +- .../network/armnetwork/fake/vipswap_server.go | 24 +- .../virtualapplianceconnections_server.go | 58 +- .../fake/virtualappliances_server.go | 76 +- .../fake/virtualappliancesites_server.go | 58 +- .../fake/virtualapplianceskus_server.go | 26 +- .../fake/virtualhubbgpconnection_server.go | 40 +- .../fake/virtualhubbgpconnections_server.go | 58 +- .../fake/virtualhubipconfiguration_server.go | 58 +- .../fake/virtualhubroutetablev2s_server.go | 58 +- .../armnetwork/fake/virtualhubs_server.go | 124 +- ...virtualnetworkgatewayconnections_server.go | 170 +- .../virtualnetworkgatewaynatrules_server.go | 58 +- .../fake/virtualnetworkgateways_server.go | 316 +- .../fake/virtualnetworkpeerings_server.go | 58 +- .../armnetwork/fake/virtualnetworks_server.go | 110 +- .../fake/virtualnetworktaps_server.go | 76 +- .../fake/virtualrouterpeerings_server.go | 58 +- .../armnetwork/fake/virtualrouters_server.go | 76 +- .../armnetwork/fake/virtualwans_server.go | 76 +- .../armnetwork/fake/vpnconnections_server.go | 90 +- .../armnetwork/fake/vpngateways_server.go | 140 +- .../fake/vpnlinkconnections_server.go | 58 +- .../fake/vpnserverconfigurations_server.go | 76 +- ...urationsassociatedwithvirtualwan_server.go | 24 +- .../fake/vpnsitelinkconnections_server.go | 4 +- .../armnetwork/fake/vpnsitelinks_server.go | 26 +- .../armnetwork/fake/vpnsites_server.go | 76 +- .../fake/vpnsitesconfiguration_server.go | 24 +- .../armnetwork/fake/watchers_server.go | 232 +- .../webapplicationfirewallpolicies_server.go | 60 +- .../armnetwork/fake/webcategories_server.go | 26 +- sdk/resourcemanager/network/armnetwork/go.mod | 2 +- sdk/resourcemanager/network/armnetwork/go.sum | 4 +- .../network/armnetwork/interfaces.go | 54 + .../network/armnetwork/models.go | 4036 +---------------- .../network/armnetwork/options.go | 3920 ++++++++++++++++ .../network/armnetwork/response_types.go | 525 +++ 145 files changed, 9857 insertions(+), 7299 deletions(-) create mode 100644 sdk/resourcemanager/network/armnetwork/interfaces.go create mode 100644 sdk/resourcemanager/network/armnetwork/options.go diff --git a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md index e93e7ccf6665..b6682d61934d 100644 --- a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md +++ b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 3.1.0-beta.2 (2023-07-19) + +### Bug Fixes + +- Fixed a potential panic in faked paged and long-running operations. + ## 3.1.0-beta.1 (2023-06-12) ### Features Added diff --git a/sdk/resourcemanager/network/armnetwork/autorest.md b/sdk/resourcemanager/network/armnetwork/autorest.md index e65a72b35b87..61d99a9ccbd3 100644 --- a/sdk/resourcemanager/network/armnetwork/autorest.md +++ b/sdk/resourcemanager/network/armnetwork/autorest.md @@ -9,9 +9,9 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/17aa6a1314de5aafef059d9aa2229901df506e75/specification/network/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v3 -module-version: 3.1.0-beta.1 +module-version: 3.1.0-beta.2 tag: package-2022-11 -azcore-version: 1.7.0-beta.2 +azcore-version: 1.8.0-beta.1 generate-fakes: true inject-spans: true ``` diff --git a/sdk/resourcemanager/network/armnetwork/build.go b/sdk/resourcemanager/network/armnetwork/build.go index 8396f2f2a30f..eed5ba2f4d7b 100644 --- a/sdk/resourcemanager/network/armnetwork/build.go +++ b/sdk/resourcemanager/network/armnetwork/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.51" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/network/armnetwork +//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.53" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/network/armnetwork package armnetwork diff --git a/sdk/resourcemanager/network/armnetwork/client_factory.go b/sdk/resourcemanager/network/armnetwork/client_factory.go index 66e7298c2850..67883a217268 100644 --- a/sdk/resourcemanager/network/armnetwork/client_factory.go +++ b/sdk/resourcemanager/network/armnetwork/client_factory.go @@ -38,13 +38,13 @@ func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, }, nil } -func (c *ClientFactory) NewApplicationGatewaysClient() *ApplicationGatewaysClient { - subClient, _ := NewApplicationGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewAdminRuleCollectionsClient() *AdminRuleCollectionsClient { + subClient, _ := NewAdminRuleCollectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewApplicationGatewayPrivateLinkResourcesClient() *ApplicationGatewayPrivateLinkResourcesClient { - subClient, _ := NewApplicationGatewayPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewAdminRulesClient() *AdminRulesClient { + subClient, _ := NewAdminRulesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -53,8 +53,8 @@ func (c *ClientFactory) NewApplicationGatewayPrivateEndpointConnectionsClient() return subClient } -func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsDefaultClient() *ApplicationGatewayWafDynamicManifestsDefaultClient { - subClient, _ := NewApplicationGatewayWafDynamicManifestsDefaultClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewApplicationGatewayPrivateLinkResourcesClient() *ApplicationGatewayPrivateLinkResourcesClient { + subClient, _ := NewApplicationGatewayPrivateLinkResourcesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -63,6 +63,16 @@ func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsClient() *Applic return subClient } +func (c *ClientFactory) NewApplicationGatewayWafDynamicManifestsDefaultClient() *ApplicationGatewayWafDynamicManifestsDefaultClient { + subClient, _ := NewApplicationGatewayWafDynamicManifestsDefaultClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewApplicationGatewaysClient() *ApplicationGatewaysClient { + subClient, _ := NewApplicationGatewaysClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewApplicationSecurityGroupsClient() *ApplicationSecurityGroupsClient { subClient, _ := NewApplicationSecurityGroupsClient(c.subscriptionID, c.credential, c.options) return subClient @@ -73,6 +83,16 @@ func (c *ClientFactory) NewAvailableDelegationsClient() *AvailableDelegationsCli return subClient } +func (c *ClientFactory) NewAvailableEndpointServicesClient() *AvailableEndpointServicesClient { + subClient, _ := NewAvailableEndpointServicesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewAvailablePrivateEndpointTypesClient() *AvailablePrivateEndpointTypesClient { + subClient, _ := NewAvailablePrivateEndpointTypesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewAvailableResourceGroupDelegationsClient() *AvailableResourceGroupDelegationsClient { subClient, _ := NewAvailableResourceGroupDelegationsClient(c.subscriptionID, c.credential, c.options) return subClient @@ -83,18 +103,13 @@ func (c *ClientFactory) NewAvailableServiceAliasesClient() *AvailableServiceAlia return subClient } -func (c *ClientFactory) NewAzureFirewallsClient() *AzureFirewallsClient { - subClient, _ := NewAzureFirewallsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewAzureFirewallFqdnTagsClient() *AzureFirewallFqdnTagsClient { subClient, _ := NewAzureFirewallFqdnTagsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewWebCategoriesClient() *WebCategoriesClient { - subClient, _ := NewWebCategoriesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewAzureFirewallsClient() *AzureFirewallsClient { + subClient, _ := NewAzureFirewallsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -103,23 +118,23 @@ func (c *ClientFactory) NewBastionHostsClient() *BastionHostsClient { return subClient } -func (c *ClientFactory) NewManagementClient() *ManagementClient { - subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewBgpServiceCommunitiesClient() *BgpServiceCommunitiesClient { + subClient, _ := NewBgpServiceCommunitiesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewInterfacesClient() *InterfacesClient { - subClient, _ := NewInterfacesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewConfigurationPolicyGroupsClient() *ConfigurationPolicyGroupsClient { + subClient, _ := NewConfigurationPolicyGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPublicIPAddressesClient() *PublicIPAddressesClient { - subClient, _ := NewPublicIPAddressesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewConnectionMonitorsClient() *ConnectionMonitorsClient { + subClient, _ := NewConnectionMonitorsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVipSwapClient() *VipSwapClient { - subClient, _ := NewVipSwapClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewConnectivityConfigurationsClient() *ConnectivityConfigurationsClient { + subClient, _ := NewConnectivityConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -138,13 +153,13 @@ func (c *ClientFactory) NewDdosProtectionPlansClient() *DdosProtectionPlansClien return subClient } -func (c *ClientFactory) NewDscpConfigurationClient() *DscpConfigurationClient { - subClient, _ := NewDscpConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDefaultSecurityRulesClient() *DefaultSecurityRulesClient { + subClient, _ := NewDefaultSecurityRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAvailableEndpointServicesClient() *AvailableEndpointServicesClient { - subClient, _ := NewAvailableEndpointServicesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewDscpConfigurationClient() *DscpConfigurationClient { + subClient, _ := NewDscpConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -153,18 +168,13 @@ func (c *ClientFactory) NewExpressRouteCircuitAuthorizationsClient() *ExpressRou return subClient } -func (c *ClientFactory) NewExpressRouteCircuitPeeringsClient() *ExpressRouteCircuitPeeringsClient { - subClient, _ := NewExpressRouteCircuitPeeringsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewExpressRouteCircuitConnectionsClient() *ExpressRouteCircuitConnectionsClient { subClient, _ := NewExpressRouteCircuitConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPeerExpressRouteCircuitConnectionsClient() *PeerExpressRouteCircuitConnectionsClient { - subClient, _ := NewPeerExpressRouteCircuitConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteCircuitPeeringsClient() *ExpressRouteCircuitPeeringsClient { + subClient, _ := NewExpressRouteCircuitPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -173,13 +183,8 @@ func (c *ClientFactory) NewExpressRouteCircuitsClient() *ExpressRouteCircuitsCli return subClient } -func (c *ClientFactory) NewExpressRouteServiceProvidersClient() *ExpressRouteServiceProvidersClient { - subClient, _ := NewExpressRouteServiceProvidersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewExpressRouteCrossConnectionsClient() *ExpressRouteCrossConnectionsClient { - subClient, _ := NewExpressRouteCrossConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteConnectionsClient() *ExpressRouteConnectionsClient { + subClient, _ := NewExpressRouteConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -188,13 +193,13 @@ func (c *ClientFactory) NewExpressRouteCrossConnectionPeeringsClient() *ExpressR return subClient } -func (c *ClientFactory) NewExpressRoutePortsLocationsClient() *ExpressRoutePortsLocationsClient { - subClient, _ := NewExpressRoutePortsLocationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteCrossConnectionsClient() *ExpressRouteCrossConnectionsClient { + subClient, _ := NewExpressRouteCrossConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExpressRoutePortsClient() *ExpressRoutePortsClient { - subClient, _ := NewExpressRoutePortsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteGatewaysClient() *ExpressRouteGatewaysClient { + subClient, _ := NewExpressRouteGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -208,88 +213,88 @@ func (c *ClientFactory) NewExpressRoutePortAuthorizationsClient() *ExpressRouteP return subClient } -func (c *ClientFactory) NewExpressRouteProviderPortsLocationClient() *ExpressRouteProviderPortsLocationClient { - subClient, _ := NewExpressRouteProviderPortsLocationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRoutePortsClient() *ExpressRoutePortsClient { + subClient, _ := NewExpressRoutePortsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallPoliciesClient() *FirewallPoliciesClient { - subClient, _ := NewFirewallPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRoutePortsLocationsClient() *ExpressRoutePortsLocationsClient { + subClient, _ := NewExpressRoutePortsLocationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallPolicyRuleCollectionGroupsClient() *FirewallPolicyRuleCollectionGroupsClient { - subClient, _ := NewFirewallPolicyRuleCollectionGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteProviderPortsLocationClient() *ExpressRouteProviderPortsLocationClient { + subClient, _ := NewExpressRouteProviderPortsLocationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesClient() *FirewallPolicyIdpsSignaturesClient { - subClient, _ := NewFirewallPolicyIdpsSignaturesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewExpressRouteServiceProvidersClient() *ExpressRouteServiceProvidersClient { + subClient, _ := NewExpressRouteServiceProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesOverridesClient() *FirewallPolicyIdpsSignaturesOverridesClient { - subClient, _ := NewFirewallPolicyIdpsSignaturesOverridesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFirewallPoliciesClient() *FirewallPoliciesClient { + subClient, _ := NewFirewallPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesFilterValuesClient() *FirewallPolicyIdpsSignaturesFilterValuesClient { - subClient, _ := NewFirewallPolicyIdpsSignaturesFilterValuesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesClient() *FirewallPolicyIdpsSignaturesClient { + subClient, _ := NewFirewallPolicyIdpsSignaturesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIPAllocationsClient() *IPAllocationsClient { - subClient, _ := NewIPAllocationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesFilterValuesClient() *FirewallPolicyIdpsSignaturesFilterValuesClient { + subClient, _ := NewFirewallPolicyIdpsSignaturesFilterValuesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewIPGroupsClient() *IPGroupsClient { - subClient, _ := NewIPGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFirewallPolicyIdpsSignaturesOverridesClient() *FirewallPolicyIdpsSignaturesOverridesClient { + subClient, _ := NewFirewallPolicyIdpsSignaturesOverridesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancersClient() *LoadBalancersClient { - subClient, _ := NewLoadBalancersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFirewallPolicyRuleCollectionGroupsClient() *FirewallPolicyRuleCollectionGroupsClient { + subClient, _ := NewFirewallPolicyRuleCollectionGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerBackendAddressPoolsClient() *LoadBalancerBackendAddressPoolsClient { - subClient, _ := NewLoadBalancerBackendAddressPoolsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewFlowLogsClient() *FlowLogsClient { + subClient, _ := NewFlowLogsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerFrontendIPConfigurationsClient() *LoadBalancerFrontendIPConfigurationsClient { - subClient, _ := NewLoadBalancerFrontendIPConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewGroupsClient() *GroupsClient { + subClient, _ := NewGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewInboundNatRulesClient() *InboundNatRulesClient { - subClient, _ := NewInboundNatRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewHubRouteTablesClient() *HubRouteTablesClient { + subClient, _ := NewHubRouteTablesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerLoadBalancingRulesClient() *LoadBalancerLoadBalancingRulesClient { - subClient, _ := NewLoadBalancerLoadBalancingRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewHubVirtualNetworkConnectionsClient() *HubVirtualNetworkConnectionsClient { + subClient, _ := NewHubVirtualNetworkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerOutboundRulesClient() *LoadBalancerOutboundRulesClient { - subClient, _ := NewLoadBalancerOutboundRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewIPAllocationsClient() *IPAllocationsClient { + subClient, _ := NewIPAllocationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerNetworkInterfacesClient() *LoadBalancerNetworkInterfacesClient { - subClient, _ := NewLoadBalancerNetworkInterfacesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewIPGroupsClient() *IPGroupsClient { + subClient, _ := NewIPGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLoadBalancerProbesClient() *LoadBalancerProbesClient { - subClient, _ := NewLoadBalancerProbesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewInboundNatRulesClient() *InboundNatRulesClient { + subClient, _ := NewInboundNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNatGatewaysClient() *NatGatewaysClient { - subClient, _ := NewNatGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewInboundSecurityRuleClient() *InboundSecurityRuleClient { + subClient, _ := NewInboundSecurityRuleClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -308,108 +313,93 @@ func (c *ClientFactory) NewInterfaceTapConfigurationsClient() *InterfaceTapConfi return subClient } -func (c *ClientFactory) NewManagersClient() *ManagersClient { - subClient, _ := NewManagersClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagerCommitsClient() *ManagerCommitsClient { - subClient, _ := NewManagerCommitsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewManagerDeploymentStatusClient() *ManagerDeploymentStatusClient { - subClient, _ := NewManagerDeploymentStatusClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewSubscriptionNetworkManagerConnectionsClient() *SubscriptionNetworkManagerConnectionsClient { - subClient, _ := NewSubscriptionNetworkManagerConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewInterfacesClient() *InterfacesClient { + subClient, _ := NewInterfacesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewManagementGroupNetworkManagerConnectionsClient() *ManagementGroupNetworkManagerConnectionsClient { - subClient, _ := NewManagementGroupNetworkManagerConnectionsClient(c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerBackendAddressPoolsClient() *LoadBalancerBackendAddressPoolsClient { + subClient, _ := NewLoadBalancerBackendAddressPoolsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConnectivityConfigurationsClient() *ConnectivityConfigurationsClient { - subClient, _ := NewConnectivityConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerFrontendIPConfigurationsClient() *LoadBalancerFrontendIPConfigurationsClient { + subClient, _ := NewLoadBalancerFrontendIPConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewGroupsClient() *GroupsClient { - subClient, _ := NewGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerLoadBalancingRulesClient() *LoadBalancerLoadBalancingRulesClient { + subClient, _ := NewLoadBalancerLoadBalancingRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewStaticMembersClient() *StaticMembersClient { - subClient, _ := NewStaticMembersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerNetworkInterfacesClient() *LoadBalancerNetworkInterfacesClient { + subClient, _ := NewLoadBalancerNetworkInterfacesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewScopeConnectionsClient() *ScopeConnectionsClient { - subClient, _ := NewScopeConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerOutboundRulesClient() *LoadBalancerOutboundRulesClient { + subClient, _ := NewLoadBalancerOutboundRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSecurityAdminConfigurationsClient() *SecurityAdminConfigurationsClient { - subClient, _ := NewSecurityAdminConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancerProbesClient() *LoadBalancerProbesClient { + subClient, _ := NewLoadBalancerProbesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAdminRuleCollectionsClient() *AdminRuleCollectionsClient { - subClient, _ := NewAdminRuleCollectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLoadBalancersClient() *LoadBalancersClient { + subClient, _ := NewLoadBalancersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewAdminRulesClient() *AdminRulesClient { - subClient, _ := NewAdminRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewLocalNetworkGatewaysClient() *LocalNetworkGatewaysClient { + subClient, _ := NewLocalNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewProfilesClient() *ProfilesClient { - subClient, _ := NewProfilesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagementClient() *ManagementClient { + subClient, _ := NewManagementClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSecurityGroupsClient() *SecurityGroupsClient { - subClient, _ := NewSecurityGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagementGroupNetworkManagerConnectionsClient() *ManagementGroupNetworkManagerConnectionsClient { + subClient, _ := NewManagementGroupNetworkManagerConnectionsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewSecurityRulesClient() *SecurityRulesClient { - subClient, _ := NewSecurityRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagerCommitsClient() *ManagerCommitsClient { + subClient, _ := NewManagerCommitsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewDefaultSecurityRulesClient() *DefaultSecurityRulesClient { - subClient, _ := NewDefaultSecurityRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagerDeploymentStatusClient() *ManagerDeploymentStatusClient { + subClient, _ := NewManagerDeploymentStatusClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualAppliancesClient() *VirtualAppliancesClient { - subClient, _ := NewVirtualAppliancesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewManagersClient() *ManagersClient { + subClient, _ := NewManagersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualApplianceSitesClient() *VirtualApplianceSitesClient { - subClient, _ := NewVirtualApplianceSitesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewNatGatewaysClient() *NatGatewaysClient { + subClient, _ := NewNatGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualApplianceSKUsClient() *VirtualApplianceSKUsClient { - subClient, _ := NewVirtualApplianceSKUsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewNatRulesClient() *NatRulesClient { + subClient, _ := NewNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewInboundSecurityRuleClient() *InboundSecurityRuleClient { - subClient, _ := NewInboundSecurityRuleClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewWatchersClient() *WatchersClient { - subClient, _ := NewWatchersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewP2SVPNGatewaysClient() *P2SVPNGatewaysClient { + subClient, _ := NewP2SVPNGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -418,18 +408,13 @@ func (c *ClientFactory) NewPacketCapturesClient() *PacketCapturesClient { return subClient } -func (c *ClientFactory) NewConnectionMonitorsClient() *ConnectionMonitorsClient { - subClient, _ := NewConnectionMonitorsClient(c.subscriptionID, c.credential, c.options) - return subClient -} - -func (c *ClientFactory) NewFlowLogsClient() *FlowLogsClient { - subClient, _ := NewFlowLogsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPeerExpressRouteCircuitConnectionsClient() *PeerExpressRouteCircuitConnectionsClient { + subClient, _ := NewPeerExpressRouteCircuitConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) +func (c *ClientFactory) NewPrivateDNSZoneGroupsClient() *PrivateDNSZoneGroupsClient { + subClient, _ := NewPrivateDNSZoneGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -438,18 +423,18 @@ func (c *ClientFactory) NewPrivateEndpointsClient() *PrivateEndpointsClient { return subClient } -func (c *ClientFactory) NewAvailablePrivateEndpointTypesClient() *AvailablePrivateEndpointTypesClient { - subClient, _ := NewAvailablePrivateEndpointTypesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPrivateLinkServicesClient() *PrivateLinkServicesClient { + subClient, _ := NewPrivateLinkServicesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateDNSZoneGroupsClient() *PrivateDNSZoneGroupsClient { - subClient, _ := NewPrivateDNSZoneGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewProfilesClient() *ProfilesClient { + subClient, _ := NewProfilesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewPrivateLinkServicesClient() *PrivateLinkServicesClient { - subClient, _ := NewPrivateLinkServicesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewPublicIPAddressesClient() *PublicIPAddressesClient { + subClient, _ := NewPublicIPAddressesClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -458,8 +443,8 @@ func (c *ClientFactory) NewPublicIPPrefixesClient() *PublicIPPrefixesClient { return subClient } -func (c *ClientFactory) NewRouteFiltersClient() *RouteFiltersClient { - subClient, _ := NewRouteFiltersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewResourceNavigationLinksClient() *ResourceNavigationLinksClient { + subClient, _ := NewResourceNavigationLinksClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -468,6 +453,16 @@ func (c *ClientFactory) NewRouteFilterRulesClient() *RouteFilterRulesClient { return subClient } +func (c *ClientFactory) NewRouteFiltersClient() *RouteFiltersClient { + subClient, _ := NewRouteFiltersClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewRouteMapsClient() *RouteMapsClient { + subClient, _ := NewRouteMapsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewRouteTablesClient() *RouteTablesClient { subClient, _ := NewRouteTablesClient(c.subscriptionID, c.credential, c.options) return subClient @@ -478,108 +473,108 @@ func (c *ClientFactory) NewRoutesClient() *RoutesClient { return subClient } -func (c *ClientFactory) NewSecurityPartnerProvidersClient() *SecurityPartnerProvidersClient { - subClient, _ := NewSecurityPartnerProvidersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewRoutingIntentClient() *RoutingIntentClient { + subClient, _ := NewRoutingIntentClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewBgpServiceCommunitiesClient() *BgpServiceCommunitiesClient { - subClient, _ := NewBgpServiceCommunitiesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewScopeConnectionsClient() *ScopeConnectionsClient { + subClient, _ := NewScopeConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceEndpointPoliciesClient() *ServiceEndpointPoliciesClient { - subClient, _ := NewServiceEndpointPoliciesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSecurityAdminConfigurationsClient() *SecurityAdminConfigurationsClient { + subClient, _ := NewSecurityAdminConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceEndpointPolicyDefinitionsClient() *ServiceEndpointPolicyDefinitionsClient { - subClient, _ := NewServiceEndpointPolicyDefinitionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSecurityGroupsClient() *SecurityGroupsClient { + subClient, _ := NewSecurityGroupsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceTagsClient() *ServiceTagsClient { - subClient, _ := NewServiceTagsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSecurityPartnerProvidersClient() *SecurityPartnerProvidersClient { + subClient, _ := NewSecurityPartnerProvidersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceTagInformationClient() *ServiceTagInformationClient { - subClient, _ := NewServiceTagInformationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSecurityRulesClient() *SecurityRulesClient { + subClient, _ := NewSecurityRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewUsagesClient() *UsagesClient { - subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewServiceAssociationLinksClient() *ServiceAssociationLinksClient { + subClient, _ := NewServiceAssociationLinksClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient { - subClient, _ := NewVirtualNetworksClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewServiceEndpointPoliciesClient() *ServiceEndpointPoliciesClient { + subClient, _ := NewServiceEndpointPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewSubnetsClient() *SubnetsClient { - subClient, _ := NewSubnetsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewServiceEndpointPolicyDefinitionsClient() *ServiceEndpointPolicyDefinitionsClient { + subClient, _ := NewServiceEndpointPolicyDefinitionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewResourceNavigationLinksClient() *ResourceNavigationLinksClient { - subClient, _ := NewResourceNavigationLinksClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewServiceTagInformationClient() *ServiceTagInformationClient { + subClient, _ := NewServiceTagInformationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewServiceAssociationLinksClient() *ServiceAssociationLinksClient { - subClient, _ := NewServiceAssociationLinksClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewServiceTagsClient() *ServiceTagsClient { + subClient, _ := NewServiceTagsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworkPeeringsClient() *VirtualNetworkPeeringsClient { - subClient, _ := NewVirtualNetworkPeeringsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewStaticMembersClient() *StaticMembersClient { + subClient, _ := NewStaticMembersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworkGatewaysClient() *VirtualNetworkGatewaysClient { - subClient, _ := NewVirtualNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSubnetsClient() *SubnetsClient { + subClient, _ := NewSubnetsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworkGatewayConnectionsClient() *VirtualNetworkGatewayConnectionsClient { - subClient, _ := NewVirtualNetworkGatewayConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewSubscriptionNetworkManagerConnectionsClient() *SubscriptionNetworkManagerConnectionsClient { + subClient, _ := NewSubscriptionNetworkManagerConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewLocalNetworkGatewaysClient() *LocalNetworkGatewaysClient { - subClient, _ := NewLocalNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewUsagesClient() *UsagesClient { + subClient, _ := NewUsagesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworkGatewayNatRulesClient() *VirtualNetworkGatewayNatRulesClient { - subClient, _ := NewVirtualNetworkGatewayNatRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNConnectionsClient() *VPNConnectionsClient { + subClient, _ := NewVPNConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualNetworkTapsClient() *VirtualNetworkTapsClient { - subClient, _ := NewVirtualNetworkTapsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNGatewaysClient() *VPNGatewaysClient { + subClient, _ := NewVPNGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualRoutersClient() *VirtualRoutersClient { - subClient, _ := NewVirtualRoutersClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNLinkConnectionsClient() *VPNLinkConnectionsClient { + subClient, _ := NewVPNLinkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualRouterPeeringsClient() *VirtualRouterPeeringsClient { - subClient, _ := NewVirtualRouterPeeringsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNServerConfigurationsAssociatedWithVirtualWanClient() *VPNServerConfigurationsAssociatedWithVirtualWanClient { + subClient, _ := NewVPNServerConfigurationsAssociatedWithVirtualWanClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualWansClient() *VirtualWansClient { - subClient, _ := NewVirtualWansClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNServerConfigurationsClient() *VPNServerConfigurationsClient { + subClient, _ := NewVPNServerConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNSitesClient() *VPNSitesClient { - subClient, _ := NewVPNSitesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNSiteLinkConnectionsClient() *VPNSiteLinkConnectionsClient { + subClient, _ := NewVPNSiteLinkConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -588,113 +583,113 @@ func (c *ClientFactory) NewVPNSiteLinksClient() *VPNSiteLinksClient { return subClient } -func (c *ClientFactory) NewVPNSitesConfigurationClient() *VPNSitesConfigurationClient { - subClient, _ := NewVPNSitesConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNSitesClient() *VPNSitesClient { + subClient, _ := NewVPNSitesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNServerConfigurationsClient() *VPNServerConfigurationsClient { - subClient, _ := NewVPNServerConfigurationsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVPNSitesConfigurationClient() *VPNSitesConfigurationClient { + subClient, _ := NewVPNSitesConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewConfigurationPolicyGroupsClient() *ConfigurationPolicyGroupsClient { - subClient, _ := NewConfigurationPolicyGroupsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVipSwapClient() *VipSwapClient { + subClient, _ := NewVipSwapClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualHubsClient() *VirtualHubsClient { - subClient, _ := NewVirtualHubsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualApplianceConnectionsClient() *VirtualApplianceConnectionsClient { + subClient, _ := NewVirtualApplianceConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRouteMapsClient() *RouteMapsClient { - subClient, _ := NewRouteMapsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualApplianceSKUsClient() *VirtualApplianceSKUsClient { + subClient, _ := NewVirtualApplianceSKUsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHubVirtualNetworkConnectionsClient() *HubVirtualNetworkConnectionsClient { - subClient, _ := NewHubVirtualNetworkConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualApplianceSitesClient() *VirtualApplianceSitesClient { + subClient, _ := NewVirtualApplianceSitesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNGatewaysClient() *VPNGatewaysClient { - subClient, _ := NewVPNGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualAppliancesClient() *VirtualAppliancesClient { + subClient, _ := NewVirtualAppliancesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNLinkConnectionsClient() *VPNLinkConnectionsClient { - subClient, _ := NewVPNLinkConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualHubBgpConnectionClient() *VirtualHubBgpConnectionClient { + subClient, _ := NewVirtualHubBgpConnectionClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNConnectionsClient() *VPNConnectionsClient { - subClient, _ := NewVPNConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualHubBgpConnectionsClient() *VirtualHubBgpConnectionsClient { + subClient, _ := NewVirtualHubBgpConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNSiteLinkConnectionsClient() *VPNSiteLinkConnectionsClient { - subClient, _ := NewVPNSiteLinkConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualHubIPConfigurationClient() *VirtualHubIPConfigurationClient { + subClient, _ := NewVirtualHubIPConfigurationClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewNatRulesClient() *NatRulesClient { - subClient, _ := NewNatRulesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualHubRouteTableV2SClient() *VirtualHubRouteTableV2SClient { + subClient, _ := NewVirtualHubRouteTableV2SClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewP2SVPNGatewaysClient() *P2SVPNGatewaysClient { - subClient, _ := NewP2SVPNGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualHubsClient() *VirtualHubsClient { + subClient, _ := NewVirtualHubsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVPNServerConfigurationsAssociatedWithVirtualWanClient() *VPNServerConfigurationsAssociatedWithVirtualWanClient { - subClient, _ := NewVPNServerConfigurationsAssociatedWithVirtualWanClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworkGatewayConnectionsClient() *VirtualNetworkGatewayConnectionsClient { + subClient, _ := NewVirtualNetworkGatewayConnectionsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualHubRouteTableV2SClient() *VirtualHubRouteTableV2SClient { - subClient, _ := NewVirtualHubRouteTableV2SClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworkGatewayNatRulesClient() *VirtualNetworkGatewayNatRulesClient { + subClient, _ := NewVirtualNetworkGatewayNatRulesClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExpressRouteGatewaysClient() *ExpressRouteGatewaysClient { - subClient, _ := NewExpressRouteGatewaysClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworkGatewaysClient() *VirtualNetworkGatewaysClient { + subClient, _ := NewVirtualNetworkGatewaysClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewExpressRouteConnectionsClient() *ExpressRouteConnectionsClient { - subClient, _ := NewExpressRouteConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworkPeeringsClient() *VirtualNetworkPeeringsClient { + subClient, _ := NewVirtualNetworkPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualApplianceConnectionsClient() *VirtualApplianceConnectionsClient { - subClient, _ := NewVirtualApplianceConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworkTapsClient() *VirtualNetworkTapsClient { + subClient, _ := NewVirtualNetworkTapsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualHubBgpConnectionClient() *VirtualHubBgpConnectionClient { - subClient, _ := NewVirtualHubBgpConnectionClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualNetworksClient() *VirtualNetworksClient { + subClient, _ := NewVirtualNetworksClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualHubBgpConnectionsClient() *VirtualHubBgpConnectionsClient { - subClient, _ := NewVirtualHubBgpConnectionsClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualRouterPeeringsClient() *VirtualRouterPeeringsClient { + subClient, _ := NewVirtualRouterPeeringsClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewVirtualHubIPConfigurationClient() *VirtualHubIPConfigurationClient { - subClient, _ := NewVirtualHubIPConfigurationClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualRoutersClient() *VirtualRoutersClient { + subClient, _ := NewVirtualRoutersClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewHubRouteTablesClient() *HubRouteTablesClient { - subClient, _ := NewHubRouteTablesClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewVirtualWansClient() *VirtualWansClient { + subClient, _ := NewVirtualWansClient(c.subscriptionID, c.credential, c.options) return subClient } -func (c *ClientFactory) NewRoutingIntentClient() *RoutingIntentClient { - subClient, _ := NewRoutingIntentClient(c.subscriptionID, c.credential, c.options) +func (c *ClientFactory) NewWatchersClient() *WatchersClient { + subClient, _ := NewWatchersClient(c.subscriptionID, c.credential, c.options) return subClient } @@ -702,3 +697,8 @@ func (c *ClientFactory) NewWebApplicationFirewallPoliciesClient() *WebApplicatio subClient, _ := NewWebApplicationFirewallPoliciesClient(c.subscriptionID, c.credential, c.options) return subClient } + +func (c *ClientFactory) NewWebCategoriesClient() *WebCategoriesClient { + subClient, _ := NewWebCategoriesClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/sdk/resourcemanager/network/armnetwork/constants.go b/sdk/resourcemanager/network/armnetwork/constants.go index 581ba61f0357..918fa7113243 100644 --- a/sdk/resourcemanager/network/armnetwork/constants.go +++ b/sdk/resourcemanager/network/armnetwork/constants.go @@ -10,7 +10,7 @@ package armnetwork const ( moduleName = "armnetwork" - moduleVersion = "v3.1.0-beta.1" + moduleVersion = "v3.1.0-beta.2" ) // Access - Access to be allowed or denied. diff --git a/sdk/resourcemanager/network/armnetwork/fake/adminrulecollections_server.go b/sdk/resourcemanager/network/armnetwork/fake/adminrulecollections_server.go index 844ca9e0e25a..cb221899262d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/adminrulecollections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/adminrulecollections_server.go @@ -43,18 +43,22 @@ type AdminRuleCollectionsServer struct { } // NewAdminRuleCollectionsServerTransport creates a new instance of AdminRuleCollectionsServerTransport with the provided implementation. -// The returned AdminRuleCollectionsServerTransport instance is connected to an instance of armnetwork.AdminRuleCollectionsClient by way of the -// undefined.Transporter field. +// The returned AdminRuleCollectionsServerTransport instance is connected to an instance of armnetwork.AdminRuleCollectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAdminRuleCollectionsServerTransport(srv *AdminRuleCollectionsServer) *AdminRuleCollectionsServerTransport { - return &AdminRuleCollectionsServerTransport{srv: srv} + return &AdminRuleCollectionsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.AdminRuleCollectionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.AdminRuleCollectionsClientListResponse]](), + } } // AdminRuleCollectionsServerTransport connects instances of armnetwork.AdminRuleCollectionsClient to instances of AdminRuleCollectionsServer. // Don't use this type directly, use NewAdminRuleCollectionsServerTransport instead. type AdminRuleCollectionsServerTransport struct { srv *AdminRuleCollectionsServer - beginDelete *azfake.PollerResponder[armnetwork.AdminRuleCollectionsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.AdminRuleCollectionsClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.AdminRuleCollectionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.AdminRuleCollectionsClientListResponse]] } // Do implements the policy.Transporter interface for AdminRuleCollectionsServerTransport. @@ -137,7 +141,8 @@ func (a *AdminRuleCollectionsServerTransport) dispatchBeginDelete(req *http.Requ if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -179,19 +184,21 @@ func (a *AdminRuleCollectionsServerTransport) dispatchBeginDelete(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -242,7 +249,8 @@ func (a *AdminRuleCollectionsServerTransport) dispatchNewListPager(req *http.Req if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -289,20 +297,22 @@ func (a *AdminRuleCollectionsServerTransport) dispatchNewListPager(req *http.Req } } resp := a.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, options) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AdminRuleCollectionsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AdminRuleCollectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/adminrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/adminrules_server.go index ffd8609e7db8..c1eb8befb578 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/adminrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/adminrules_server.go @@ -43,18 +43,22 @@ type AdminRulesServer struct { } // NewAdminRulesServerTransport creates a new instance of AdminRulesServerTransport with the provided implementation. -// The returned AdminRulesServerTransport instance is connected to an instance of armnetwork.AdminRulesClient by way of the -// undefined.Transporter field. +// The returned AdminRulesServerTransport instance is connected to an instance of armnetwork.AdminRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAdminRulesServerTransport(srv *AdminRulesServer) *AdminRulesServerTransport { - return &AdminRulesServerTransport{srv: srv} + return &AdminRulesServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.AdminRulesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.AdminRulesClientListResponse]](), + } } // AdminRulesServerTransport connects instances of armnetwork.AdminRulesClient to instances of AdminRulesServer. // Don't use this type directly, use NewAdminRulesServerTransport instead. type AdminRulesServerTransport struct { srv *AdminRulesServer - beginDelete *azfake.PollerResponder[armnetwork.AdminRulesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.AdminRulesClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.AdminRulesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.AdminRulesClientListResponse]] } // Do implements the policy.Transporter interface for AdminRulesServerTransport. @@ -145,7 +149,8 @@ func (a *AdminRulesServerTransport) dispatchBeginDelete(req *http.Request) (*htt if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -191,19 +196,21 @@ func (a *AdminRulesServerTransport) dispatchBeginDelete(req *http.Request) (*htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -258,7 +265,8 @@ func (a *AdminRulesServerTransport) dispatchNewListPager(req *http.Request) (*ht if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -309,20 +317,22 @@ func (a *AdminRulesServerTransport) dispatchNewListPager(req *http.Request) (*ht } } resp := a.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, configurationNameUnescaped, ruleCollectionNameUnescaped, options) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AdminRulesClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AdminRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivateendpointconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivateendpointconnections_server.go index ebd368d85781..92cb4e467386 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivateendpointconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivateendpointconnections_server.go @@ -42,19 +42,24 @@ type ApplicationGatewayPrivateEndpointConnectionsServer struct { } // NewApplicationGatewayPrivateEndpointConnectionsServerTransport creates a new instance of ApplicationGatewayPrivateEndpointConnectionsServerTransport with the provided implementation. -// The returned ApplicationGatewayPrivateEndpointConnectionsServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayPrivateEndpointConnectionsClient by way of the -// undefined.Transporter field. +// The returned ApplicationGatewayPrivateEndpointConnectionsServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayPrivateEndpointConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationGatewayPrivateEndpointConnectionsServerTransport(srv *ApplicationGatewayPrivateEndpointConnectionsServer) *ApplicationGatewayPrivateEndpointConnectionsServerTransport { - return &ApplicationGatewayPrivateEndpointConnectionsServerTransport{srv: srv} + return &ApplicationGatewayPrivateEndpointConnectionsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse]](), + beginUpdate: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]](), + } } // ApplicationGatewayPrivateEndpointConnectionsServerTransport connects instances of armnetwork.ApplicationGatewayPrivateEndpointConnectionsClient to instances of ApplicationGatewayPrivateEndpointConnectionsServer. // Don't use this type directly, use NewApplicationGatewayPrivateEndpointConnectionsServerTransport instead. type ApplicationGatewayPrivateEndpointConnectionsServerTransport struct { srv *ApplicationGatewayPrivateEndpointConnectionsServer - beginDelete *azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse] - beginUpdate *azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse]] + beginUpdate *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]] } // Do implements the policy.Transporter interface for ApplicationGatewayPrivateEndpointConnectionsServerTransport. @@ -92,7 +97,8 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -115,19 +121,21 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -174,7 +182,8 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchNe if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -190,20 +199,22 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchNe return nil, err } resp := a.srv.NewListPager(resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateEndpointConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -212,7 +223,8 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe if a.srv.BeginUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} } - if a.beginUpdate == nil { + beginUpdate := a.beginUpdate.get(req) + if beginUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,19 +251,21 @@ func (a *ApplicationGatewayPrivateEndpointConnectionsServerTransport) dispatchBe if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginUpdate = &respr + beginUpdate = &respr + a.beginUpdate.add(req, beginUpdate) } - resp, err := server.PollerResponderNext(a.beginUpdate, req) + resp, err := server.PollerResponderNext(beginUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginUpdate) { - a.beginUpdate = nil + if !server.PollerResponderMore(beginUpdate) { + a.beginUpdate.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivatelinkresources_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivatelinkresources_server.go index a75748c3dfd6..79078f45403b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivatelinkresources_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewayprivatelinkresources_server.go @@ -29,17 +29,20 @@ type ApplicationGatewayPrivateLinkResourcesServer struct { } // NewApplicationGatewayPrivateLinkResourcesServerTransport creates a new instance of ApplicationGatewayPrivateLinkResourcesServerTransport with the provided implementation. -// The returned ApplicationGatewayPrivateLinkResourcesServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayPrivateLinkResourcesClient by way of the -// undefined.Transporter field. +// The returned ApplicationGatewayPrivateLinkResourcesServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayPrivateLinkResourcesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationGatewayPrivateLinkResourcesServerTransport(srv *ApplicationGatewayPrivateLinkResourcesServer) *ApplicationGatewayPrivateLinkResourcesServerTransport { - return &ApplicationGatewayPrivateLinkResourcesServerTransport{srv: srv} + return &ApplicationGatewayPrivateLinkResourcesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse]](), + } } // ApplicationGatewayPrivateLinkResourcesServerTransport connects instances of armnetwork.ApplicationGatewayPrivateLinkResourcesClient to instances of ApplicationGatewayPrivateLinkResourcesServer. // Don't use this type directly, use NewApplicationGatewayPrivateLinkResourcesServerTransport instead. type ApplicationGatewayPrivateLinkResourcesServerTransport struct { srv *ApplicationGatewayPrivateLinkResourcesServer - newListPager *azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse]] } // Do implements the policy.Transporter interface for ApplicationGatewayPrivateLinkResourcesServerTransport. @@ -71,7 +74,8 @@ func (a *ApplicationGatewayPrivateLinkResourcesServerTransport) dispatchNewListP if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateLinkResources` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -87,20 +91,22 @@ func (a *ApplicationGatewayPrivateLinkResourcesServerTransport) dispatchNewListP return nil, err } resp := a.srv.NewListPager(resourceGroupNameUnescaped, applicationGatewayNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewayPrivateLinkResourcesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationgateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationgateways_server.go index 0c2cba7c772e..d7c99db6f38f 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationgateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationgateways_server.go @@ -94,25 +94,36 @@ type ApplicationGatewaysServer struct { } // NewApplicationGatewaysServerTransport creates a new instance of ApplicationGatewaysServerTransport with the provided implementation. -// The returned ApplicationGatewaysServerTransport instance is connected to an instance of armnetwork.ApplicationGatewaysClient by way of the -// undefined.Transporter field. +// The returned ApplicationGatewaysServerTransport instance is connected to an instance of armnetwork.ApplicationGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationGatewaysServerTransport(srv *ApplicationGatewaysServer) *ApplicationGatewaysServerTransport { - return &ApplicationGatewaysServerTransport{srv: srv} + return &ApplicationGatewaysServerTransport{ + srv: srv, + beginBackendHealth: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthResponse]](), + beginBackendHealthOnDemand: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthOnDemandResponse]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAllResponse]](), + newListAvailableSSLPredefinedPoliciesPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]](), + beginStart: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStartResponse]](), + beginStop: newTracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStopResponse]](), + } } // ApplicationGatewaysServerTransport connects instances of armnetwork.ApplicationGatewaysClient to instances of ApplicationGatewaysServer. // Don't use this type directly, use NewApplicationGatewaysServerTransport instead. type ApplicationGatewaysServerTransport struct { srv *ApplicationGatewaysServer - beginBackendHealth *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthResponse] - beginBackendHealthOnDemand *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthOnDemandResponse] - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAllResponse] - newListAvailableSSLPredefinedPoliciesPager *azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] - beginStart *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStartResponse] - beginStop *azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStopResponse] + beginBackendHealth *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthResponse]] + beginBackendHealthOnDemand *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientBackendHealthOnDemandResponse]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAllResponse]] + newListAvailableSSLPredefinedPoliciesPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]] + beginStart *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStartResponse]] + beginStop *tracker[azfake.PollerResponder[armnetwork.ApplicationGatewaysClientStopResponse]] } // Do implements the policy.Transporter interface for ApplicationGatewaysServerTransport. @@ -176,7 +187,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealth(req *htt if a.srv.BeginBackendHealth == nil { return nil, &nonRetriableError{errors.New("fake for method BeginBackendHealth not implemented")} } - if a.beginBackendHealth == nil { + beginBackendHealth := a.beginBackendHealth.get(req) + if beginBackendHealth == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendhealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -207,19 +219,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealth(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginBackendHealth = &respr + beginBackendHealth = &respr + a.beginBackendHealth.add(req, beginBackendHealth) } - resp, err := server.PollerResponderNext(a.beginBackendHealth, req) + resp, err := server.PollerResponderNext(beginBackendHealth, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginBackendHealth.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginBackendHealth) { - a.beginBackendHealth = nil + if !server.PollerResponderMore(beginBackendHealth) { + a.beginBackendHealth.remove(req) } return resp, nil @@ -229,7 +243,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealthOnDemand( if a.srv.BeginBackendHealthOnDemand == nil { return nil, &nonRetriableError{errors.New("fake for method BeginBackendHealthOnDemand not implemented")} } - if a.beginBackendHealthOnDemand == nil { + beginBackendHealthOnDemand := a.beginBackendHealthOnDemand.get(req) + if beginBackendHealthOnDemand == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBackendHealthOnDemand` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -264,19 +279,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginBackendHealthOnDemand( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginBackendHealthOnDemand = &respr + beginBackendHealthOnDemand = &respr + a.beginBackendHealthOnDemand.add(req, beginBackendHealthOnDemand) } - resp, err := server.PollerResponderNext(a.beginBackendHealthOnDemand, req) + resp, err := server.PollerResponderNext(beginBackendHealthOnDemand, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginBackendHealthOnDemand.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginBackendHealthOnDemand) { - a.beginBackendHealthOnDemand = nil + if !server.PollerResponderMore(beginBackendHealthOnDemand) { + a.beginBackendHealthOnDemand.remove(req) } return resp, nil @@ -286,7 +303,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *ht if a.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if a.beginCreateOrUpdate == nil { + beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -309,19 +327,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(a.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + a.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginCreateOrUpdate) { - a.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + a.beginCreateOrUpdate.remove(req) } return resp, nil @@ -331,7 +351,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginDelete(req *http.Reque if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -350,19 +371,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginDelete(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -434,7 +457,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListPager(req *http.Requ if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -446,20 +470,22 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListPager(req *http.Requ return nil, err } resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.ApplicationGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -468,7 +494,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAllPager(req *http.R if a.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if a.newListAllPager == nil { + newListAllPager := a.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -476,20 +503,22 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAllPager(req *http.R return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListAllPager(nil) - a.newListAllPager = &resp - server.PagerResponderInjectNextLinks(a.newListAllPager, req, func(page *armnetwork.ApplicationGatewaysClientListAllResponse, createLink func() string) { + newListAllPager = &resp + a.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.ApplicationGatewaysClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListAllPager) { - a.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + a.newListAllPager.remove(req) } return resp, nil } @@ -573,7 +602,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAvailableSSLPredefin if a.srv.NewListAvailableSSLPredefinedPoliciesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAvailableSSLPredefinedPoliciesPager not implemented")} } - if a.newListAvailableSSLPredefinedPoliciesPager == nil { + newListAvailableSSLPredefinedPoliciesPager := a.newListAvailableSSLPredefinedPoliciesPager.get(req) + if newListAvailableSSLPredefinedPoliciesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -581,20 +611,22 @@ func (a *ApplicationGatewaysServerTransport) dispatchNewListAvailableSSLPredefin return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListAvailableSSLPredefinedPoliciesPager(nil) - a.newListAvailableSSLPredefinedPoliciesPager = &resp - server.PagerResponderInjectNextLinks(a.newListAvailableSSLPredefinedPoliciesPager, req, func(page *armnetwork.ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, createLink func() string) { + newListAvailableSSLPredefinedPoliciesPager = &resp + a.newListAvailableSSLPredefinedPoliciesPager.add(req, newListAvailableSSLPredefinedPoliciesPager) + server.PagerResponderInjectNextLinks(newListAvailableSSLPredefinedPoliciesPager, req, func(page *armnetwork.ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListAvailableSSLPredefinedPoliciesPager, req) + resp, err := server.PagerResponderNext(newListAvailableSSLPredefinedPoliciesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListAvailableSSLPredefinedPoliciesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListAvailableSSLPredefinedPoliciesPager) { - a.newListAvailableSSLPredefinedPoliciesPager = nil + if !server.PagerResponderMore(newListAvailableSSLPredefinedPoliciesPager) { + a.newListAvailableSSLPredefinedPoliciesPager.remove(req) } return resp, nil } @@ -653,7 +685,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStart(req *http.Reques if a.srv.BeginStart == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStart not implemented")} } - if a.beginStart == nil { + beginStart := a.beginStart.get(req) + if beginStart == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -672,19 +705,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStart(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginStart = &respr + beginStart = &respr + a.beginStart.add(req, beginStart) } - resp, err := server.PollerResponderNext(a.beginStart, req) + resp, err := server.PollerResponderNext(beginStart, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginStart.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginStart) { - a.beginStart = nil + if !server.PollerResponderMore(beginStart) { + a.beginStart.remove(req) } return resp, nil @@ -694,7 +729,8 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStop(req *http.Request if a.srv.BeginStop == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")} } - if a.beginStop == nil { + beginStop := a.beginStop.get(req) + if beginStop == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -713,19 +749,21 @@ func (a *ApplicationGatewaysServerTransport) dispatchBeginStop(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginStop = &respr + beginStop = &respr + a.beginStop.add(req, beginStop) } - resp, err := server.PollerResponderNext(a.beginStop, req) + resp, err := server.PollerResponderNext(beginStop, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginStop.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginStop) { - a.beginStop = nil + if !server.PollerResponderMore(beginStop) { + a.beginStop.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifests_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifests_server.go index fbcbc3256d06..46d291d4e018 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifests_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifests_server.go @@ -29,17 +29,20 @@ type ApplicationGatewayWafDynamicManifestsServer struct { } // NewApplicationGatewayWafDynamicManifestsServerTransport creates a new instance of ApplicationGatewayWafDynamicManifestsServerTransport with the provided implementation. -// The returned ApplicationGatewayWafDynamicManifestsServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayWafDynamicManifestsClient by way of the -// undefined.Transporter field. +// The returned ApplicationGatewayWafDynamicManifestsServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayWafDynamicManifestsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationGatewayWafDynamicManifestsServerTransport(srv *ApplicationGatewayWafDynamicManifestsServer) *ApplicationGatewayWafDynamicManifestsServerTransport { - return &ApplicationGatewayWafDynamicManifestsServerTransport{srv: srv} + return &ApplicationGatewayWafDynamicManifestsServerTransport{ + srv: srv, + newGetPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse]](), + } } // ApplicationGatewayWafDynamicManifestsServerTransport connects instances of armnetwork.ApplicationGatewayWafDynamicManifestsClient to instances of ApplicationGatewayWafDynamicManifestsServer. // Don't use this type directly, use NewApplicationGatewayWafDynamicManifestsServerTransport instead. type ApplicationGatewayWafDynamicManifestsServerTransport struct { srv *ApplicationGatewayWafDynamicManifestsServer - newGetPager *azfake.PagerResponder[armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse] + newGetPager *tracker[azfake.PagerResponder[armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse]] } // Do implements the policy.Transporter interface for ApplicationGatewayWafDynamicManifestsServerTransport. @@ -71,7 +74,8 @@ func (a *ApplicationGatewayWafDynamicManifestsServerTransport) dispatchNewGetPag if a.srv.NewGetPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewGetPager not implemented")} } - if a.newGetPager == nil { + newGetPager := a.newGetPager.get(req) + if newGetPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/applicationGatewayWafDynamicManifests` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -83,20 +87,22 @@ func (a *ApplicationGatewayWafDynamicManifestsServerTransport) dispatchNewGetPag return nil, err } resp := a.srv.NewGetPager(locationUnescaped, nil) - a.newGetPager = &resp - server.PagerResponderInjectNextLinks(a.newGetPager, req, func(page *armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse, createLink func() string) { + newGetPager = &resp + a.newGetPager.add(req, newGetPager) + server.PagerResponderInjectNextLinks(newGetPager, req, func(page *armnetwork.ApplicationGatewayWafDynamicManifestsClientGetResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newGetPager, req) + resp, err := server.PagerResponderNext(newGetPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newGetPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newGetPager) { - a.newGetPager = nil + if !server.PagerResponderMore(newGetPager) { + a.newGetPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifestsdefault_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifestsdefault_server.go index 0223dd22626b..b01babb78873 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifestsdefault_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationgatewaywafdynamicmanifestsdefault_server.go @@ -29,8 +29,8 @@ type ApplicationGatewayWafDynamicManifestsDefaultServer struct { } // NewApplicationGatewayWafDynamicManifestsDefaultServerTransport creates a new instance of ApplicationGatewayWafDynamicManifestsDefaultServerTransport with the provided implementation. -// The returned ApplicationGatewayWafDynamicManifestsDefaultServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayWafDynamicManifestsDefaultClient by way of the -// undefined.Transporter field. +// The returned ApplicationGatewayWafDynamicManifestsDefaultServerTransport instance is connected to an instance of armnetwork.ApplicationGatewayWafDynamicManifestsDefaultClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationGatewayWafDynamicManifestsDefaultServerTransport(srv *ApplicationGatewayWafDynamicManifestsDefaultServer) *ApplicationGatewayWafDynamicManifestsDefaultServerTransport { return &ApplicationGatewayWafDynamicManifestsDefaultServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/applicationsecuritygroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/applicationsecuritygroups_server.go index 0d5b13887e21..d0e76b0eb32b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/applicationsecuritygroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/applicationsecuritygroups_server.go @@ -50,20 +50,26 @@ type ApplicationSecurityGroupsServer struct { } // NewApplicationSecurityGroupsServerTransport creates a new instance of ApplicationSecurityGroupsServerTransport with the provided implementation. -// The returned ApplicationSecurityGroupsServerTransport instance is connected to an instance of armnetwork.ApplicationSecurityGroupsClient by way of the -// undefined.Transporter field. +// The returned ApplicationSecurityGroupsServerTransport instance is connected to an instance of armnetwork.ApplicationSecurityGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewApplicationSecurityGroupsServerTransport(srv *ApplicationSecurityGroupsServer) *ApplicationSecurityGroupsServerTransport { - return &ApplicationSecurityGroupsServerTransport{srv: srv} + return &ApplicationSecurityGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListAllResponse]](), + } } // ApplicationSecurityGroupsServerTransport connects instances of armnetwork.ApplicationSecurityGroupsClient to instances of ApplicationSecurityGroupsServer. // Don't use this type directly, use NewApplicationSecurityGroupsServerTransport instead. type ApplicationSecurityGroupsServerTransport struct { srv *ApplicationSecurityGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ApplicationSecurityGroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.ApplicationSecurityGroupsClientListAllResponse]] } // Do implements the policy.Transporter interface for ApplicationSecurityGroupsServerTransport. @@ -105,7 +111,8 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(r if a.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if a.beginCreateOrUpdate == nil { + beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(a.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + a.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginCreateOrUpdate) { - a.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + a.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginDelete(req *http if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchBeginDelete(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListPager(req *htt if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -236,20 +249,22 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListPager(req *htt return nil, err } resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.ApplicationSecurityGroupsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ApplicationSecurityGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -258,7 +273,8 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListAllPager(req * if a.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if a.newListAllPager == nil { + newListAllPager := a.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/applicationSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (a *ApplicationSecurityGroupsServerTransport) dispatchNewListAllPager(req * return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListAllPager(nil) - a.newListAllPager = &resp - server.PagerResponderInjectNextLinks(a.newListAllPager, req, func(page *armnetwork.ApplicationSecurityGroupsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + a.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.ApplicationSecurityGroupsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListAllPager) { - a.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + a.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/availabledelegations_server.go b/sdk/resourcemanager/network/armnetwork/fake/availabledelegations_server.go index b0ca82084317..08828c82fb43 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/availabledelegations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/availabledelegations_server.go @@ -29,17 +29,20 @@ type AvailableDelegationsServer struct { } // NewAvailableDelegationsServerTransport creates a new instance of AvailableDelegationsServerTransport with the provided implementation. -// The returned AvailableDelegationsServerTransport instance is connected to an instance of armnetwork.AvailableDelegationsClient by way of the -// undefined.Transporter field. +// The returned AvailableDelegationsServerTransport instance is connected to an instance of armnetwork.AvailableDelegationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAvailableDelegationsServerTransport(srv *AvailableDelegationsServer) *AvailableDelegationsServerTransport { - return &AvailableDelegationsServerTransport{srv: srv} + return &AvailableDelegationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.AvailableDelegationsClientListResponse]](), + } } // AvailableDelegationsServerTransport connects instances of armnetwork.AvailableDelegationsClient to instances of AvailableDelegationsServer. // Don't use this type directly, use NewAvailableDelegationsServerTransport instead. type AvailableDelegationsServerTransport struct { srv *AvailableDelegationsServer - newListPager *azfake.PagerResponder[armnetwork.AvailableDelegationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.AvailableDelegationsClientListResponse]] } // Do implements the policy.Transporter interface for AvailableDelegationsServerTransport. @@ -71,7 +74,8 @@ func (a *AvailableDelegationsServerTransport) dispatchNewListPager(req *http.Req if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -83,20 +87,22 @@ func (a *AvailableDelegationsServerTransport) dispatchNewListPager(req *http.Req return nil, err } resp := a.srv.NewListPager(locationUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AvailableDelegationsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableDelegationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/availableendpointservices_server.go b/sdk/resourcemanager/network/armnetwork/fake/availableendpointservices_server.go index 45b992695376..96a17d302a40 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/availableendpointservices_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/availableendpointservices_server.go @@ -29,17 +29,20 @@ type AvailableEndpointServicesServer struct { } // NewAvailableEndpointServicesServerTransport creates a new instance of AvailableEndpointServicesServerTransport with the provided implementation. -// The returned AvailableEndpointServicesServerTransport instance is connected to an instance of armnetwork.AvailableEndpointServicesClient by way of the -// undefined.Transporter field. +// The returned AvailableEndpointServicesServerTransport instance is connected to an instance of armnetwork.AvailableEndpointServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAvailableEndpointServicesServerTransport(srv *AvailableEndpointServicesServer) *AvailableEndpointServicesServerTransport { - return &AvailableEndpointServicesServerTransport{srv: srv} + return &AvailableEndpointServicesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.AvailableEndpointServicesClientListResponse]](), + } } // AvailableEndpointServicesServerTransport connects instances of armnetwork.AvailableEndpointServicesClient to instances of AvailableEndpointServicesServer. // Don't use this type directly, use NewAvailableEndpointServicesServerTransport instead. type AvailableEndpointServicesServerTransport struct { srv *AvailableEndpointServicesServer - newListPager *azfake.PagerResponder[armnetwork.AvailableEndpointServicesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.AvailableEndpointServicesClientListResponse]] } // Do implements the policy.Transporter interface for AvailableEndpointServicesServerTransport. @@ -71,7 +74,8 @@ func (a *AvailableEndpointServicesServerTransport) dispatchNewListPager(req *htt if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkAvailableEndpointServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -83,20 +87,22 @@ func (a *AvailableEndpointServicesServerTransport) dispatchNewListPager(req *htt return nil, err } resp := a.srv.NewListPager(locationUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AvailableEndpointServicesClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableEndpointServicesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/availableprivateendpointtypes_server.go b/sdk/resourcemanager/network/armnetwork/fake/availableprivateendpointtypes_server.go index cf120bbb7a63..9ea29a903fa0 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/availableprivateendpointtypes_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/availableprivateendpointtypes_server.go @@ -33,18 +33,22 @@ type AvailablePrivateEndpointTypesServer struct { } // NewAvailablePrivateEndpointTypesServerTransport creates a new instance of AvailablePrivateEndpointTypesServerTransport with the provided implementation. -// The returned AvailablePrivateEndpointTypesServerTransport instance is connected to an instance of armnetwork.AvailablePrivateEndpointTypesClient by way of the -// undefined.Transporter field. +// The returned AvailablePrivateEndpointTypesServerTransport instance is connected to an instance of armnetwork.AvailablePrivateEndpointTypesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAvailablePrivateEndpointTypesServerTransport(srv *AvailablePrivateEndpointTypesServer) *AvailablePrivateEndpointTypesServerTransport { - return &AvailablePrivateEndpointTypesServerTransport{srv: srv} + return &AvailablePrivateEndpointTypesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse]](), + } } // AvailablePrivateEndpointTypesServerTransport connects instances of armnetwork.AvailablePrivateEndpointTypesClient to instances of AvailablePrivateEndpointTypesServer. // Don't use this type directly, use NewAvailablePrivateEndpointTypesServerTransport instead. type AvailablePrivateEndpointTypesServerTransport struct { srv *AvailablePrivateEndpointTypesServer - newListPager *azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for AvailablePrivateEndpointTypesServerTransport. @@ -78,7 +82,8 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListPager(req if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -90,20 +95,22 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListPager(req return nil, err } resp := a.srv.NewListPager(locationUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -112,7 +119,8 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListByResource if a.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if a.newListByResourceGroupPager == nil { + newListByResourceGroupPager := a.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availablePrivateEndpointTypes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,20 +136,22 @@ func (a *AvailablePrivateEndpointTypesServerTransport) dispatchNewListByResource return nil, err } resp := a.srv.NewListByResourceGroupPager(locationUnescaped, resourceGroupNameUnescaped, nil) - a.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(a.newListByResourceGroupPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + a.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.AvailablePrivateEndpointTypesClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListByResourceGroupPager) { - a.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + a.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/availableresourcegroupdelegations_server.go b/sdk/resourcemanager/network/armnetwork/fake/availableresourcegroupdelegations_server.go index 45e8f7b9ec87..584f8a18ae3b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/availableresourcegroupdelegations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/availableresourcegroupdelegations_server.go @@ -29,17 +29,20 @@ type AvailableResourceGroupDelegationsServer struct { } // NewAvailableResourceGroupDelegationsServerTransport creates a new instance of AvailableResourceGroupDelegationsServerTransport with the provided implementation. -// The returned AvailableResourceGroupDelegationsServerTransport instance is connected to an instance of armnetwork.AvailableResourceGroupDelegationsClient by way of the -// undefined.Transporter field. +// The returned AvailableResourceGroupDelegationsServerTransport instance is connected to an instance of armnetwork.AvailableResourceGroupDelegationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAvailableResourceGroupDelegationsServerTransport(srv *AvailableResourceGroupDelegationsServer) *AvailableResourceGroupDelegationsServerTransport { - return &AvailableResourceGroupDelegationsServerTransport{srv: srv} + return &AvailableResourceGroupDelegationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.AvailableResourceGroupDelegationsClientListResponse]](), + } } // AvailableResourceGroupDelegationsServerTransport connects instances of armnetwork.AvailableResourceGroupDelegationsClient to instances of AvailableResourceGroupDelegationsServer. // Don't use this type directly, use NewAvailableResourceGroupDelegationsServerTransport instead. type AvailableResourceGroupDelegationsServerTransport struct { srv *AvailableResourceGroupDelegationsServer - newListPager *azfake.PagerResponder[armnetwork.AvailableResourceGroupDelegationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.AvailableResourceGroupDelegationsClientListResponse]] } // Do implements the policy.Transporter interface for AvailableResourceGroupDelegationsServerTransport. @@ -71,7 +74,8 @@ func (a *AvailableResourceGroupDelegationsServerTransport) dispatchNewListPager( if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableDelegations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -87,20 +91,22 @@ func (a *AvailableResourceGroupDelegationsServerTransport) dispatchNewListPager( return nil, err } resp := a.srv.NewListPager(locationUnescaped, resourceGroupNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AvailableResourceGroupDelegationsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableResourceGroupDelegationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/availableservicealiases_server.go b/sdk/resourcemanager/network/armnetwork/fake/availableservicealiases_server.go index 07f28072c656..a9743d196350 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/availableservicealiases_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/availableservicealiases_server.go @@ -33,18 +33,22 @@ type AvailableServiceAliasesServer struct { } // NewAvailableServiceAliasesServerTransport creates a new instance of AvailableServiceAliasesServerTransport with the provided implementation. -// The returned AvailableServiceAliasesServerTransport instance is connected to an instance of armnetwork.AvailableServiceAliasesClient by way of the -// undefined.Transporter field. +// The returned AvailableServiceAliasesServerTransport instance is connected to an instance of armnetwork.AvailableServiceAliasesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAvailableServiceAliasesServerTransport(srv *AvailableServiceAliasesServer) *AvailableServiceAliasesServerTransport { - return &AvailableServiceAliasesServerTransport{srv: srv} + return &AvailableServiceAliasesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse]](), + } } // AvailableServiceAliasesServerTransport connects instances of armnetwork.AvailableServiceAliasesClient to instances of AvailableServiceAliasesServer. // Don't use this type directly, use NewAvailableServiceAliasesServerTransport instead. type AvailableServiceAliasesServerTransport struct { srv *AvailableServiceAliasesServer - newListPager *azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for AvailableServiceAliasesServerTransport. @@ -78,7 +82,8 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListPager(req *http. if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -90,20 +95,22 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListPager(req *http. return nil, err } resp := a.srv.NewListPager(locationUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AvailableServiceAliasesClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AvailableServiceAliasesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -112,7 +119,8 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListByResourceGroupP if a.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if a.newListByResourceGroupPager == nil { + newListByResourceGroupPager := a.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableServiceAliases` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,20 +136,22 @@ func (a *AvailableServiceAliasesServerTransport) dispatchNewListByResourceGroupP return nil, err } resp := a.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, locationUnescaped, nil) - a.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(a.newListByResourceGroupPager, req, func(page *armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + a.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.AvailableServiceAliasesClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListByResourceGroupPager) { - a.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + a.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/azurefirewallfqdntags_server.go b/sdk/resourcemanager/network/armnetwork/fake/azurefirewallfqdntags_server.go index 491c891f6960..2508e3f2a98a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/azurefirewallfqdntags_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/azurefirewallfqdntags_server.go @@ -28,17 +28,20 @@ type AzureFirewallFqdnTagsServer struct { } // NewAzureFirewallFqdnTagsServerTransport creates a new instance of AzureFirewallFqdnTagsServerTransport with the provided implementation. -// The returned AzureFirewallFqdnTagsServerTransport instance is connected to an instance of armnetwork.AzureFirewallFqdnTagsClient by way of the -// undefined.Transporter field. +// The returned AzureFirewallFqdnTagsServerTransport instance is connected to an instance of armnetwork.AzureFirewallFqdnTagsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAzureFirewallFqdnTagsServerTransport(srv *AzureFirewallFqdnTagsServer) *AzureFirewallFqdnTagsServerTransport { - return &AzureFirewallFqdnTagsServerTransport{srv: srv} + return &AzureFirewallFqdnTagsServerTransport{ + srv: srv, + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.AzureFirewallFqdnTagsClientListAllResponse]](), + } } // AzureFirewallFqdnTagsServerTransport connects instances of armnetwork.AzureFirewallFqdnTagsClient to instances of AzureFirewallFqdnTagsServer. // Don't use this type directly, use NewAzureFirewallFqdnTagsServerTransport instead. type AzureFirewallFqdnTagsServerTransport struct { srv *AzureFirewallFqdnTagsServer - newListAllPager *azfake.PagerResponder[armnetwork.AzureFirewallFqdnTagsClientListAllResponse] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.AzureFirewallFqdnTagsClientListAllResponse]] } // Do implements the policy.Transporter interface for AzureFirewallFqdnTagsServerTransport. @@ -70,7 +73,8 @@ func (a *AzureFirewallFqdnTagsServerTransport) dispatchNewListAllPager(req *http if a.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if a.newListAllPager == nil { + newListAllPager := a.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewallFqdnTags` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -78,20 +82,22 @@ func (a *AzureFirewallFqdnTagsServerTransport) dispatchNewListAllPager(req *http return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListAllPager(nil) - a.newListAllPager = &resp - server.PagerResponderInjectNextLinks(a.newListAllPager, req, func(page *armnetwork.AzureFirewallFqdnTagsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + a.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.AzureFirewallFqdnTagsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListAllPager) { - a.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + a.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/azurefirewalls_server.go b/sdk/resourcemanager/network/armnetwork/fake/azurefirewalls_server.go index 2431a483e92a..2ee33b85f87f 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/azurefirewalls_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/azurefirewalls_server.go @@ -58,23 +58,32 @@ type AzureFirewallsServer struct { } // NewAzureFirewallsServerTransport creates a new instance of AzureFirewallsServerTransport with the provided implementation. -// The returned AzureFirewallsServerTransport instance is connected to an instance of armnetwork.AzureFirewallsClient by way of the -// undefined.Transporter field. +// The returned AzureFirewallsServerTransport instance is connected to an instance of armnetwork.AzureFirewallsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAzureFirewallsServerTransport(srv *AzureFirewallsServer) *AzureFirewallsServerTransport { - return &AzureFirewallsServerTransport{srv: srv} + return &AzureFirewallsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.AzureFirewallsClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.AzureFirewallsClientListAllResponse]](), + beginListLearnedPrefixes: newTracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientListLearnedPrefixesResponse]](), + beginPacketCapture: newTracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientPacketCaptureResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientUpdateTagsResponse]](), + } } // AzureFirewallsServerTransport connects instances of armnetwork.AzureFirewallsClient to instances of AzureFirewallsServer. // Don't use this type directly, use NewAzureFirewallsServerTransport instead. type AzureFirewallsServerTransport struct { srv *AzureFirewallsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.AzureFirewallsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.AzureFirewallsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.AzureFirewallsClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.AzureFirewallsClientListAllResponse] - beginListLearnedPrefixes *azfake.PollerResponder[armnetwork.AzureFirewallsClientListLearnedPrefixesResponse] - beginPacketCapture *azfake.PollerResponder[armnetwork.AzureFirewallsClientPacketCaptureResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.AzureFirewallsClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.AzureFirewallsClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.AzureFirewallsClientListAllResponse]] + beginListLearnedPrefixes *tracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientListLearnedPrefixesResponse]] + beginPacketCapture *tracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientPacketCaptureResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.AzureFirewallsClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for AzureFirewallsServerTransport. @@ -120,7 +129,8 @@ func (a *AzureFirewallsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if a.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if a.beginCreateOrUpdate == nil { + beginCreateOrUpdate := a.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -143,19 +153,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + a.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(a.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + a.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginCreateOrUpdate) { - a.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + a.beginCreateOrUpdate.remove(req) } return resp, nil @@ -165,7 +177,8 @@ func (a *AzureFirewallsServerTransport) dispatchBeginDelete(req *http.Request) ( if a.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if a.beginDelete == nil { + beginDelete := a.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -184,19 +197,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginDelete = &respr + beginDelete = &respr + a.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(a.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + a.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginDelete) { - a.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + a.beginDelete.remove(req) } return resp, nil @@ -239,7 +254,8 @@ func (a *AzureFirewallsServerTransport) dispatchNewListPager(req *http.Request) if a.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if a.newListPager == nil { + newListPager := a.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -251,20 +267,22 @@ func (a *AzureFirewallsServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := a.srv.NewListPager(resourceGroupNameUnescaped, nil) - a.newListPager = &resp - server.PagerResponderInjectNextLinks(a.newListPager, req, func(page *armnetwork.AzureFirewallsClientListResponse, createLink func() string) { + newListPager = &resp + a.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.AzureFirewallsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListPager) { - a.newListPager = nil + if !server.PagerResponderMore(newListPager) { + a.newListPager.remove(req) } return resp, nil } @@ -273,7 +291,8 @@ func (a *AzureFirewallsServerTransport) dispatchNewListAllPager(req *http.Reques if a.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if a.newListAllPager == nil { + newListAllPager := a.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -281,20 +300,22 @@ func (a *AzureFirewallsServerTransport) dispatchNewListAllPager(req *http.Reques return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := a.srv.NewListAllPager(nil) - a.newListAllPager = &resp - server.PagerResponderInjectNextLinks(a.newListAllPager, req, func(page *armnetwork.AzureFirewallsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + a.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.AzureFirewallsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(a.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(a.newListAllPager) { - a.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + a.newListAllPager.remove(req) } return resp, nil } @@ -303,7 +324,8 @@ func (a *AzureFirewallsServerTransport) dispatchBeginListLearnedPrefixes(req *ht if a.srv.BeginListLearnedPrefixes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListLearnedPrefixes not implemented")} } - if a.beginListLearnedPrefixes == nil { + beginListLearnedPrefixes := a.beginListLearnedPrefixes.get(req) + if beginListLearnedPrefixes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -322,19 +344,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginListLearnedPrefixes(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginListLearnedPrefixes = &respr + beginListLearnedPrefixes = &respr + a.beginListLearnedPrefixes.add(req, beginListLearnedPrefixes) } - resp, err := server.PollerResponderNext(a.beginListLearnedPrefixes, req) + resp, err := server.PollerResponderNext(beginListLearnedPrefixes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginListLearnedPrefixes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginListLearnedPrefixes) { - a.beginListLearnedPrefixes = nil + if !server.PollerResponderMore(beginListLearnedPrefixes) { + a.beginListLearnedPrefixes.remove(req) } return resp, nil @@ -344,7 +368,8 @@ func (a *AzureFirewallsServerTransport) dispatchBeginPacketCapture(req *http.Req if a.srv.BeginPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginPacketCapture not implemented")} } - if a.beginPacketCapture == nil { + beginPacketCapture := a.beginPacketCapture.get(req) + if beginPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -367,19 +392,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginPacketCapture(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginPacketCapture = &respr + beginPacketCapture = &respr + a.beginPacketCapture.add(req, beginPacketCapture) } - resp, err := server.PollerResponderNext(a.beginPacketCapture, req) + resp, err := server.PollerResponderNext(beginPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + a.beginPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginPacketCapture) { - a.beginPacketCapture = nil + if !server.PollerResponderMore(beginPacketCapture) { + a.beginPacketCapture.remove(req) } return resp, nil @@ -389,7 +416,8 @@ func (a *AzureFirewallsServerTransport) dispatchBeginUpdateTags(req *http.Reques if a.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if a.beginUpdateTags == nil { + beginUpdateTags := a.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureFirewalls/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -412,19 +440,21 @@ func (a *AzureFirewallsServerTransport) dispatchBeginUpdateTags(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - a.beginUpdateTags = &respr + beginUpdateTags = &respr + a.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(a.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + a.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(a.beginUpdateTags) { - a.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + a.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/bastionhosts_server.go b/sdk/resourcemanager/network/armnetwork/fake/bastionhosts_server.go index 15970b25036a..d09e22065b52 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/bastionhosts_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/bastionhosts_server.go @@ -50,21 +50,28 @@ type BastionHostsServer struct { } // NewBastionHostsServerTransport creates a new instance of BastionHostsServerTransport with the provided implementation. -// The returned BastionHostsServerTransport instance is connected to an instance of armnetwork.BastionHostsClient by way of the -// undefined.Transporter field. +// The returned BastionHostsServerTransport instance is connected to an instance of armnetwork.BastionHostsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewBastionHostsServerTransport(srv *BastionHostsServer) *BastionHostsServerTransport { - return &BastionHostsServerTransport{srv: srv} + return &BastionHostsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.BastionHostsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.BastionHostsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.BastionHostsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.BastionHostsClientListByResourceGroupResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.BastionHostsClientUpdateTagsResponse]](), + } } // BastionHostsServerTransport connects instances of armnetwork.BastionHostsClient to instances of BastionHostsServer. // Don't use this type directly, use NewBastionHostsServerTransport instead. type BastionHostsServerTransport struct { srv *BastionHostsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.BastionHostsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.BastionHostsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.BastionHostsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.BastionHostsClientListByResourceGroupResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.BastionHostsClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.BastionHostsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.BastionHostsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.BastionHostsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.BastionHostsClientListByResourceGroupResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.BastionHostsClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for BastionHostsServerTransport. @@ -106,7 +113,8 @@ func (b *BastionHostsServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if b.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if b.beginCreateOrUpdate == nil { + beginCreateOrUpdate := b.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -129,19 +137,21 @@ func (b *BastionHostsServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - b.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + b.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(b.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + b.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(b.beginCreateOrUpdate) { - b.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + b.beginCreateOrUpdate.remove(req) } return resp, nil @@ -151,7 +161,8 @@ func (b *BastionHostsServerTransport) dispatchBeginDelete(req *http.Request) (*h if b.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if b.beginDelete == nil { + beginDelete := b.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -170,19 +181,21 @@ func (b *BastionHostsServerTransport) dispatchBeginDelete(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - b.beginDelete = &respr + beginDelete = &respr + b.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(b.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + b.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(b.beginDelete) { - b.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + b.beginDelete.remove(req) } return resp, nil @@ -225,7 +238,8 @@ func (b *BastionHostsServerTransport) dispatchNewListPager(req *http.Request) (* if b.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if b.newListPager == nil { + newListPager := b.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -233,20 +247,22 @@ func (b *BastionHostsServerTransport) dispatchNewListPager(req *http.Request) (* return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := b.srv.NewListPager(nil) - b.newListPager = &resp - server.PagerResponderInjectNextLinks(b.newListPager, req, func(page *armnetwork.BastionHostsClientListResponse, createLink func() string) { + newListPager = &resp + b.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.BastionHostsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(b.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListPager) { - b.newListPager = nil + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) } return resp, nil } @@ -255,7 +271,8 @@ func (b *BastionHostsServerTransport) dispatchNewListByResourceGroupPager(req *h if b.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if b.newListByResourceGroupPager == nil { + newListByResourceGroupPager := b.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -267,20 +284,22 @@ func (b *BastionHostsServerTransport) dispatchNewListByResourceGroupPager(req *h return nil, err } resp := b.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - b.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(b.newListByResourceGroupPager, req, func(page *armnetwork.BastionHostsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + b.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.BastionHostsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(b.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListByResourceGroupPager) { - b.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + b.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -289,7 +308,8 @@ func (b *BastionHostsServerTransport) dispatchBeginUpdateTags(req *http.Request) if b.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if b.beginUpdateTags == nil { + beginUpdateTags := b.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -312,19 +332,21 @@ func (b *BastionHostsServerTransport) dispatchBeginUpdateTags(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - b.beginUpdateTags = &respr + beginUpdateTags = &respr + b.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(b.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + b.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(b.beginUpdateTags) { - b.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + b.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/bgpservicecommunities_server.go b/sdk/resourcemanager/network/armnetwork/fake/bgpservicecommunities_server.go index 58b60768fa54..cc394108f218 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/bgpservicecommunities_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/bgpservicecommunities_server.go @@ -28,17 +28,20 @@ type BgpServiceCommunitiesServer struct { } // NewBgpServiceCommunitiesServerTransport creates a new instance of BgpServiceCommunitiesServerTransport with the provided implementation. -// The returned BgpServiceCommunitiesServerTransport instance is connected to an instance of armnetwork.BgpServiceCommunitiesClient by way of the -// undefined.Transporter field. +// The returned BgpServiceCommunitiesServerTransport instance is connected to an instance of armnetwork.BgpServiceCommunitiesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewBgpServiceCommunitiesServerTransport(srv *BgpServiceCommunitiesServer) *BgpServiceCommunitiesServerTransport { - return &BgpServiceCommunitiesServerTransport{srv: srv} + return &BgpServiceCommunitiesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.BgpServiceCommunitiesClientListResponse]](), + } } // BgpServiceCommunitiesServerTransport connects instances of armnetwork.BgpServiceCommunitiesClient to instances of BgpServiceCommunitiesServer. // Don't use this type directly, use NewBgpServiceCommunitiesServerTransport instead. type BgpServiceCommunitiesServerTransport struct { srv *BgpServiceCommunitiesServer - newListPager *azfake.PagerResponder[armnetwork.BgpServiceCommunitiesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.BgpServiceCommunitiesClientListResponse]] } // Do implements the policy.Transporter interface for BgpServiceCommunitiesServerTransport. @@ -70,7 +73,8 @@ func (b *BgpServiceCommunitiesServerTransport) dispatchNewListPager(req *http.Re if b.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if b.newListPager == nil { + newListPager := b.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bgpServiceCommunities` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -78,20 +82,22 @@ func (b *BgpServiceCommunitiesServerTransport) dispatchNewListPager(req *http.Re return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := b.srv.NewListPager(nil) - b.newListPager = &resp - server.PagerResponderInjectNextLinks(b.newListPager, req, func(page *armnetwork.BgpServiceCommunitiesClientListResponse, createLink func() string) { + newListPager = &resp + b.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.BgpServiceCommunitiesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(b.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + b.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(b.newListPager) { - b.newListPager = nil + if !server.PagerResponderMore(newListPager) { + b.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/configurationpolicygroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/configurationpolicygroups_server.go index 546276d6349c..1726e7e10b78 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/configurationpolicygroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/configurationpolicygroups_server.go @@ -42,19 +42,24 @@ type ConfigurationPolicyGroupsServer struct { } // NewConfigurationPolicyGroupsServerTransport creates a new instance of ConfigurationPolicyGroupsServerTransport with the provided implementation. -// The returned ConfigurationPolicyGroupsServerTransport instance is connected to an instance of armnetwork.ConfigurationPolicyGroupsClient by way of the -// undefined.Transporter field. +// The returned ConfigurationPolicyGroupsServerTransport instance is connected to an instance of armnetwork.ConfigurationPolicyGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewConfigurationPolicyGroupsServerTransport(srv *ConfigurationPolicyGroupsServer) *ConfigurationPolicyGroupsServerTransport { - return &ConfigurationPolicyGroupsServerTransport{srv: srv} + return &ConfigurationPolicyGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientDeleteResponse]](), + newListByVPNServerConfigurationPager: newTracker[azfake.PagerResponder[armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse]](), + } } // ConfigurationPolicyGroupsServerTransport connects instances of armnetwork.ConfigurationPolicyGroupsClient to instances of ConfigurationPolicyGroupsServer. // Don't use this type directly, use NewConfigurationPolicyGroupsServerTransport instead. type ConfigurationPolicyGroupsServerTransport struct { srv *ConfigurationPolicyGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientDeleteResponse] - newListByVPNServerConfigurationPager *azfake.PagerResponder[armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ConfigurationPolicyGroupsClientDeleteResponse]] + newListByVPNServerConfigurationPager *tracker[azfake.PagerResponder[armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse]] } // Do implements the policy.Transporter interface for ConfigurationPolicyGroupsServerTransport. @@ -92,7 +97,8 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginCreateOrUpdate(r if c.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if c.beginCreateOrUpdate == nil { + beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginCreateOrUpdate(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + c.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(c.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginCreateOrUpdate) { - c.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + c.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginDelete(req *http if c.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if c.beginDelete == nil { + beginDelete := c.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchBeginDelete(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginDelete = &respr + beginDelete = &respr + c.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(c.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + c.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginDelete) { - c.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + c.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchNewListByVPNServerCon if c.srv.NewListByVPNServerConfigurationPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVPNServerConfigurationPager not implemented")} } - if c.newListByVPNServerConfigurationPager == nil { + newListByVPNServerConfigurationPager := c.newListByVPNServerConfigurationPager.get(req) + if newListByVPNServerConfigurationPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configurationPolicyGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (c *ConfigurationPolicyGroupsServerTransport) dispatchNewListByVPNServerCon return nil, err } resp := c.srv.NewListByVPNServerConfigurationPager(resourceGroupNameUnescaped, vpnServerConfigurationNameUnescaped, nil) - c.newListByVPNServerConfigurationPager = &resp - server.PagerResponderInjectNextLinks(c.newListByVPNServerConfigurationPager, req, func(page *armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, createLink func() string) { + newListByVPNServerConfigurationPager = &resp + c.newListByVPNServerConfigurationPager.add(req, newListByVPNServerConfigurationPager) + server.PagerResponderInjectNextLinks(newListByVPNServerConfigurationPager, req, func(page *armnetwork.ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(c.newListByVPNServerConfigurationPager, req) + resp, err := server.PagerResponderNext(newListByVPNServerConfigurationPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListByVPNServerConfigurationPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(c.newListByVPNServerConfigurationPager) { - c.newListByVPNServerConfigurationPager = nil + if !server.PagerResponderMore(newListByVPNServerConfigurationPager) { + c.newListByVPNServerConfigurationPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/connectionmonitors_server.go b/sdk/resourcemanager/network/armnetwork/fake/connectionmonitors_server.go index e5c769b2e03e..3fa77e875838 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/connectionmonitors_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/connectionmonitors_server.go @@ -57,22 +57,30 @@ type ConnectionMonitorsServer struct { } // NewConnectionMonitorsServerTransport creates a new instance of ConnectionMonitorsServerTransport with the provided implementation. -// The returned ConnectionMonitorsServerTransport instance is connected to an instance of armnetwork.ConnectionMonitorsClient by way of the -// undefined.Transporter field. +// The returned ConnectionMonitorsServerTransport instance is connected to an instance of armnetwork.ConnectionMonitorsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewConnectionMonitorsServerTransport(srv *ConnectionMonitorsServer) *ConnectionMonitorsServerTransport { - return &ConnectionMonitorsServerTransport{srv: srv} + return &ConnectionMonitorsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ConnectionMonitorsClientListResponse]](), + beginQuery: newTracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientQueryResponse]](), + beginStart: newTracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStartResponse]](), + beginStop: newTracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStopResponse]](), + } } // ConnectionMonitorsServerTransport connects instances of armnetwork.ConnectionMonitorsClient to instances of ConnectionMonitorsServer. // Don't use this type directly, use NewConnectionMonitorsServerTransport instead. type ConnectionMonitorsServerTransport struct { srv *ConnectionMonitorsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ConnectionMonitorsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ConnectionMonitorsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ConnectionMonitorsClientListResponse] - beginQuery *azfake.PollerResponder[armnetwork.ConnectionMonitorsClientQueryResponse] - beginStart *azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStartResponse] - beginStop *azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStopResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ConnectionMonitorsClientListResponse]] + beginQuery *tracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientQueryResponse]] + beginStart *tracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStartResponse]] + beginStop *tracker[azfake.PollerResponder[armnetwork.ConnectionMonitorsClientStopResponse]] } // Do implements the policy.Transporter interface for ConnectionMonitorsServerTransport. @@ -118,7 +126,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginCreateOrUpdate(req *htt if c.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if c.beginCreateOrUpdate == nil { + beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -157,19 +166,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginCreateOrUpdate(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + c.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(c.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginCreateOrUpdate) { - c.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + c.beginCreateOrUpdate.remove(req) } return resp, nil @@ -179,7 +190,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginDelete(req *http.Reques if c.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if c.beginDelete == nil { + beginDelete := c.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -202,19 +214,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginDelete(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginDelete = &respr + beginDelete = &respr + c.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(c.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + c.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginDelete) { - c.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + c.beginDelete.remove(req) } return resp, nil @@ -261,7 +275,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchNewListPager(req *http.Reque if c.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if c.newListPager == nil { + newListPager := c.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -277,17 +292,19 @@ func (c *ConnectionMonitorsServerTransport) dispatchNewListPager(req *http.Reque return nil, err } resp := c.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) - c.newListPager = &resp + newListPager = &resp + c.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(c.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(c.newListPager) { - c.newListPager = nil + if !server.PagerResponderMore(newListPager) { + c.newListPager.remove(req) } return resp, nil } @@ -296,7 +313,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginQuery(req *http.Request if c.srv.BeginQuery == nil { return nil, &nonRetriableError{errors.New("fake for method BeginQuery not implemented")} } - if c.beginQuery == nil { + beginQuery := c.beginQuery.get(req) + if beginQuery == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/query` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -319,19 +337,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginQuery(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginQuery = &respr + beginQuery = &respr + c.beginQuery.add(req, beginQuery) } - resp, err := server.PollerResponderNext(c.beginQuery, req) + resp, err := server.PollerResponderNext(beginQuery, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + c.beginQuery.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginQuery) { - c.beginQuery = nil + if !server.PollerResponderMore(beginQuery) { + c.beginQuery.remove(req) } return resp, nil @@ -341,7 +361,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStart(req *http.Request if c.srv.BeginStart == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStart not implemented")} } - if c.beginStart == nil { + beginStart := c.beginStart.get(req) + if beginStart == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/start` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -364,19 +385,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStart(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginStart = &respr + beginStart = &respr + c.beginStart.add(req, beginStart) } - resp, err := server.PollerResponderNext(c.beginStart, req) + resp, err := server.PollerResponderNext(beginStart, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + c.beginStart.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginStart) { - c.beginStart = nil + if !server.PollerResponderMore(beginStart) { + c.beginStart.remove(req) } return resp, nil @@ -386,7 +409,8 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStop(req *http.Request) if c.srv.BeginStop == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")} } - if c.beginStop == nil { + beginStop := c.beginStop.get(req) + if beginStop == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectionMonitors/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -409,19 +433,21 @@ func (c *ConnectionMonitorsServerTransport) dispatchBeginStop(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginStop = &respr + beginStop = &respr + c.beginStop.add(req, beginStop) } - resp, err := server.PollerResponderNext(c.beginStop, req) + resp, err := server.PollerResponderNext(beginStop, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + c.beginStop.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginStop) { - c.beginStop = nil + if !server.PollerResponderMore(beginStop) { + c.beginStop.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/connectivityconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/connectivityconfigurations_server.go index d4eb7746c2da..b0929359ad6e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/connectivityconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/connectivityconfigurations_server.go @@ -43,18 +43,22 @@ type ConnectivityConfigurationsServer struct { } // NewConnectivityConfigurationsServerTransport creates a new instance of ConnectivityConfigurationsServerTransport with the provided implementation. -// The returned ConnectivityConfigurationsServerTransport instance is connected to an instance of armnetwork.ConnectivityConfigurationsClient by way of the -// undefined.Transporter field. +// The returned ConnectivityConfigurationsServerTransport instance is connected to an instance of armnetwork.ConnectivityConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewConnectivityConfigurationsServerTransport(srv *ConnectivityConfigurationsServer) *ConnectivityConfigurationsServerTransport { - return &ConnectivityConfigurationsServerTransport{srv: srv} + return &ConnectivityConfigurationsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ConnectivityConfigurationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ConnectivityConfigurationsClientListResponse]](), + } } // ConnectivityConfigurationsServerTransport connects instances of armnetwork.ConnectivityConfigurationsClient to instances of ConnectivityConfigurationsServer. // Don't use this type directly, use NewConnectivityConfigurationsServerTransport instead. type ConnectivityConfigurationsServerTransport struct { srv *ConnectivityConfigurationsServer - beginDelete *azfake.PollerResponder[armnetwork.ConnectivityConfigurationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ConnectivityConfigurationsClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ConnectivityConfigurationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ConnectivityConfigurationsClientListResponse]] } // Do implements the policy.Transporter interface for ConnectivityConfigurationsServerTransport. @@ -133,7 +137,8 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchBeginDelete(req *htt if c.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if c.beginDelete == nil { + beginDelete := c.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -171,19 +176,21 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchBeginDelete(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginDelete = &respr + beginDelete = &respr + c.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(c.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + c.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginDelete) { - c.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + c.beginDelete.remove(req) } return resp, nil @@ -230,7 +237,8 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchNewListPager(req *ht if c.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if c.newListPager == nil { + newListPager := c.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -273,20 +281,22 @@ func (c *ConnectivityConfigurationsServerTransport) dispatchNewListPager(req *ht } } resp := c.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) - c.newListPager = &resp - server.PagerResponderInjectNextLinks(c.newListPager, req, func(page *armnetwork.ConnectivityConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + c.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ConnectivityConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(c.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(c.newListPager) { - c.newListPager = nil + if !server.PagerResponderMore(newListPager) { + c.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/customipprefixes_server.go b/sdk/resourcemanager/network/armnetwork/fake/customipprefixes_server.go index ddb1da259cfe..f9e4713d3739 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/customipprefixes_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/customipprefixes_server.go @@ -50,20 +50,26 @@ type CustomIPPrefixesServer struct { } // NewCustomIPPrefixesServerTransport creates a new instance of CustomIPPrefixesServerTransport with the provided implementation. -// The returned CustomIPPrefixesServerTransport instance is connected to an instance of armnetwork.CustomIPPrefixesClient by way of the -// undefined.Transporter field. +// The returned CustomIPPrefixesServerTransport instance is connected to an instance of armnetwork.CustomIPPrefixesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewCustomIPPrefixesServerTransport(srv *CustomIPPrefixesServer) *CustomIPPrefixesServerTransport { - return &CustomIPPrefixesServerTransport{srv: srv} + return &CustomIPPrefixesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.CustomIPPrefixesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.CustomIPPrefixesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListAllResponse]](), + } } // CustomIPPrefixesServerTransport connects instances of armnetwork.CustomIPPrefixesClient to instances of CustomIPPrefixesServer. // Don't use this type directly, use NewCustomIPPrefixesServerTransport instead. type CustomIPPrefixesServerTransport struct { srv *CustomIPPrefixesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.CustomIPPrefixesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.CustomIPPrefixesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.CustomIPPrefixesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.CustomIPPrefixesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.CustomIPPrefixesClientListAllResponse]] } // Do implements the policy.Transporter interface for CustomIPPrefixesServerTransport. @@ -105,7 +111,8 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if c.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if c.beginCreateOrUpdate == nil { + beginCreateOrUpdate := c.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + c.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(c.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + c.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginCreateOrUpdate) { - c.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + c.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) if c.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if c.beginDelete == nil { + beginDelete := c.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (c *CustomIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - c.beginDelete = &respr + beginDelete = &respr + c.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(c.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + c.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(c.beginDelete) { - c.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + c.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListPager(req *http.Request if c.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if c.newListPager == nil { + newListPager := c.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListPager(req *http.Request return nil, err } resp := c.srv.NewListPager(resourceGroupNameUnescaped, nil) - c.newListPager = &resp - server.PagerResponderInjectNextLinks(c.newListPager, req, func(page *armnetwork.CustomIPPrefixesClientListResponse, createLink func() string) { + newListPager = &resp + c.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.CustomIPPrefixesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(c.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(c.newListPager) { - c.newListPager = nil + if !server.PagerResponderMore(newListPager) { + c.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ if c.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if c.newListAllPager == nil { + newListAllPager := c.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/customIpPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (c *CustomIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := c.srv.NewListAllPager(nil) - c.newListAllPager = &resp - server.PagerResponderInjectNextLinks(c.newListAllPager, req, func(page *armnetwork.CustomIPPrefixesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + c.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.CustomIPPrefixesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(c.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + c.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(c.newListAllPager) { - c.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + c.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/ddoscustompolicies_server.go b/sdk/resourcemanager/network/armnetwork/fake/ddoscustompolicies_server.go index 0842f0a0768d..986f30032fe8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/ddoscustompolicies_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/ddoscustompolicies_server.go @@ -41,18 +41,22 @@ type DdosCustomPoliciesServer struct { } // NewDdosCustomPoliciesServerTransport creates a new instance of DdosCustomPoliciesServerTransport with the provided implementation. -// The returned DdosCustomPoliciesServerTransport instance is connected to an instance of armnetwork.DdosCustomPoliciesClient by way of the -// undefined.Transporter field. +// The returned DdosCustomPoliciesServerTransport instance is connected to an instance of armnetwork.DdosCustomPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDdosCustomPoliciesServerTransport(srv *DdosCustomPoliciesServer) *DdosCustomPoliciesServerTransport { - return &DdosCustomPoliciesServerTransport{srv: srv} + return &DdosCustomPoliciesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientDeleteResponse]](), + } } // DdosCustomPoliciesServerTransport connects instances of armnetwork.DdosCustomPoliciesClient to instances of DdosCustomPoliciesServer. // Don't use this type directly, use NewDdosCustomPoliciesServerTransport instead. type DdosCustomPoliciesServerTransport struct { srv *DdosCustomPoliciesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientDeleteResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.DdosCustomPoliciesClientDeleteResponse]] } // Do implements the policy.Transporter interface for DdosCustomPoliciesServerTransport. @@ -90,7 +94,8 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *htt if d.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if d.beginCreateOrUpdate == nil { + beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -113,19 +118,21 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + d.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdate) { - d.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + d.beginCreateOrUpdate.remove(req) } return resp, nil @@ -135,7 +142,8 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginDelete(req *http.Reques if d.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if d.beginDelete == nil { + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosCustomPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -154,19 +162,21 @@ func (d *DdosCustomPoliciesServerTransport) dispatchBeginDelete(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDelete = &respr + beginDelete = &respr + d.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(d.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDelete) { - d.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/ddosprotectionplans_server.go b/sdk/resourcemanager/network/armnetwork/fake/ddosprotectionplans_server.go index 856810d1225d..bb4810d27441 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/ddosprotectionplans_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/ddosprotectionplans_server.go @@ -50,20 +50,26 @@ type DdosProtectionPlansServer struct { } // NewDdosProtectionPlansServerTransport creates a new instance of DdosProtectionPlansServerTransport with the provided implementation. -// The returned DdosProtectionPlansServerTransport instance is connected to an instance of armnetwork.DdosProtectionPlansClient by way of the -// undefined.Transporter field. +// The returned DdosProtectionPlansServerTransport instance is connected to an instance of armnetwork.DdosProtectionPlansClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDdosProtectionPlansServerTransport(srv *DdosProtectionPlansServer) *DdosProtectionPlansServerTransport { - return &DdosProtectionPlansServerTransport{srv: srv} + return &DdosProtectionPlansServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.DdosProtectionPlansClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.DdosProtectionPlansClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListByResourceGroupResponse]](), + } } // DdosProtectionPlansServerTransport connects instances of armnetwork.DdosProtectionPlansClient to instances of DdosProtectionPlansServer. // Don't use this type directly, use NewDdosProtectionPlansServerTransport instead. type DdosProtectionPlansServerTransport struct { srv *DdosProtectionPlansServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.DdosProtectionPlansClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.DdosProtectionPlansClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.DdosProtectionPlansClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.DdosProtectionPlansClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.DdosProtectionPlansClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for DdosProtectionPlansServerTransport. @@ -105,7 +111,8 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginCreateOrUpdate(req *ht if d.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if d.beginCreateOrUpdate == nil { + beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginCreateOrUpdate(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + d.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdate) { - d.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + d.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginDelete(req *http.Reque if d.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if d.beginDelete == nil { + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (d *DdosProtectionPlansServerTransport) dispatchBeginDelete(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDelete = &respr + beginDelete = &respr + d.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(d.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDelete) { - d.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListPager(req *http.Requ if d.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if d.newListPager == nil { + newListPager := d.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListPager(req *http.Requ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := d.srv.NewListPager(nil) - d.newListPager = &resp - server.PagerResponderInjectNextLinks(d.newListPager, req, func(page *armnetwork.DdosProtectionPlansClientListResponse, createLink func() string) { + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.DdosProtectionPlansClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListPager) { - d.newListPager = nil + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListByResourceGroupPager if d.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if d.newListByResourceGroupPager == nil { + newListByResourceGroupPager := d.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ddosProtectionPlans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (d *DdosProtectionPlansServerTransport) dispatchNewListByResourceGroupPager return nil, err } resp := d.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - d.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(d.newListByResourceGroupPager, req, func(page *armnetwork.DdosProtectionPlansClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + d.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.DdosProtectionPlansClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListByResourceGroupPager) { - d.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + d.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/defaultsecurityrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/defaultsecurityrules_server.go index a2b8c77fa181..6126fdcf5bae 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/defaultsecurityrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/defaultsecurityrules_server.go @@ -34,17 +34,20 @@ type DefaultSecurityRulesServer struct { } // NewDefaultSecurityRulesServerTransport creates a new instance of DefaultSecurityRulesServerTransport with the provided implementation. -// The returned DefaultSecurityRulesServerTransport instance is connected to an instance of armnetwork.DefaultSecurityRulesClient by way of the -// undefined.Transporter field. +// The returned DefaultSecurityRulesServerTransport instance is connected to an instance of armnetwork.DefaultSecurityRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDefaultSecurityRulesServerTransport(srv *DefaultSecurityRulesServer) *DefaultSecurityRulesServerTransport { - return &DefaultSecurityRulesServerTransport{srv: srv} + return &DefaultSecurityRulesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.DefaultSecurityRulesClientListResponse]](), + } } // DefaultSecurityRulesServerTransport connects instances of armnetwork.DefaultSecurityRulesClient to instances of DefaultSecurityRulesServer. // Don't use this type directly, use NewDefaultSecurityRulesServerTransport instead. type DefaultSecurityRulesServerTransport struct { srv *DefaultSecurityRulesServer - newListPager *azfake.PagerResponder[armnetwork.DefaultSecurityRulesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.DefaultSecurityRulesClientListResponse]] } // Do implements the policy.Transporter interface for DefaultSecurityRulesServerTransport. @@ -115,7 +118,8 @@ func (d *DefaultSecurityRulesServerTransport) dispatchNewListPager(req *http.Req if d.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if d.newListPager == nil { + newListPager := d.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/defaultSecurityRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (d *DefaultSecurityRulesServerTransport) dispatchNewListPager(req *http.Req return nil, err } resp := d.srv.NewListPager(resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, nil) - d.newListPager = &resp - server.PagerResponderInjectNextLinks(d.newListPager, req, func(page *armnetwork.DefaultSecurityRulesClientListResponse, createLink func() string) { + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.DefaultSecurityRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListPager) { - d.newListPager = nil + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/dscpconfiguration_server.go b/sdk/resourcemanager/network/armnetwork/fake/dscpconfiguration_server.go index 6e3f250394bb..1ea1e9e0e203 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/dscpconfiguration_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/dscpconfiguration_server.go @@ -46,20 +46,26 @@ type DscpConfigurationServer struct { } // NewDscpConfigurationServerTransport creates a new instance of DscpConfigurationServerTransport with the provided implementation. -// The returned DscpConfigurationServerTransport instance is connected to an instance of armnetwork.DscpConfigurationClient by way of the -// undefined.Transporter field. +// The returned DscpConfigurationServerTransport instance is connected to an instance of armnetwork.DscpConfigurationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewDscpConfigurationServerTransport(srv *DscpConfigurationServer) *DscpConfigurationServerTransport { - return &DscpConfigurationServerTransport{srv: srv} + return &DscpConfigurationServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.DscpConfigurationClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.DscpConfigurationClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.DscpConfigurationClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.DscpConfigurationClientListAllResponse]](), + } } // DscpConfigurationServerTransport connects instances of armnetwork.DscpConfigurationClient to instances of DscpConfigurationServer. // Don't use this type directly, use NewDscpConfigurationServerTransport instead. type DscpConfigurationServerTransport struct { srv *DscpConfigurationServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.DscpConfigurationClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.DscpConfigurationClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.DscpConfigurationClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.DscpConfigurationClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.DscpConfigurationClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.DscpConfigurationClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.DscpConfigurationClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.DscpConfigurationClientListAllResponse]] } // Do implements the policy.Transporter interface for DscpConfigurationServerTransport. @@ -99,7 +105,8 @@ func (d *DscpConfigurationServerTransport) dispatchBeginCreateOrUpdate(req *http if d.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if d.beginCreateOrUpdate == nil { + beginCreateOrUpdate := d.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -122,19 +129,21 @@ func (d *DscpConfigurationServerTransport) dispatchBeginCreateOrUpdate(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + d.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(d.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + d.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginCreateOrUpdate) { - d.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + d.beginCreateOrUpdate.remove(req) } return resp, nil @@ -144,7 +153,8 @@ func (d *DscpConfigurationServerTransport) dispatchBeginDelete(req *http.Request if d.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if d.beginDelete == nil { + beginDelete := d.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -163,19 +173,21 @@ func (d *DscpConfigurationServerTransport) dispatchBeginDelete(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - d.beginDelete = &respr + beginDelete = &respr + d.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(d.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + d.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(d.beginDelete) { - d.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + d.beginDelete.remove(req) } return resp, nil @@ -218,7 +230,8 @@ func (d *DscpConfigurationServerTransport) dispatchNewListPager(req *http.Reques if d.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if d.newListPager == nil { + newListPager := d.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -230,20 +243,22 @@ func (d *DscpConfigurationServerTransport) dispatchNewListPager(req *http.Reques return nil, err } resp := d.srv.NewListPager(resourceGroupNameUnescaped, nil) - d.newListPager = &resp - server.PagerResponderInjectNextLinks(d.newListPager, req, func(page *armnetwork.DscpConfigurationClientListResponse, createLink func() string) { + newListPager = &resp + d.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.DscpConfigurationClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListPager) { - d.newListPager = nil + if !server.PagerResponderMore(newListPager) { + d.newListPager.remove(req) } return resp, nil } @@ -252,7 +267,8 @@ func (d *DscpConfigurationServerTransport) dispatchNewListAllPager(req *http.Req if d.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if d.newListAllPager == nil { + newListAllPager := d.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/dscpConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -260,20 +276,22 @@ func (d *DscpConfigurationServerTransport) dispatchNewListAllPager(req *http.Req return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := d.srv.NewListAllPager(nil) - d.newListAllPager = &resp - server.PagerResponderInjectNextLinks(d.newListAllPager, req, func(page *armnetwork.DscpConfigurationClientListAllResponse, createLink func() string) { + newListAllPager = &resp + d.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.DscpConfigurationClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(d.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + d.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(d.newListAllPager) { - d.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + d.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitauthorizations_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitauthorizations_server.go index ebb9b749fc24..00d9557cee50 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitauthorizations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitauthorizations_server.go @@ -42,19 +42,24 @@ type ExpressRouteCircuitAuthorizationsServer struct { } // NewExpressRouteCircuitAuthorizationsServerTransport creates a new instance of ExpressRouteCircuitAuthorizationsServerTransport with the provided implementation. -// The returned ExpressRouteCircuitAuthorizationsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitAuthorizationsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCircuitAuthorizationsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitAuthorizationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCircuitAuthorizationsServerTransport(srv *ExpressRouteCircuitAuthorizationsServer) *ExpressRouteCircuitAuthorizationsServerTransport { - return &ExpressRouteCircuitAuthorizationsServerTransport{srv: srv} + return &ExpressRouteCircuitAuthorizationsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse]](), + } } // ExpressRouteCircuitAuthorizationsServerTransport connects instances of armnetwork.ExpressRouteCircuitAuthorizationsClient to instances of ExpressRouteCircuitAuthorizationsServer. // Don't use this type directly, use NewExpressRouteCircuitAuthorizationsServerTransport instead. type ExpressRouteCircuitAuthorizationsServerTransport struct { srv *ExpressRouteCircuitAuthorizationsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCircuitAuthorizationsServerTransport. @@ -92,7 +97,8 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginCreateOr if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginCreateOr if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginDelete(r if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchBeginDelete(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchNewListPager( if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (e *ExpressRouteCircuitAuthorizationsServerTransport) dispatchNewListPager( return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitAuthorizationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitconnections_server.go index abbd43d67e21..20f757fef396 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitconnections_server.go @@ -42,19 +42,24 @@ type ExpressRouteCircuitConnectionsServer struct { } // NewExpressRouteCircuitConnectionsServerTransport creates a new instance of ExpressRouteCircuitConnectionsServerTransport with the provided implementation. -// The returned ExpressRouteCircuitConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitConnectionsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCircuitConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCircuitConnectionsServerTransport(srv *ExpressRouteCircuitConnectionsServer) *ExpressRouteCircuitConnectionsServerTransport { - return &ExpressRouteCircuitConnectionsServerTransport{srv: srv} + return &ExpressRouteCircuitConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitConnectionsClientListResponse]](), + } } // ExpressRouteCircuitConnectionsServerTransport connects instances of armnetwork.ExpressRouteCircuitConnectionsClient to instances of ExpressRouteCircuitConnectionsServer. // Don't use this type directly, use NewExpressRouteCircuitConnectionsServerTransport instead. type ExpressRouteCircuitConnectionsServerTransport struct { srv *ExpressRouteCircuitConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCircuitConnectionsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitConnectionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCircuitConnectionsServerTransport. @@ -92,7 +97,8 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginCreateOrUpd if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -123,19 +129,21 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginCreateOrUpd if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -145,7 +153,8 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginDelete(req if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -172,19 +181,21 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchBeginDelete(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -235,7 +246,8 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager(req if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -255,20 +267,22 @@ func (e *ExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager(req return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitpeerings_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitpeerings_server.go index 2eaebd4c4ceb..c961cac5ae68 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitpeerings_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuitpeerings_server.go @@ -42,19 +42,24 @@ type ExpressRouteCircuitPeeringsServer struct { } // NewExpressRouteCircuitPeeringsServerTransport creates a new instance of ExpressRouteCircuitPeeringsServerTransport with the provided implementation. -// The returned ExpressRouteCircuitPeeringsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitPeeringsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCircuitPeeringsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitPeeringsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCircuitPeeringsServerTransport(srv *ExpressRouteCircuitPeeringsServer) *ExpressRouteCircuitPeeringsServerTransport { - return &ExpressRouteCircuitPeeringsServerTransport{srv: srv} + return &ExpressRouteCircuitPeeringsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitPeeringsClientListResponse]](), + } } // ExpressRouteCircuitPeeringsServerTransport connects instances of armnetwork.ExpressRouteCircuitPeeringsClient to instances of ExpressRouteCircuitPeeringsServer. // Don't use this type directly, use NewExpressRouteCircuitPeeringsServerTransport instead. type ExpressRouteCircuitPeeringsServerTransport struct { srv *ExpressRouteCircuitPeeringsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCircuitPeeringsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitPeeringsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitPeeringsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCircuitPeeringsServerTransport. @@ -92,7 +97,8 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginCreateOrUpdate if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginCreateOrUpdate if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginDelete(req *ht if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchBeginDelete(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchNewListPager(req *h if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (e *ExpressRouteCircuitPeeringsServerTransport) dispatchNewListPager(req *h return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCircuitPeeringsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitPeeringsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuits_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuits_server.go index 7a6fa6d378ae..d549964d6fbe 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuits_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecircuits_server.go @@ -70,23 +70,32 @@ type ExpressRouteCircuitsServer struct { } // NewExpressRouteCircuitsServerTransport creates a new instance of ExpressRouteCircuitsServerTransport with the provided implementation. -// The returned ExpressRouteCircuitsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCircuitsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCircuitsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCircuitsServerTransport(srv *ExpressRouteCircuitsServer) *ExpressRouteCircuitsServerTransport { - return &ExpressRouteCircuitsServerTransport{srv: srv} + return &ExpressRouteCircuitsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListAllResponse]](), + beginListArpTable: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListArpTableResponse]](), + beginListRoutesTable: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableResponse]](), + beginListRoutesTableSummary: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableSummaryResponse]](), + } } // ExpressRouteCircuitsServerTransport connects instances of armnetwork.ExpressRouteCircuitsClient to instances of ExpressRouteCircuitsServer. // Don't use this type directly, use NewExpressRouteCircuitsServerTransport instead. type ExpressRouteCircuitsServerTransport struct { srv *ExpressRouteCircuitsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListAllResponse] - beginListArpTable *azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListArpTableResponse] - beginListRoutesTable *azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableResponse] - beginListRoutesTableSummary *azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableSummaryResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCircuitsClientListAllResponse]] + beginListArpTable *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListArpTableResponse]] + beginListRoutesTable *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableResponse]] + beginListRoutesTableSummary *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCircuitsClientListRoutesTableSummaryResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCircuitsServerTransport. @@ -138,7 +147,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginCreateOrUpdate(req *h if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -161,19 +171,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginCreateOrUpdate(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -183,7 +195,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginDelete(req *http.Requ if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -202,19 +215,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginDelete(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -327,7 +342,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListPager(req *http.Req if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -339,20 +355,22 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListPager(req *http.Req return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCircuitsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCircuitsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } @@ -361,7 +379,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListAllPager(req *http. if e.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if e.newListAllPager == nil { + newListAllPager := e.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -369,20 +388,22 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchNewListAllPager(req *http. return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListAllPager(nil) - e.newListAllPager = &resp - server.PagerResponderInjectNextLinks(e.newListAllPager, req, func(page *armnetwork.ExpressRouteCircuitsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + e.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.ExpressRouteCircuitsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListAllPager) { - e.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + e.newListAllPager.remove(req) } return resp, nil } @@ -391,7 +412,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListArpTable(req *htt if e.srv.BeginListArpTable == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListArpTable not implemented")} } - if e.beginListArpTable == nil { + beginListArpTable := e.beginListArpTable.get(req) + if beginListArpTable == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -418,19 +440,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListArpTable(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListArpTable = &respr + beginListArpTable = &respr + e.beginListArpTable.add(req, beginListArpTable) } - resp, err := server.PollerResponderNext(e.beginListArpTable, req) + resp, err := server.PollerResponderNext(beginListArpTable, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListArpTable.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListArpTable) { - e.beginListArpTable = nil + if !server.PollerResponderMore(beginListArpTable) { + e.beginListArpTable.remove(req) } return resp, nil @@ -440,7 +464,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTable(req * if e.srv.BeginListRoutesTable == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListRoutesTable not implemented")} } - if e.beginListRoutesTable == nil { + beginListRoutesTable := e.beginListRoutesTable.get(req) + if beginListRoutesTable == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -467,19 +492,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTable(req * if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListRoutesTable = &respr + beginListRoutesTable = &respr + e.beginListRoutesTable.add(req, beginListRoutesTable) } - resp, err := server.PollerResponderNext(e.beginListRoutesTable, req) + resp, err := server.PollerResponderNext(beginListRoutesTable, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListRoutesTable.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListRoutesTable) { - e.beginListRoutesTable = nil + if !server.PollerResponderMore(beginListRoutesTable) { + e.beginListRoutesTable.remove(req) } return resp, nil @@ -489,7 +516,8 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTableSummar if e.srv.BeginListRoutesTableSummary == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListRoutesTableSummary not implemented")} } - if e.beginListRoutesTableSummary == nil { + beginListRoutesTableSummary := e.beginListRoutesTableSummary.get(req) + if beginListRoutesTableSummary == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -516,19 +544,21 @@ func (e *ExpressRouteCircuitsServerTransport) dispatchBeginListRoutesTableSummar if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListRoutesTableSummary = &respr + beginListRoutesTableSummary = &respr + e.beginListRoutesTableSummary.add(req, beginListRoutesTableSummary) } - resp, err := server.PollerResponderNext(e.beginListRoutesTableSummary, req) + resp, err := server.PollerResponderNext(beginListRoutesTableSummary, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListRoutesTableSummary.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListRoutesTableSummary) { - e.beginListRoutesTableSummary = nil + if !server.PollerResponderMore(beginListRoutesTableSummary) { + e.beginListRoutesTableSummary.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteconnections_server.go index c602a9e129f0..3450a8ef982c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteconnections_server.go @@ -41,18 +41,22 @@ type ExpressRouteConnectionsServer struct { } // NewExpressRouteConnectionsServerTransport creates a new instance of ExpressRouteConnectionsServerTransport with the provided implementation. -// The returned ExpressRouteConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteConnectionsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteConnectionsServerTransport(srv *ExpressRouteConnectionsServer) *ExpressRouteConnectionsServerTransport { - return &ExpressRouteConnectionsServerTransport{srv: srv} + return &ExpressRouteConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientDeleteResponse]](), + } } // ExpressRouteConnectionsServerTransport connects instances of armnetwork.ExpressRouteConnectionsClient to instances of ExpressRouteConnectionsServer. // Don't use this type directly, use NewExpressRouteConnectionsServerTransport instead. type ExpressRouteConnectionsServerTransport struct { srv *ExpressRouteConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientDeleteResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteConnectionsClientDeleteResponse]] } // Do implements the policy.Transporter interface for ExpressRouteConnectionsServerTransport. @@ -90,7 +94,8 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginCreateOrUpdate(req if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -117,19 +122,21 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -139,7 +146,8 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginDelete(req *http.R if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/expressRouteConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -162,19 +170,21 @@ func (e *ExpressRouteConnectionsServerTransport) dispatchBeginDelete(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnectionpeerings_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnectionpeerings_server.go index b9781d5251e5..a74c18d601f8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnectionpeerings_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnectionpeerings_server.go @@ -42,19 +42,24 @@ type ExpressRouteCrossConnectionPeeringsServer struct { } // NewExpressRouteCrossConnectionPeeringsServerTransport creates a new instance of ExpressRouteCrossConnectionPeeringsServerTransport with the provided implementation. -// The returned ExpressRouteCrossConnectionPeeringsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCrossConnectionPeeringsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCrossConnectionPeeringsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCrossConnectionPeeringsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCrossConnectionPeeringsServerTransport(srv *ExpressRouteCrossConnectionPeeringsServer) *ExpressRouteCrossConnectionPeeringsServerTransport { - return &ExpressRouteCrossConnectionPeeringsServerTransport{srv: srv} + return &ExpressRouteCrossConnectionPeeringsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse]](), + } } // ExpressRouteCrossConnectionPeeringsServerTransport connects instances of armnetwork.ExpressRouteCrossConnectionPeeringsClient to instances of ExpressRouteCrossConnectionPeeringsServer. // Don't use this type directly, use NewExpressRouteCrossConnectionPeeringsServerTransport instead. type ExpressRouteCrossConnectionPeeringsServerTransport struct { srv *ExpressRouteCrossConnectionPeeringsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCrossConnectionPeeringsServerTransport. @@ -92,7 +97,8 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginCreate if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginCreate if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginDelete if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchBeginDelete if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchNewListPage if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (e *ExpressRouteCrossConnectionPeeringsServerTransport) dispatchNewListPage return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, crossConnectionNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCrossConnectionPeeringsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnections_server.go index 1dcb50215ec5..16870c3e423c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutecrossconnections_server.go @@ -58,22 +58,30 @@ type ExpressRouteCrossConnectionsServer struct { } // NewExpressRouteCrossConnectionsServerTransport creates a new instance of ExpressRouteCrossConnectionsServerTransport with the provided implementation. -// The returned ExpressRouteCrossConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCrossConnectionsClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteCrossConnectionsServerTransport instance is connected to an instance of armnetwork.ExpressRouteCrossConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteCrossConnectionsServerTransport(srv *ExpressRouteCrossConnectionsServer) *ExpressRouteCrossConnectionsServerTransport { - return &ExpressRouteCrossConnectionsServerTransport{srv: srv} + return &ExpressRouteCrossConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListResponse]](), + beginListArpTable: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListArpTableResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse]](), + beginListRoutesTable: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableResponse]](), + beginListRoutesTableSummary: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]](), + } } // ExpressRouteCrossConnectionsServerTransport connects instances of armnetwork.ExpressRouteCrossConnectionsClient to instances of ExpressRouteCrossConnectionsServer. // Don't use this type directly, use NewExpressRouteCrossConnectionsServerTransport instead. type ExpressRouteCrossConnectionsServerTransport struct { srv *ExpressRouteCrossConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientCreateOrUpdateResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListResponse] - beginListArpTable *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListArpTableResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse] - beginListRoutesTable *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableResponse] - beginListRoutesTableSummary *azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListResponse]] + beginListArpTable *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListArpTableResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse]] + beginListRoutesTable *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableResponse]] + beginListRoutesTableSummary *tracker[azfake.PollerResponder[armnetwork.ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]] } // Do implements the policy.Transporter interface for ExpressRouteCrossConnectionsServerTransport. @@ -119,7 +127,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginCreateOrUpdat if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -142,19 +151,21 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginCreateOrUpdat if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -197,7 +208,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListPager(req * if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -205,20 +217,22 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListPager(req * return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListPager(nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteCrossConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteCrossConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } @@ -227,7 +241,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListArpTable( if e.srv.BeginListArpTable == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListArpTable not implemented")} } - if e.beginListArpTable == nil { + beginListArpTable := e.beginListArpTable.get(req) + if beginListArpTable == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/arpTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -254,19 +269,21 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListArpTable( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListArpTable = &respr + beginListArpTable = &respr + e.beginListArpTable.add(req, beginListArpTable) } - resp, err := server.PollerResponderNext(e.beginListArpTable, req) + resp, err := server.PollerResponderNext(beginListArpTable, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListArpTable.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListArpTable) { - e.beginListArpTable = nil + if !server.PollerResponderMore(beginListArpTable) { + e.beginListArpTable.remove(req) } return resp, nil @@ -276,7 +293,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListByResourceG if e.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if e.newListByResourceGroupPager == nil { + newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -288,20 +306,22 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchNewListByResourceG return nil, err } resp := e.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - e.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(e.newListByResourceGroupPager, req, func(page *armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ExpressRouteCrossConnectionsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListByResourceGroupPager) { - e.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + e.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -310,7 +330,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab if e.srv.BeginListRoutesTable == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListRoutesTable not implemented")} } - if e.beginListRoutesTable == nil { + beginListRoutesTable := e.beginListRoutesTable.get(req) + if beginListRoutesTable == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -337,19 +358,21 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListRoutesTable = &respr + beginListRoutesTable = &respr + e.beginListRoutesTable.add(req, beginListRoutesTable) } - resp, err := server.PollerResponderNext(e.beginListRoutesTable, req) + resp, err := server.PollerResponderNext(beginListRoutesTable, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListRoutesTable.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListRoutesTable) { - e.beginListRoutesTable = nil + if !server.PollerResponderMore(beginListRoutesTable) { + e.beginListRoutesTable.remove(req) } return resp, nil @@ -359,7 +382,8 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab if e.srv.BeginListRoutesTableSummary == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListRoutesTableSummary not implemented")} } - if e.beginListRoutesTableSummary == nil { + beginListRoutesTableSummary := e.beginListRoutesTableSummary.get(req) + if beginListRoutesTableSummary == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCrossConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTablesSummary/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -386,19 +410,21 @@ func (e *ExpressRouteCrossConnectionsServerTransport) dispatchBeginListRoutesTab if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginListRoutesTableSummary = &respr + beginListRoutesTableSummary = &respr + e.beginListRoutesTableSummary.add(req, beginListRoutesTableSummary) } - resp, err := server.PollerResponderNext(e.beginListRoutesTableSummary, req) + resp, err := server.PollerResponderNext(beginListRoutesTableSummary, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginListRoutesTableSummary.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginListRoutesTableSummary) { - e.beginListRoutesTableSummary = nil + if !server.PollerResponderMore(beginListRoutesTableSummary) { + e.beginListRoutesTableSummary.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutegateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutegateways_server.go index b3ba88aafb9e..f82f0f9fdf32 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutegateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutegateways_server.go @@ -49,19 +49,24 @@ type ExpressRouteGatewaysServer struct { } // NewExpressRouteGatewaysServerTransport creates a new instance of ExpressRouteGatewaysServerTransport with the provided implementation. -// The returned ExpressRouteGatewaysServerTransport instance is connected to an instance of armnetwork.ExpressRouteGatewaysClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteGatewaysServerTransport instance is connected to an instance of armnetwork.ExpressRouteGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteGatewaysServerTransport(srv *ExpressRouteGatewaysServer) *ExpressRouteGatewaysServerTransport { - return &ExpressRouteGatewaysServerTransport{srv: srv} + return &ExpressRouteGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientDeleteResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientUpdateTagsResponse]](), + } } // ExpressRouteGatewaysServerTransport connects instances of armnetwork.ExpressRouteGatewaysClient to instances of ExpressRouteGatewaysServer. // Don't use this type directly, use NewExpressRouteGatewaysServerTransport instead. type ExpressRouteGatewaysServerTransport struct { srv *ExpressRouteGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientDeleteResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientDeleteResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.ExpressRouteGatewaysClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for ExpressRouteGatewaysServerTransport. @@ -103,7 +108,8 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -126,19 +132,21 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -148,7 +156,8 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginDelete(req *http.Requ if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -167,19 +176,21 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginDelete(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -276,7 +287,8 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginUpdateTags(req *http. if e.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if e.beginUpdateTags == nil { + beginUpdateTags := e.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -299,19 +311,21 @@ func (e *ExpressRouteGatewaysServerTransport) dispatchBeginUpdateTags(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginUpdateTags = &respr + beginUpdateTags = &respr + e.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(e.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + e.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginUpdateTags) { - e.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + e.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressroutelinks_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressroutelinks_server.go index b522d988a098..f415e62efeb1 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressroutelinks_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressroutelinks_server.go @@ -34,17 +34,20 @@ type ExpressRouteLinksServer struct { } // NewExpressRouteLinksServerTransport creates a new instance of ExpressRouteLinksServerTransport with the provided implementation. -// The returned ExpressRouteLinksServerTransport instance is connected to an instance of armnetwork.ExpressRouteLinksClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteLinksServerTransport instance is connected to an instance of armnetwork.ExpressRouteLinksClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteLinksServerTransport(srv *ExpressRouteLinksServer) *ExpressRouteLinksServerTransport { - return &ExpressRouteLinksServerTransport{srv: srv} + return &ExpressRouteLinksServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteLinksClientListResponse]](), + } } // ExpressRouteLinksServerTransport connects instances of armnetwork.ExpressRouteLinksClient to instances of ExpressRouteLinksServer. // Don't use this type directly, use NewExpressRouteLinksServerTransport instead. type ExpressRouteLinksServerTransport struct { srv *ExpressRouteLinksServer - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteLinksClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteLinksClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteLinksServerTransport. @@ -115,7 +118,8 @@ func (e *ExpressRouteLinksServerTransport) dispatchNewListPager(req *http.Reques if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/links` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (e *ExpressRouteLinksServerTransport) dispatchNewListPager(req *http.Reques return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteLinksClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteLinksClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteportauthorizations_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteportauthorizations_server.go index 5f65f4cdbf4e..841778924a61 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteportauthorizations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteportauthorizations_server.go @@ -42,19 +42,24 @@ type ExpressRoutePortAuthorizationsServer struct { } // NewExpressRoutePortAuthorizationsServerTransport creates a new instance of ExpressRoutePortAuthorizationsServerTransport with the provided implementation. -// The returned ExpressRoutePortAuthorizationsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortAuthorizationsClient by way of the -// undefined.Transporter field. +// The returned ExpressRoutePortAuthorizationsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortAuthorizationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRoutePortAuthorizationsServerTransport(srv *ExpressRoutePortAuthorizationsServer) *ExpressRoutePortAuthorizationsServerTransport { - return &ExpressRoutePortAuthorizationsServerTransport{srv: srv} + return &ExpressRoutePortAuthorizationsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRoutePortAuthorizationsClientListResponse]](), + } } // ExpressRoutePortAuthorizationsServerTransport connects instances of armnetwork.ExpressRoutePortAuthorizationsClient to instances of ExpressRoutePortAuthorizationsServer. // Don't use this type directly, use NewExpressRoutePortAuthorizationsServerTransport instead. type ExpressRoutePortAuthorizationsServerTransport struct { srv *ExpressRoutePortAuthorizationsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRoutePortAuthorizationsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRoutePortAuthorizationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRoutePortAuthorizationsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRoutePortAuthorizationsServerTransport. @@ -92,7 +97,8 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginCreateOrUpd if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginCreateOrUpd if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginDelete(req if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchBeginDelete(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchNewListPager(req if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/authorizations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (e *ExpressRoutePortAuthorizationsServerTransport) dispatchNewListPager(req return nil, err } resp := e.srv.NewListPager(resourceGroupNameUnescaped, expressRoutePortNameUnescaped, nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRoutePortAuthorizationsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRoutePortAuthorizationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteports_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteports_server.go index 6b8dbe7c1ad1..ed4508e60d26 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteports_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteports_server.go @@ -54,20 +54,26 @@ type ExpressRoutePortsServer struct { } // NewExpressRoutePortsServerTransport creates a new instance of ExpressRoutePortsServerTransport with the provided implementation. -// The returned ExpressRoutePortsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortsClient by way of the -// undefined.Transporter field. +// The returned ExpressRoutePortsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRoutePortsServerTransport(srv *ExpressRoutePortsServer) *ExpressRoutePortsServerTransport { - return &ExpressRoutePortsServerTransport{srv: srv} + return &ExpressRoutePortsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ExpressRoutePortsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ExpressRoutePortsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListByResourceGroupResponse]](), + } } // ExpressRoutePortsServerTransport connects instances of armnetwork.ExpressRoutePortsClient to instances of ExpressRoutePortsServer. // Don't use this type directly, use NewExpressRoutePortsServerTransport instead. type ExpressRoutePortsServerTransport struct { srv *ExpressRoutePortsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ExpressRoutePortsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ExpressRoutePortsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ExpressRoutePortsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ExpressRoutePortsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for ExpressRoutePortsServerTransport. @@ -111,7 +117,8 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginCreateOrUpdate(req *http if e.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if e.beginCreateOrUpdate == nil { + beginCreateOrUpdate := e.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -134,19 +141,21 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginCreateOrUpdate(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + e.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(e.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + e.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginCreateOrUpdate) { - e.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + e.beginCreateOrUpdate.remove(req) } return resp, nil @@ -156,7 +165,8 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginDelete(req *http.Request if e.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if e.beginDelete == nil { + beginDelete := e.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -175,19 +185,21 @@ func (e *ExpressRoutePortsServerTransport) dispatchBeginDelete(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - e.beginDelete = &respr + beginDelete = &respr + e.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(e.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + e.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(e.beginDelete) { - e.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + e.beginDelete.remove(req) } return resp, nil @@ -267,7 +279,8 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListPager(req *http.Reques if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -275,20 +288,22 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListPager(req *http.Reques return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListPager(nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRoutePortsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRoutePortsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } @@ -297,7 +312,8 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListByResourceGroupPager(r if e.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if e.newListByResourceGroupPager == nil { + newListByResourceGroupPager := e.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePorts` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -309,20 +325,22 @@ func (e *ExpressRoutePortsServerTransport) dispatchNewListByResourceGroupPager(r return nil, err } resp := e.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - e.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(e.newListByResourceGroupPager, req, func(page *armnetwork.ExpressRoutePortsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + e.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ExpressRoutePortsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListByResourceGroupPager) { - e.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + e.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteportslocations_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteportslocations_server.go index ab9ab071fdae..d436ec261e0d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteportslocations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteportslocations_server.go @@ -34,17 +34,20 @@ type ExpressRoutePortsLocationsServer struct { } // NewExpressRoutePortsLocationsServerTransport creates a new instance of ExpressRoutePortsLocationsServerTransport with the provided implementation. -// The returned ExpressRoutePortsLocationsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortsLocationsClient by way of the -// undefined.Transporter field. +// The returned ExpressRoutePortsLocationsServerTransport instance is connected to an instance of armnetwork.ExpressRoutePortsLocationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRoutePortsLocationsServerTransport(srv *ExpressRoutePortsLocationsServer) *ExpressRoutePortsLocationsServerTransport { - return &ExpressRoutePortsLocationsServerTransport{srv: srv} + return &ExpressRoutePortsLocationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsLocationsClientListResponse]](), + } } // ExpressRoutePortsLocationsServerTransport connects instances of armnetwork.ExpressRoutePortsLocationsClient to instances of ExpressRoutePortsLocationsServer. // Don't use this type directly, use NewExpressRoutePortsLocationsServerTransport instead. type ExpressRoutePortsLocationsServerTransport struct { srv *ExpressRoutePortsLocationsServer - newListPager *azfake.PagerResponder[armnetwork.ExpressRoutePortsLocationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRoutePortsLocationsClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRoutePortsLocationsServerTransport. @@ -107,7 +110,8 @@ func (e *ExpressRoutePortsLocationsServerTransport) dispatchNewListPager(req *ht if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ExpressRoutePortsLocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -115,20 +119,22 @@ func (e *ExpressRoutePortsLocationsServerTransport) dispatchNewListPager(req *ht return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListPager(nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRoutePortsLocationsClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRoutePortsLocationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteproviderportslocation_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteproviderportslocation_server.go index 7c0dc84ce5e2..c9a40bf6afd4 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteproviderportslocation_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteproviderportslocation_server.go @@ -29,8 +29,8 @@ type ExpressRouteProviderPortsLocationServer struct { } // NewExpressRouteProviderPortsLocationServerTransport creates a new instance of ExpressRouteProviderPortsLocationServerTransport with the provided implementation. -// The returned ExpressRouteProviderPortsLocationServerTransport instance is connected to an instance of armnetwork.ExpressRouteProviderPortsLocationClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteProviderPortsLocationServerTransport instance is connected to an instance of armnetwork.ExpressRouteProviderPortsLocationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteProviderPortsLocationServerTransport(srv *ExpressRouteProviderPortsLocationServer) *ExpressRouteProviderPortsLocationServerTransport { return &ExpressRouteProviderPortsLocationServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/expressrouteserviceproviders_server.go b/sdk/resourcemanager/network/armnetwork/fake/expressrouteserviceproviders_server.go index 1cfcf667ea0c..7dd2edfac7e3 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/expressrouteserviceproviders_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/expressrouteserviceproviders_server.go @@ -28,17 +28,20 @@ type ExpressRouteServiceProvidersServer struct { } // NewExpressRouteServiceProvidersServerTransport creates a new instance of ExpressRouteServiceProvidersServerTransport with the provided implementation. -// The returned ExpressRouteServiceProvidersServerTransport instance is connected to an instance of armnetwork.ExpressRouteServiceProvidersClient by way of the -// undefined.Transporter field. +// The returned ExpressRouteServiceProvidersServerTransport instance is connected to an instance of armnetwork.ExpressRouteServiceProvidersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewExpressRouteServiceProvidersServerTransport(srv *ExpressRouteServiceProvidersServer) *ExpressRouteServiceProvidersServerTransport { - return &ExpressRouteServiceProvidersServerTransport{srv: srv} + return &ExpressRouteServiceProvidersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ExpressRouteServiceProvidersClientListResponse]](), + } } // ExpressRouteServiceProvidersServerTransport connects instances of armnetwork.ExpressRouteServiceProvidersClient to instances of ExpressRouteServiceProvidersServer. // Don't use this type directly, use NewExpressRouteServiceProvidersServerTransport instead. type ExpressRouteServiceProvidersServerTransport struct { srv *ExpressRouteServiceProvidersServer - newListPager *azfake.PagerResponder[armnetwork.ExpressRouteServiceProvidersClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ExpressRouteServiceProvidersClientListResponse]] } // Do implements the policy.Transporter interface for ExpressRouteServiceProvidersServerTransport. @@ -70,7 +73,8 @@ func (e *ExpressRouteServiceProvidersServerTransport) dispatchNewListPager(req * if e.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if e.newListPager == nil { + newListPager := e.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteServiceProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -78,20 +82,22 @@ func (e *ExpressRouteServiceProvidersServerTransport) dispatchNewListPager(req * return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := e.srv.NewListPager(nil) - e.newListPager = &resp - server.PagerResponderInjectNextLinks(e.newListPager, req, func(page *armnetwork.ExpressRouteServiceProvidersClientListResponse, createLink func() string) { + newListPager = &resp + e.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ExpressRouteServiceProvidersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(e.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + e.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(e.newListPager) { - e.newListPager = nil + if !server.PagerResponderMore(newListPager) { + e.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicies_server.go b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicies_server.go index 2a7226157e25..3951ed557a5d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicies_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicies_server.go @@ -50,20 +50,26 @@ type FirewallPoliciesServer struct { } // NewFirewallPoliciesServerTransport creates a new instance of FirewallPoliciesServerTransport with the provided implementation. -// The returned FirewallPoliciesServerTransport instance is connected to an instance of armnetwork.FirewallPoliciesClient by way of the -// undefined.Transporter field. +// The returned FirewallPoliciesServerTransport instance is connected to an instance of armnetwork.FirewallPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFirewallPoliciesServerTransport(srv *FirewallPoliciesServer) *FirewallPoliciesServerTransport { - return &FirewallPoliciesServerTransport{srv: srv} + return &FirewallPoliciesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.FirewallPoliciesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.FirewallPoliciesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.FirewallPoliciesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.FirewallPoliciesClientListAllResponse]](), + } } // FirewallPoliciesServerTransport connects instances of armnetwork.FirewallPoliciesClient to instances of FirewallPoliciesServer. // Don't use this type directly, use NewFirewallPoliciesServerTransport instead. type FirewallPoliciesServerTransport struct { srv *FirewallPoliciesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.FirewallPoliciesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.FirewallPoliciesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.FirewallPoliciesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.FirewallPoliciesClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.FirewallPoliciesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.FirewallPoliciesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.FirewallPoliciesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.FirewallPoliciesClientListAllResponse]] } // Do implements the policy.Transporter interface for FirewallPoliciesServerTransport. @@ -105,7 +111,8 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *http. if f.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if f.beginCreateOrUpdate == nil { + beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginCreateOrUpdate(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + f.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(f.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + f.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginCreateOrUpdate) { - f.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + f.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginDelete(req *http.Request) if f.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if f.beginDelete == nil { + beginDelete := f.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (f *FirewallPoliciesServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginDelete = &respr + beginDelete = &respr + f.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(f.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + f.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginDelete) { - f.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + f.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListPager(req *http.Request if f.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if f.newListPager == nil { + newListPager := f.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListPager(req *http.Request return nil, err } resp := f.srv.NewListPager(resourceGroupNameUnescaped, nil) - f.newListPager = &resp - server.PagerResponderInjectNextLinks(f.newListPager, req, func(page *armnetwork.FirewallPoliciesClientListResponse, createLink func() string) { + newListPager = &resp + f.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FirewallPoliciesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(f.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(f.newListPager) { - f.newListPager = nil + if !server.PagerResponderMore(newListPager) { + f.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListAllPager(req *http.Requ if f.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if f.newListAllPager == nil { + newListAllPager := f.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (f *FirewallPoliciesServerTransport) dispatchNewListAllPager(req *http.Requ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := f.srv.NewListAllPager(nil) - f.newListAllPager = &resp - server.PagerResponderInjectNextLinks(f.newListAllPager, req, func(page *armnetwork.FirewallPoliciesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + f.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.FirewallPoliciesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(f.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(f.newListAllPager) { - f.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + f.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignatures_server.go b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignatures_server.go index a195c5305a95..d45a3f55d5f8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignatures_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignatures_server.go @@ -29,8 +29,8 @@ type FirewallPolicyIdpsSignaturesServer struct { } // NewFirewallPolicyIdpsSignaturesServerTransport creates a new instance of FirewallPolicyIdpsSignaturesServerTransport with the provided implementation. -// The returned FirewallPolicyIdpsSignaturesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesClient by way of the -// undefined.Transporter field. +// The returned FirewallPolicyIdpsSignaturesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFirewallPolicyIdpsSignaturesServerTransport(srv *FirewallPolicyIdpsSignaturesServer) *FirewallPolicyIdpsSignaturesServerTransport { return &FirewallPolicyIdpsSignaturesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesfiltervalues_server.go b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesfiltervalues_server.go index 3afb0c1d02f8..e85aaa6e498b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesfiltervalues_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesfiltervalues_server.go @@ -29,8 +29,8 @@ type FirewallPolicyIdpsSignaturesFilterValuesServer struct { } // NewFirewallPolicyIdpsSignaturesFilterValuesServerTransport creates a new instance of FirewallPolicyIdpsSignaturesFilterValuesServerTransport with the provided implementation. -// The returned FirewallPolicyIdpsSignaturesFilterValuesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesFilterValuesClient by way of the -// undefined.Transporter field. +// The returned FirewallPolicyIdpsSignaturesFilterValuesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesFilterValuesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFirewallPolicyIdpsSignaturesFilterValuesServerTransport(srv *FirewallPolicyIdpsSignaturesFilterValuesServer) *FirewallPolicyIdpsSignaturesFilterValuesServerTransport { return &FirewallPolicyIdpsSignaturesFilterValuesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesoverrides_server.go b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesoverrides_server.go index 94fcb87c34bd..03f78b300bf1 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesoverrides_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyidpssignaturesoverrides_server.go @@ -41,8 +41,8 @@ type FirewallPolicyIdpsSignaturesOverridesServer struct { } // NewFirewallPolicyIdpsSignaturesOverridesServerTransport creates a new instance of FirewallPolicyIdpsSignaturesOverridesServerTransport with the provided implementation. -// The returned FirewallPolicyIdpsSignaturesOverridesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesOverridesClient by way of the -// undefined.Transporter field. +// The returned FirewallPolicyIdpsSignaturesOverridesServerTransport instance is connected to an instance of armnetwork.FirewallPolicyIdpsSignaturesOverridesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFirewallPolicyIdpsSignaturesOverridesServerTransport(srv *FirewallPolicyIdpsSignaturesOverridesServer) *FirewallPolicyIdpsSignaturesOverridesServerTransport { return &FirewallPolicyIdpsSignaturesOverridesServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyrulecollectiongroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyrulecollectiongroups_server.go index 81c465eceb84..47670673d5d1 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyrulecollectiongroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/firewallpolicyrulecollectiongroups_server.go @@ -42,19 +42,24 @@ type FirewallPolicyRuleCollectionGroupsServer struct { } // NewFirewallPolicyRuleCollectionGroupsServerTransport creates a new instance of FirewallPolicyRuleCollectionGroupsServerTransport with the provided implementation. -// The returned FirewallPolicyRuleCollectionGroupsServerTransport instance is connected to an instance of armnetwork.FirewallPolicyRuleCollectionGroupsClient by way of the -// undefined.Transporter field. +// The returned FirewallPolicyRuleCollectionGroupsServerTransport instance is connected to an instance of armnetwork.FirewallPolicyRuleCollectionGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFirewallPolicyRuleCollectionGroupsServerTransport(srv *FirewallPolicyRuleCollectionGroupsServer) *FirewallPolicyRuleCollectionGroupsServerTransport { - return &FirewallPolicyRuleCollectionGroupsServerTransport{srv: srv} + return &FirewallPolicyRuleCollectionGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse]](), + } } // FirewallPolicyRuleCollectionGroupsServerTransport connects instances of armnetwork.FirewallPolicyRuleCollectionGroupsClient to instances of FirewallPolicyRuleCollectionGroupsServer. // Don't use this type directly, use NewFirewallPolicyRuleCollectionGroupsServerTransport instead. type FirewallPolicyRuleCollectionGroupsServerTransport struct { srv *FirewallPolicyRuleCollectionGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse]] } // Do implements the policy.Transporter interface for FirewallPolicyRuleCollectionGroupsServerTransport. @@ -92,7 +97,8 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginCreateO if f.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if f.beginCreateOrUpdate == nil { + beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginCreateO if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + f.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(f.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + f.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginCreateOrUpdate) { - f.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + f.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginDelete( if f.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if f.beginDelete == nil { + beginDelete := f.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchBeginDelete( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginDelete = &respr + beginDelete = &respr + f.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(f.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + f.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginDelete) { - f.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + f.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchNewListPager if f.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if f.newListPager == nil { + newListPager := f.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/firewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ruleCollectionGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (f *FirewallPolicyRuleCollectionGroupsServerTransport) dispatchNewListPager return nil, err } resp := f.srv.NewListPager(resourceGroupNameUnescaped, firewallPolicyNameUnescaped, nil) - f.newListPager = &resp - server.PagerResponderInjectNextLinks(f.newListPager, req, func(page *armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse, createLink func() string) { + newListPager = &resp + f.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FirewallPolicyRuleCollectionGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(f.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(f.newListPager) { - f.newListPager = nil + if !server.PagerResponderMore(newListPager) { + f.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/flowlogs_server.go b/sdk/resourcemanager/network/armnetwork/fake/flowlogs_server.go index 2eb325c46bbc..2c4cc796ee85 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/flowlogs_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/flowlogs_server.go @@ -46,19 +46,24 @@ type FlowLogsServer struct { } // NewFlowLogsServerTransport creates a new instance of FlowLogsServerTransport with the provided implementation. -// The returned FlowLogsServerTransport instance is connected to an instance of armnetwork.FlowLogsClient by way of the -// undefined.Transporter field. +// The returned FlowLogsServerTransport instance is connected to an instance of armnetwork.FlowLogsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewFlowLogsServerTransport(srv *FlowLogsServer) *FlowLogsServerTransport { - return &FlowLogsServerTransport{srv: srv} + return &FlowLogsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.FlowLogsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.FlowLogsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.FlowLogsClientListResponse]](), + } } // FlowLogsServerTransport connects instances of armnetwork.FlowLogsClient to instances of FlowLogsServer. // Don't use this type directly, use NewFlowLogsServerTransport instead. type FlowLogsServerTransport struct { srv *FlowLogsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.FlowLogsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.FlowLogsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.FlowLogsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.FlowLogsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.FlowLogsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.FlowLogsClientListResponse]] } // Do implements the policy.Transporter interface for FlowLogsServerTransport. @@ -98,7 +103,8 @@ func (f *FlowLogsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if f.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if f.beginCreateOrUpdate == nil { + beginCreateOrUpdate := f.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -125,19 +131,21 @@ func (f *FlowLogsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + f.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(f.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + f.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginCreateOrUpdate) { - f.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + f.beginCreateOrUpdate.remove(req) } return resp, nil @@ -147,7 +155,8 @@ func (f *FlowLogsServerTransport) dispatchBeginDelete(req *http.Request) (*http. if f.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if f.beginDelete == nil { + beginDelete := f.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -170,19 +179,21 @@ func (f *FlowLogsServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - f.beginDelete = &respr + beginDelete = &respr + f.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(f.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + f.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(f.beginDelete) { - f.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + f.beginDelete.remove(req) } return resp, nil @@ -229,7 +240,8 @@ func (f *FlowLogsServerTransport) dispatchNewListPager(req *http.Request) (*http if f.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if f.newListPager == nil { + newListPager := f.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/flowLogs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -245,20 +257,22 @@ func (f *FlowLogsServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, err } resp := f.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) - f.newListPager = &resp - server.PagerResponderInjectNextLinks(f.newListPager, req, func(page *armnetwork.FlowLogsClientListResponse, createLink func() string) { + newListPager = &resp + f.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.FlowLogsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(f.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + f.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(f.newListPager) { - f.newListPager = nil + if !server.PagerResponderMore(newListPager) { + f.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/groups_server.go b/sdk/resourcemanager/network/armnetwork/fake/groups_server.go index 2d11e57d7ac8..9a78a963bbd7 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/groups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/groups_server.go @@ -43,18 +43,22 @@ type GroupsServer struct { } // NewGroupsServerTransport creates a new instance of GroupsServerTransport with the provided implementation. -// The returned GroupsServerTransport instance is connected to an instance of armnetwork.GroupsClient by way of the -// undefined.Transporter field. +// The returned GroupsServerTransport instance is connected to an instance of armnetwork.GroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewGroupsServerTransport(srv *GroupsServer) *GroupsServerTransport { - return &GroupsServerTransport{srv: srv} + return &GroupsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.GroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.GroupsClientListResponse]](), + } } // GroupsServerTransport connects instances of armnetwork.GroupsClient to instances of GroupsServer. // Don't use this type directly, use NewGroupsServerTransport instead. type GroupsServerTransport struct { srv *GroupsServer - beginDelete *azfake.PollerResponder[armnetwork.GroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.GroupsClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.GroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.GroupsClientListResponse]] } // Do implements the policy.Transporter interface for GroupsServerTransport. @@ -143,7 +147,8 @@ func (g *GroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re if g.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if g.beginDelete == nil { + beginDelete := g.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -181,19 +186,21 @@ func (g *GroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - g.beginDelete = &respr + beginDelete = &respr + g.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(g.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + g.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(g.beginDelete) { - g.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + g.beginDelete.remove(req) } return resp, nil @@ -240,7 +247,8 @@ func (g *GroupsServerTransport) dispatchNewListPager(req *http.Request) (*http.R if g.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if g.newListPager == nil { + newListPager := g.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -283,20 +291,22 @@ func (g *GroupsServerTransport) dispatchNewListPager(req *http.Request) (*http.R } } resp := g.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) - g.newListPager = &resp - server.PagerResponderInjectNextLinks(g.newListPager, req, func(page *armnetwork.GroupsClientListResponse, createLink func() string) { + newListPager = &resp + g.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.GroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(g.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + g.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(g.newListPager) { - g.newListPager = nil + if !server.PagerResponderMore(newListPager) { + g.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/hubroutetables_server.go b/sdk/resourcemanager/network/armnetwork/fake/hubroutetables_server.go index 8f1df6fce729..f6d8ce72ac90 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/hubroutetables_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/hubroutetables_server.go @@ -42,19 +42,24 @@ type HubRouteTablesServer struct { } // NewHubRouteTablesServerTransport creates a new instance of HubRouteTablesServerTransport with the provided implementation. -// The returned HubRouteTablesServerTransport instance is connected to an instance of armnetwork.HubRouteTablesClient by way of the -// undefined.Transporter field. +// The returned HubRouteTablesServerTransport instance is connected to an instance of armnetwork.HubRouteTablesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewHubRouteTablesServerTransport(srv *HubRouteTablesServer) *HubRouteTablesServerTransport { - return &HubRouteTablesServerTransport{srv: srv} + return &HubRouteTablesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.HubRouteTablesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.HubRouteTablesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.HubRouteTablesClientListResponse]](), + } } // HubRouteTablesServerTransport connects instances of armnetwork.HubRouteTablesClient to instances of HubRouteTablesServer. // Don't use this type directly, use NewHubRouteTablesServerTransport instead. type HubRouteTablesServerTransport struct { srv *HubRouteTablesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.HubRouteTablesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.HubRouteTablesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.HubRouteTablesClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.HubRouteTablesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.HubRouteTablesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.HubRouteTablesClientListResponse]] } // Do implements the policy.Transporter interface for HubRouteTablesServerTransport. @@ -92,7 +97,8 @@ func (h *HubRouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if h.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if h.beginCreateOrUpdate == nil { + beginCreateOrUpdate := h.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (h *HubRouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - h.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + h.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(h.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + h.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(h.beginCreateOrUpdate) { - h.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + h.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (h *HubRouteTablesServerTransport) dispatchBeginDelete(req *http.Request) ( if h.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if h.beginDelete == nil { + beginDelete := h.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (h *HubRouteTablesServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - h.beginDelete = &respr + beginDelete = &respr + h.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(h.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + h.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(h.beginDelete) { - h.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + h.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (h *HubRouteTablesServerTransport) dispatchNewListPager(req *http.Request) if h.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if h.newListPager == nil { + newListPager := h.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubRouteTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (h *HubRouteTablesServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := h.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - h.newListPager = &resp - server.PagerResponderInjectNextLinks(h.newListPager, req, func(page *armnetwork.HubRouteTablesClientListResponse, createLink func() string) { + newListPager = &resp + h.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.HubRouteTablesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(h.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + h.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(h.newListPager) { - h.newListPager = nil + if !server.PagerResponderMore(newListPager) { + h.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/hubvirtualnetworkconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/hubvirtualnetworkconnections_server.go index ea74d216b72d..f132546d6aec 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/hubvirtualnetworkconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/hubvirtualnetworkconnections_server.go @@ -42,19 +42,24 @@ type HubVirtualNetworkConnectionsServer struct { } // NewHubVirtualNetworkConnectionsServerTransport creates a new instance of HubVirtualNetworkConnectionsServerTransport with the provided implementation. -// The returned HubVirtualNetworkConnectionsServerTransport instance is connected to an instance of armnetwork.HubVirtualNetworkConnectionsClient by way of the -// undefined.Transporter field. +// The returned HubVirtualNetworkConnectionsServerTransport instance is connected to an instance of armnetwork.HubVirtualNetworkConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewHubVirtualNetworkConnectionsServerTransport(srv *HubVirtualNetworkConnectionsServer) *HubVirtualNetworkConnectionsServerTransport { - return &HubVirtualNetworkConnectionsServerTransport{srv: srv} + return &HubVirtualNetworkConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.HubVirtualNetworkConnectionsClientListResponse]](), + } } // HubVirtualNetworkConnectionsServerTransport connects instances of armnetwork.HubVirtualNetworkConnectionsClient to instances of HubVirtualNetworkConnectionsServer. // Don't use this type directly, use NewHubVirtualNetworkConnectionsServerTransport instead. type HubVirtualNetworkConnectionsServerTransport struct { srv *HubVirtualNetworkConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.HubVirtualNetworkConnectionsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.HubVirtualNetworkConnectionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.HubVirtualNetworkConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for HubVirtualNetworkConnectionsServerTransport. @@ -92,7 +97,8 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginCreateOrUpdat if h.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if h.beginCreateOrUpdate == nil { + beginCreateOrUpdate := h.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginCreateOrUpdat if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - h.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + h.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(h.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + h.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(h.beginCreateOrUpdate) { - h.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + h.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginDelete(req *h if h.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if h.beginDelete == nil { + beginDelete := h.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchBeginDelete(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - h.beginDelete = &respr + beginDelete = &respr + h.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(h.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + h.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(h.beginDelete) { - h.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + h.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchNewListPager(req * if h.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if h.newListPager == nil { + newListPager := h.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/hubVirtualNetworkConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (h *HubVirtualNetworkConnectionsServerTransport) dispatchNewListPager(req * return nil, err } resp := h.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - h.newListPager = &resp - server.PagerResponderInjectNextLinks(h.newListPager, req, func(page *armnetwork.HubVirtualNetworkConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + h.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.HubVirtualNetworkConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(h.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + h.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(h.newListPager) { - h.newListPager = nil + if !server.PagerResponderMore(newListPager) { + h.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/inboundnatrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/inboundnatrules_server.go index 7310ea27d7db..1cdb57b251dd 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/inboundnatrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/inboundnatrules_server.go @@ -42,19 +42,24 @@ type InboundNatRulesServer struct { } // NewInboundNatRulesServerTransport creates a new instance of InboundNatRulesServerTransport with the provided implementation. -// The returned InboundNatRulesServerTransport instance is connected to an instance of armnetwork.InboundNatRulesClient by way of the -// undefined.Transporter field. +// The returned InboundNatRulesServerTransport instance is connected to an instance of armnetwork.InboundNatRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInboundNatRulesServerTransport(srv *InboundNatRulesServer) *InboundNatRulesServerTransport { - return &InboundNatRulesServerTransport{srv: srv} + return &InboundNatRulesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.InboundNatRulesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.InboundNatRulesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.InboundNatRulesClientListResponse]](), + } } // InboundNatRulesServerTransport connects instances of armnetwork.InboundNatRulesClient to instances of InboundNatRulesServer. // Don't use this type directly, use NewInboundNatRulesServerTransport instead. type InboundNatRulesServerTransport struct { srv *InboundNatRulesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.InboundNatRulesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.InboundNatRulesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.InboundNatRulesClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.InboundNatRulesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.InboundNatRulesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.InboundNatRulesClientListResponse]] } // Do implements the policy.Transporter interface for InboundNatRulesServerTransport. @@ -92,7 +97,8 @@ func (i *InboundNatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.R if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (i *InboundNatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (i *InboundNatRulesServerTransport) dispatchBeginDelete(req *http.Request) if i.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if i.beginDelete == nil { + beginDelete := i.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (i *InboundNatRulesServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginDelete = &respr + beginDelete = &respr + i.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(i.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + i.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginDelete) { - i.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + i.beginDelete.remove(req) } return resp, nil @@ -235,7 +246,8 @@ func (i *InboundNatRulesServerTransport) dispatchNewListPager(req *http.Request) if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundNatRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -251,20 +263,22 @@ func (i *InboundNatRulesServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := i.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.InboundNatRulesClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InboundNatRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/inboundsecurityrule_server.go b/sdk/resourcemanager/network/armnetwork/fake/inboundsecurityrule_server.go index b9c288588ba9..64d36457117c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/inboundsecurityrule_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/inboundsecurityrule_server.go @@ -29,17 +29,20 @@ type InboundSecurityRuleServer struct { } // NewInboundSecurityRuleServerTransport creates a new instance of InboundSecurityRuleServerTransport with the provided implementation. -// The returned InboundSecurityRuleServerTransport instance is connected to an instance of armnetwork.InboundSecurityRuleClient by way of the -// undefined.Transporter field. +// The returned InboundSecurityRuleServerTransport instance is connected to an instance of armnetwork.InboundSecurityRuleClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInboundSecurityRuleServerTransport(srv *InboundSecurityRuleServer) *InboundSecurityRuleServerTransport { - return &InboundSecurityRuleServerTransport{srv: srv} + return &InboundSecurityRuleServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.InboundSecurityRuleClientCreateOrUpdateResponse]](), + } } // InboundSecurityRuleServerTransport connects instances of armnetwork.InboundSecurityRuleClient to instances of InboundSecurityRuleServer. // Don't use this type directly, use NewInboundSecurityRuleServerTransport instead. type InboundSecurityRuleServerTransport struct { srv *InboundSecurityRuleServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.InboundSecurityRuleClientCreateOrUpdateResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.InboundSecurityRuleClientCreateOrUpdateResponse]] } // Do implements the policy.Transporter interface for InboundSecurityRuleServerTransport. @@ -71,7 +74,8 @@ func (i *InboundSecurityRuleServerTransport) dispatchBeginCreateOrUpdate(req *ht if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundSecurityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -98,19 +102,21 @@ func (i *InboundSecurityRuleServerTransport) dispatchBeginCreateOrUpdate(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/interfaceipconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/interfaceipconfigurations_server.go index e7c1c51cf926..183d7dd3dc8c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/interfaceipconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/interfaceipconfigurations_server.go @@ -34,17 +34,20 @@ type InterfaceIPConfigurationsServer struct { } // NewInterfaceIPConfigurationsServerTransport creates a new instance of InterfaceIPConfigurationsServerTransport with the provided implementation. -// The returned InterfaceIPConfigurationsServerTransport instance is connected to an instance of armnetwork.InterfaceIPConfigurationsClient by way of the -// undefined.Transporter field. +// The returned InterfaceIPConfigurationsServerTransport instance is connected to an instance of armnetwork.InterfaceIPConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInterfaceIPConfigurationsServerTransport(srv *InterfaceIPConfigurationsServer) *InterfaceIPConfigurationsServerTransport { - return &InterfaceIPConfigurationsServerTransport{srv: srv} + return &InterfaceIPConfigurationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.InterfaceIPConfigurationsClientListResponse]](), + } } // InterfaceIPConfigurationsServerTransport connects instances of armnetwork.InterfaceIPConfigurationsClient to instances of InterfaceIPConfigurationsServer. // Don't use this type directly, use NewInterfaceIPConfigurationsServerTransport instead. type InterfaceIPConfigurationsServerTransport struct { srv *InterfaceIPConfigurationsServer - newListPager *azfake.PagerResponder[armnetwork.InterfaceIPConfigurationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.InterfaceIPConfigurationsClientListResponse]] } // Do implements the policy.Transporter interface for InterfaceIPConfigurationsServerTransport. @@ -115,7 +118,8 @@ func (i *InterfaceIPConfigurationsServerTransport) dispatchNewListPager(req *htt if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (i *InterfaceIPConfigurationsServerTransport) dispatchNewListPager(req *htt return nil, err } resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.InterfaceIPConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceIPConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/interfaceloadbalancers_server.go b/sdk/resourcemanager/network/armnetwork/fake/interfaceloadbalancers_server.go index 10c74f52c765..e9ecedc98f1a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/interfaceloadbalancers_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/interfaceloadbalancers_server.go @@ -29,17 +29,20 @@ type InterfaceLoadBalancersServer struct { } // NewInterfaceLoadBalancersServerTransport creates a new instance of InterfaceLoadBalancersServerTransport with the provided implementation. -// The returned InterfaceLoadBalancersServerTransport instance is connected to an instance of armnetwork.InterfaceLoadBalancersClient by way of the -// undefined.Transporter field. +// The returned InterfaceLoadBalancersServerTransport instance is connected to an instance of armnetwork.InterfaceLoadBalancersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInterfaceLoadBalancersServerTransport(srv *InterfaceLoadBalancersServer) *InterfaceLoadBalancersServerTransport { - return &InterfaceLoadBalancersServerTransport{srv: srv} + return &InterfaceLoadBalancersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.InterfaceLoadBalancersClientListResponse]](), + } } // InterfaceLoadBalancersServerTransport connects instances of armnetwork.InterfaceLoadBalancersClient to instances of InterfaceLoadBalancersServer. // Don't use this type directly, use NewInterfaceLoadBalancersServerTransport instead. type InterfaceLoadBalancersServerTransport struct { srv *InterfaceLoadBalancersServer - newListPager *azfake.PagerResponder[armnetwork.InterfaceLoadBalancersClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.InterfaceLoadBalancersClientListResponse]] } // Do implements the policy.Transporter interface for InterfaceLoadBalancersServerTransport. @@ -71,7 +74,8 @@ func (i *InterfaceLoadBalancersServerTransport) dispatchNewListPager(req *http.R if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -87,20 +91,22 @@ func (i *InterfaceLoadBalancersServerTransport) dispatchNewListPager(req *http.R return nil, err } resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.InterfaceLoadBalancersClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceLoadBalancersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/interfaces_server.go b/sdk/resourcemanager/network/armnetwork/fake/interfaces_server.go index a78e5fd5072f..31e78fd59ac7 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/interfaces_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/interfaces_server.go @@ -90,27 +90,40 @@ type InterfacesServer struct { } // NewInterfacesServerTransport creates a new instance of InterfacesServerTransport with the provided implementation. -// The returned InterfacesServerTransport instance is connected to an instance of armnetwork.InterfacesClient by way of the -// undefined.Transporter field. +// The returned InterfacesServerTransport instance is connected to an instance of armnetwork.InterfacesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInterfacesServerTransport(srv *InterfacesServer) *InterfacesServerTransport { - return &InterfacesServerTransport{srv: srv} + return &InterfacesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.InterfacesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.InterfacesClientDeleteResponse]](), + beginGetEffectiveRouteTable: newTracker[azfake.PollerResponder[armnetwork.InterfacesClientGetEffectiveRouteTableResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListAllResponse]](), + newListCloudServiceNetworkInterfacesPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse]](), + newListCloudServiceRoleInstanceNetworkInterfacesPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]](), + beginListEffectiveNetworkSecurityGroups: newTracker[azfake.PollerResponder[armnetwork.InterfacesClientListEffectiveNetworkSecurityGroupsResponse]](), + newListVirtualMachineScaleSetIPConfigurationsPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]](), + newListVirtualMachineScaleSetNetworkInterfacesPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]](), + newListVirtualMachineScaleSetVMNetworkInterfacesPager: newTracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]](), + } } // InterfacesServerTransport connects instances of armnetwork.InterfacesClient to instances of InterfacesServer. // Don't use this type directly, use NewInterfacesServerTransport instead. type InterfacesServerTransport struct { srv *InterfacesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.InterfacesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.InterfacesClientDeleteResponse] - beginGetEffectiveRouteTable *azfake.PollerResponder[armnetwork.InterfacesClientGetEffectiveRouteTableResponse] - newListPager *azfake.PagerResponder[armnetwork.InterfacesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.InterfacesClientListAllResponse] - newListCloudServiceNetworkInterfacesPager *azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse] - newListCloudServiceRoleInstanceNetworkInterfacesPager *azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse] - beginListEffectiveNetworkSecurityGroups *azfake.PollerResponder[armnetwork.InterfacesClientListEffectiveNetworkSecurityGroupsResponse] - newListVirtualMachineScaleSetIPConfigurationsPager *azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse] - newListVirtualMachineScaleSetNetworkInterfacesPager *azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse] - newListVirtualMachineScaleSetVMNetworkInterfacesPager *azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.InterfacesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.InterfacesClientDeleteResponse]] + beginGetEffectiveRouteTable *tracker[azfake.PollerResponder[armnetwork.InterfacesClientGetEffectiveRouteTableResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListAllResponse]] + newListCloudServiceNetworkInterfacesPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse]] + newListCloudServiceRoleInstanceNetworkInterfacesPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]] + beginListEffectiveNetworkSecurityGroups *tracker[azfake.PollerResponder[armnetwork.InterfacesClientListEffectiveNetworkSecurityGroupsResponse]] + newListVirtualMachineScaleSetIPConfigurationsPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]] + newListVirtualMachineScaleSetNetworkInterfacesPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]] + newListVirtualMachineScaleSetVMNetworkInterfacesPager *tracker[azfake.PagerResponder[armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]] } // Do implements the policy.Transporter interface for InterfacesServerTransport. @@ -172,7 +185,8 @@ func (i *InterfacesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reques if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -195,19 +209,21 @@ func (i *InterfacesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil @@ -217,7 +233,8 @@ func (i *InterfacesServerTransport) dispatchBeginDelete(req *http.Request) (*htt if i.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if i.beginDelete == nil { + beginDelete := i.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -236,19 +253,21 @@ func (i *InterfacesServerTransport) dispatchBeginDelete(req *http.Request) (*htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginDelete = &respr + beginDelete = &respr + i.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(i.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + i.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginDelete) { - i.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + i.beginDelete.remove(req) } return resp, nil @@ -356,7 +375,8 @@ func (i *InterfacesServerTransport) dispatchBeginGetEffectiveRouteTable(req *htt if i.srv.BeginGetEffectiveRouteTable == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetEffectiveRouteTable not implemented")} } - if i.beginGetEffectiveRouteTable == nil { + beginGetEffectiveRouteTable := i.beginGetEffectiveRouteTable.get(req) + if beginGetEffectiveRouteTable == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRouteTable` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -375,19 +395,21 @@ func (i *InterfacesServerTransport) dispatchBeginGetEffectiveRouteTable(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginGetEffectiveRouteTable = &respr + beginGetEffectiveRouteTable = &respr + i.beginGetEffectiveRouteTable.add(req, beginGetEffectiveRouteTable) } - resp, err := server.PollerResponderNext(i.beginGetEffectiveRouteTable, req) + resp, err := server.PollerResponderNext(beginGetEffectiveRouteTable, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + i.beginGetEffectiveRouteTable.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginGetEffectiveRouteTable) { - i.beginGetEffectiveRouteTable = nil + if !server.PollerResponderMore(beginGetEffectiveRouteTable) { + i.beginGetEffectiveRouteTable.remove(req) } return resp, nil @@ -507,7 +529,8 @@ func (i *InterfacesServerTransport) dispatchNewListPager(req *http.Request) (*ht if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -519,20 +542,22 @@ func (i *InterfacesServerTransport) dispatchNewListPager(req *http.Request) (*ht return nil, err } resp := i.srv.NewListPager(resourceGroupNameUnescaped, nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.InterfacesClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfacesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } @@ -541,7 +566,8 @@ func (i *InterfacesServerTransport) dispatchNewListAllPager(req *http.Request) ( if i.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if i.newListAllPager == nil { + newListAllPager := i.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -549,20 +575,22 @@ func (i *InterfacesServerTransport) dispatchNewListAllPager(req *http.Request) ( return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := i.srv.NewListAllPager(nil) - i.newListAllPager = &resp - server.PagerResponderInjectNextLinks(i.newListAllPager, req, func(page *armnetwork.InterfacesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + i.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.InterfacesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListAllPager) { - i.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + i.newListAllPager.remove(req) } return resp, nil } @@ -571,7 +599,8 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceNetworkInterfaces if i.srv.NewListCloudServiceNetworkInterfacesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListCloudServiceNetworkInterfacesPager not implemented")} } - if i.newListCloudServiceNetworkInterfacesPager == nil { + newListCloudServiceNetworkInterfacesPager := i.newListCloudServiceNetworkInterfacesPager.get(req) + if newListCloudServiceNetworkInterfacesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -587,20 +616,22 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceNetworkInterfaces return nil, err } resp := i.srv.NewListCloudServiceNetworkInterfacesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, nil) - i.newListCloudServiceNetworkInterfacesPager = &resp - server.PagerResponderInjectNextLinks(i.newListCloudServiceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse, createLink func() string) { + newListCloudServiceNetworkInterfacesPager = &resp + i.newListCloudServiceNetworkInterfacesPager.add(req, newListCloudServiceNetworkInterfacesPager) + server.PagerResponderInjectNextLinks(newListCloudServiceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceNetworkInterfacesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListCloudServiceNetworkInterfacesPager, req) + resp, err := server.PagerResponderNext(newListCloudServiceNetworkInterfacesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListCloudServiceNetworkInterfacesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListCloudServiceNetworkInterfacesPager) { - i.newListCloudServiceNetworkInterfacesPager = nil + if !server.PagerResponderMore(newListCloudServiceNetworkInterfacesPager) { + i.newListCloudServiceNetworkInterfacesPager.remove(req) } return resp, nil } @@ -609,7 +640,8 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceRoleInstanceNetwo if i.srv.NewListCloudServiceRoleInstanceNetworkInterfacesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListCloudServiceRoleInstanceNetworkInterfacesPager not implemented")} } - if i.newListCloudServiceRoleInstanceNetworkInterfacesPager == nil { + newListCloudServiceRoleInstanceNetworkInterfacesPager := i.newListCloudServiceRoleInstanceNetworkInterfacesPager.get(req) + if newListCloudServiceRoleInstanceNetworkInterfacesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -629,20 +661,22 @@ func (i *InterfacesServerTransport) dispatchNewListCloudServiceRoleInstanceNetwo return nil, err } resp := i.srv.NewListCloudServiceRoleInstanceNetworkInterfacesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, nil) - i.newListCloudServiceRoleInstanceNetworkInterfacesPager = &resp - server.PagerResponderInjectNextLinks(i.newListCloudServiceRoleInstanceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, createLink func() string) { + newListCloudServiceRoleInstanceNetworkInterfacesPager = &resp + i.newListCloudServiceRoleInstanceNetworkInterfacesPager.add(req, newListCloudServiceRoleInstanceNetworkInterfacesPager) + server.PagerResponderInjectNextLinks(newListCloudServiceRoleInstanceNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListCloudServiceRoleInstanceNetworkInterfacesPager, req) + resp, err := server.PagerResponderNext(newListCloudServiceRoleInstanceNetworkInterfacesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListCloudServiceRoleInstanceNetworkInterfacesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListCloudServiceRoleInstanceNetworkInterfacesPager) { - i.newListCloudServiceRoleInstanceNetworkInterfacesPager = nil + if !server.PagerResponderMore(newListCloudServiceRoleInstanceNetworkInterfacesPager) { + i.newListCloudServiceRoleInstanceNetworkInterfacesPager.remove(req) } return resp, nil } @@ -651,7 +685,8 @@ func (i *InterfacesServerTransport) dispatchBeginListEffectiveNetworkSecurityGro if i.srv.BeginListEffectiveNetworkSecurityGroups == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListEffectiveNetworkSecurityGroups not implemented")} } - if i.beginListEffectiveNetworkSecurityGroups == nil { + beginListEffectiveNetworkSecurityGroups := i.beginListEffectiveNetworkSecurityGroups.get(req) + if beginListEffectiveNetworkSecurityGroups == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveNetworkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -670,19 +705,21 @@ func (i *InterfacesServerTransport) dispatchBeginListEffectiveNetworkSecurityGro if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginListEffectiveNetworkSecurityGroups = &respr + beginListEffectiveNetworkSecurityGroups = &respr + i.beginListEffectiveNetworkSecurityGroups.add(req, beginListEffectiveNetworkSecurityGroups) } - resp, err := server.PollerResponderNext(i.beginListEffectiveNetworkSecurityGroups, req) + resp, err := server.PollerResponderNext(beginListEffectiveNetworkSecurityGroups, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + i.beginListEffectiveNetworkSecurityGroups.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginListEffectiveNetworkSecurityGroups) { - i.beginListEffectiveNetworkSecurityGroups = nil + if !server.PollerResponderMore(beginListEffectiveNetworkSecurityGroups) { + i.beginListEffectiveNetworkSecurityGroups.remove(req) } return resp, nil @@ -692,7 +729,8 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetIPConfi if i.srv.NewListVirtualMachineScaleSetIPConfigurationsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachineScaleSetIPConfigurationsPager not implemented")} } - if i.newListVirtualMachineScaleSetIPConfigurationsPager == nil { + newListVirtualMachineScaleSetIPConfigurationsPager := i.newListVirtualMachineScaleSetIPConfigurationsPager.get(req) + if newListVirtualMachineScaleSetIPConfigurationsPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -728,20 +766,22 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetIPConfi } } resp := i.srv.NewListVirtualMachineScaleSetIPConfigurationsPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, options) - i.newListVirtualMachineScaleSetIPConfigurationsPager = &resp - server.PagerResponderInjectNextLinks(i.newListVirtualMachineScaleSetIPConfigurationsPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, createLink func() string) { + newListVirtualMachineScaleSetIPConfigurationsPager = &resp + i.newListVirtualMachineScaleSetIPConfigurationsPager.add(req, newListVirtualMachineScaleSetIPConfigurationsPager) + server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetIPConfigurationsPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListVirtualMachineScaleSetIPConfigurationsPager, req) + resp, err := server.PagerResponderNext(newListVirtualMachineScaleSetIPConfigurationsPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListVirtualMachineScaleSetIPConfigurationsPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListVirtualMachineScaleSetIPConfigurationsPager) { - i.newListVirtualMachineScaleSetIPConfigurationsPager = nil + if !server.PagerResponderMore(newListVirtualMachineScaleSetIPConfigurationsPager) { + i.newListVirtualMachineScaleSetIPConfigurationsPager.remove(req) } return resp, nil } @@ -750,7 +790,8 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetNetwork if i.srv.NewListVirtualMachineScaleSetNetworkInterfacesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachineScaleSetNetworkInterfacesPager not implemented")} } - if i.newListVirtualMachineScaleSetNetworkInterfacesPager == nil { + newListVirtualMachineScaleSetNetworkInterfacesPager := i.newListVirtualMachineScaleSetNetworkInterfacesPager.get(req) + if newListVirtualMachineScaleSetNetworkInterfacesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -766,20 +807,22 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetNetwork return nil, err } resp := i.srv.NewListVirtualMachineScaleSetNetworkInterfacesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, nil) - i.newListVirtualMachineScaleSetNetworkInterfacesPager = &resp - server.PagerResponderInjectNextLinks(i.newListVirtualMachineScaleSetNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, createLink func() string) { + newListVirtualMachineScaleSetNetworkInterfacesPager = &resp + i.newListVirtualMachineScaleSetNetworkInterfacesPager.add(req, newListVirtualMachineScaleSetNetworkInterfacesPager) + server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListVirtualMachineScaleSetNetworkInterfacesPager, req) + resp, err := server.PagerResponderNext(newListVirtualMachineScaleSetNetworkInterfacesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListVirtualMachineScaleSetNetworkInterfacesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListVirtualMachineScaleSetNetworkInterfacesPager) { - i.newListVirtualMachineScaleSetNetworkInterfacesPager = nil + if !server.PagerResponderMore(newListVirtualMachineScaleSetNetworkInterfacesPager) { + i.newListVirtualMachineScaleSetNetworkInterfacesPager.remove(req) } return resp, nil } @@ -788,7 +831,8 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetVMNetwo if i.srv.NewListVirtualMachineScaleSetVMNetworkInterfacesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachineScaleSetVMNetworkInterfacesPager not implemented")} } - if i.newListVirtualMachineScaleSetVMNetworkInterfacesPager == nil { + newListVirtualMachineScaleSetVMNetworkInterfacesPager := i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.get(req) + if newListVirtualMachineScaleSetVMNetworkInterfacesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -808,20 +852,22 @@ func (i *InterfacesServerTransport) dispatchNewListVirtualMachineScaleSetVMNetwo return nil, err } resp := i.srv.NewListVirtualMachineScaleSetVMNetworkInterfacesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, nil) - i.newListVirtualMachineScaleSetVMNetworkInterfacesPager = &resp - server.PagerResponderInjectNextLinks(i.newListVirtualMachineScaleSetVMNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, createLink func() string) { + newListVirtualMachineScaleSetVMNetworkInterfacesPager = &resp + i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.add(req, newListVirtualMachineScaleSetVMNetworkInterfacesPager) + server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetVMNetworkInterfacesPager, req, func(page *armnetwork.InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListVirtualMachineScaleSetVMNetworkInterfacesPager, req) + resp, err := server.PagerResponderNext(newListVirtualMachineScaleSetVMNetworkInterfacesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListVirtualMachineScaleSetVMNetworkInterfacesPager) { - i.newListVirtualMachineScaleSetVMNetworkInterfacesPager = nil + if !server.PagerResponderMore(newListVirtualMachineScaleSetVMNetworkInterfacesPager) { + i.newListVirtualMachineScaleSetVMNetworkInterfacesPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/interfacetapconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/interfacetapconfigurations_server.go index 9308041f97fa..241cb1793f00 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/interfacetapconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/interfacetapconfigurations_server.go @@ -42,19 +42,24 @@ type InterfaceTapConfigurationsServer struct { } // NewInterfaceTapConfigurationsServerTransport creates a new instance of InterfaceTapConfigurationsServerTransport with the provided implementation. -// The returned InterfaceTapConfigurationsServerTransport instance is connected to an instance of armnetwork.InterfaceTapConfigurationsClient by way of the -// undefined.Transporter field. +// The returned InterfaceTapConfigurationsServerTransport instance is connected to an instance of armnetwork.InterfaceTapConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewInterfaceTapConfigurationsServerTransport(srv *InterfaceTapConfigurationsServer) *InterfaceTapConfigurationsServerTransport { - return &InterfaceTapConfigurationsServerTransport{srv: srv} + return &InterfaceTapConfigurationsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.InterfaceTapConfigurationsClientListResponse]](), + } } // InterfaceTapConfigurationsServerTransport connects instances of armnetwork.InterfaceTapConfigurationsClient to instances of InterfaceTapConfigurationsServer. // Don't use this type directly, use NewInterfaceTapConfigurationsServerTransport instead. type InterfaceTapConfigurationsServerTransport struct { srv *InterfaceTapConfigurationsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.InterfaceTapConfigurationsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.InterfaceTapConfigurationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.InterfaceTapConfigurationsClientListResponse]] } // Do implements the policy.Transporter interface for InterfaceTapConfigurationsServerTransport. @@ -92,7 +97,8 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginCreateOrUpdate( if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginCreateOrUpdate( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginDelete(req *htt if i.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if i.beginDelete == nil { + beginDelete := i.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchBeginDelete(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginDelete = &respr + beginDelete = &respr + i.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(i.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + i.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginDelete) { - i.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + i.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchNewListPager(req *ht if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/tapConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (i *InterfaceTapConfigurationsServerTransport) dispatchNewListPager(req *ht return nil, err } resp := i.srv.NewListPager(resourceGroupNameUnescaped, networkInterfaceNameUnescaped, nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.InterfaceTapConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.InterfaceTapConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/internal.go b/sdk/resourcemanager/network/armnetwork/fake/internal.go index e9c8222f2199..03b635903572 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/internal.go +++ b/sdk/resourcemanager/network/armnetwork/fake/internal.go @@ -12,6 +12,9 @@ import ( "io" "net/http" "reflect" + "regexp" + "strings" + "sync" ) type nonRetriableError struct { @@ -76,3 +79,45 @@ func contains[T comparable](s []T, v T) bool { } return false } + +func newTracker[T any]() *tracker[T] { + return &tracker[T]{ + items: map[string]*T{}, + } +} + +type tracker[T any] struct { + items map[string]*T + mu sync.Mutex +} + +func (p *tracker[T]) key(req *http.Request) string { + path := req.URL.Path + if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { + path = path[:strings.LastIndex(path, "/")] + } else if strings.HasSuffix(path, "/get/fake/status") { + path = path[:len(path)-16] + } + return path +} + +func (p *tracker[T]) get(req *http.Request) *T { + p.mu.Lock() + defer p.mu.Unlock() + if item, ok := p.items[p.key(req)]; ok { + return item + } + return nil +} + +func (p *tracker[T]) add(req *http.Request, item *T) { + p.mu.Lock() + defer p.mu.Unlock() + p.items[p.key(req)] = item +} + +func (p *tracker[T]) remove(req *http.Request) { + p.mu.Lock() + defer p.mu.Unlock() + delete(p.items, p.key(req)) +} diff --git a/sdk/resourcemanager/network/armnetwork/fake/ipallocations_server.go b/sdk/resourcemanager/network/armnetwork/fake/ipallocations_server.go index fa2b84a16f86..8805d8de6061 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/ipallocations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/ipallocations_server.go @@ -50,20 +50,26 @@ type IPAllocationsServer struct { } // NewIPAllocationsServerTransport creates a new instance of IPAllocationsServerTransport with the provided implementation. -// The returned IPAllocationsServerTransport instance is connected to an instance of armnetwork.IPAllocationsClient by way of the -// undefined.Transporter field. +// The returned IPAllocationsServerTransport instance is connected to an instance of armnetwork.IPAllocationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewIPAllocationsServerTransport(srv *IPAllocationsServer) *IPAllocationsServerTransport { - return &IPAllocationsServerTransport{srv: srv} + return &IPAllocationsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.IPAllocationsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.IPAllocationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.IPAllocationsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.IPAllocationsClientListByResourceGroupResponse]](), + } } // IPAllocationsServerTransport connects instances of armnetwork.IPAllocationsClient to instances of IPAllocationsServer. // Don't use this type directly, use NewIPAllocationsServerTransport instead. type IPAllocationsServerTransport struct { srv *IPAllocationsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.IPAllocationsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.IPAllocationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.IPAllocationsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.IPAllocationsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.IPAllocationsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.IPAllocationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.IPAllocationsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.IPAllocationsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for IPAllocationsServerTransport. @@ -105,7 +111,8 @@ func (i *IPAllocationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (i *IPAllocationsServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (i *IPAllocationsServerTransport) dispatchBeginDelete(req *http.Request) (* if i.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if i.beginDelete == nil { + beginDelete := i.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (i *IPAllocationsServerTransport) dispatchBeginDelete(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginDelete = &respr + beginDelete = &respr + i.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(i.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + i.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginDelete) { - i.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + i.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (i *IPAllocationsServerTransport) dispatchNewListPager(req *http.Request) ( if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -244,20 +257,22 @@ func (i *IPAllocationsServerTransport) dispatchNewListPager(req *http.Request) ( return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := i.srv.NewListPager(nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.IPAllocationsClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.IPAllocationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } @@ -266,7 +281,8 @@ func (i *IPAllocationsServerTransport) dispatchNewListByResourceGroupPager(req * if i.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if i.newListByResourceGroupPager == nil { + newListByResourceGroupPager := i.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/IpAllocations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (i *IPAllocationsServerTransport) dispatchNewListByResourceGroupPager(req * return nil, err } resp := i.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - i.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(i.newListByResourceGroupPager, req, func(page *armnetwork.IPAllocationsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + i.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.IPAllocationsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListByResourceGroupPager) { - i.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + i.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/ipgroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/ipgroups_server.go index 53b726a482fa..c1939bb06aa0 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/ipgroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/ipgroups_server.go @@ -50,20 +50,26 @@ type IPGroupsServer struct { } // NewIPGroupsServerTransport creates a new instance of IPGroupsServerTransport with the provided implementation. -// The returned IPGroupsServerTransport instance is connected to an instance of armnetwork.IPGroupsClient by way of the -// undefined.Transporter field. +// The returned IPGroupsServerTransport instance is connected to an instance of armnetwork.IPGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewIPGroupsServerTransport(srv *IPGroupsServer) *IPGroupsServerTransport { - return &IPGroupsServerTransport{srv: srv} + return &IPGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.IPGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.IPGroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.IPGroupsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.IPGroupsClientListByResourceGroupResponse]](), + } } // IPGroupsServerTransport connects instances of armnetwork.IPGroupsClient to instances of IPGroupsServer. // Don't use this type directly, use NewIPGroupsServerTransport instead. type IPGroupsServerTransport struct { srv *IPGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.IPGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.IPGroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.IPGroupsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.IPGroupsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.IPGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.IPGroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.IPGroupsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.IPGroupsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for IPGroupsServerTransport. @@ -105,7 +111,8 @@ func (i *IPGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if i.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if i.beginCreateOrUpdate == nil { + beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (i *IPGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(i.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + i.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginCreateOrUpdate) { - i.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + i.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (i *IPGroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http. if i.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if i.beginDelete == nil { + beginDelete := i.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (i *IPGroupsServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - i.beginDelete = &respr + beginDelete = &respr + i.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(i.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + i.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(i.beginDelete) { - i.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + i.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (i *IPGroupsServerTransport) dispatchNewListPager(req *http.Request) (*http if i.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if i.newListPager == nil { + newListPager := i.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -244,20 +257,22 @@ func (i *IPGroupsServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := i.srv.NewListPager(nil) - i.newListPager = &resp - server.PagerResponderInjectNextLinks(i.newListPager, req, func(page *armnetwork.IPGroupsClientListResponse, createLink func() string) { + newListPager = &resp + i.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.IPGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListPager) { - i.newListPager = nil + if !server.PagerResponderMore(newListPager) { + i.newListPager.remove(req) } return resp, nil } @@ -266,7 +281,8 @@ func (i *IPGroupsServerTransport) dispatchNewListByResourceGroupPager(req *http. if i.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if i.newListByResourceGroupPager == nil { + newListByResourceGroupPager := i.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ipGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (i *IPGroupsServerTransport) dispatchNewListByResourceGroupPager(req *http. return nil, err } resp := i.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - i.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(i.newListByResourceGroupPager, req, func(page *armnetwork.IPGroupsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + i.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.IPGroupsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(i.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + i.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(i.newListByResourceGroupPager) { - i.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + i.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerbackendaddresspools_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerbackendaddresspools_server.go index ad06d42357f8..72d7bce461ab 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerbackendaddresspools_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerbackendaddresspools_server.go @@ -42,19 +42,24 @@ type LoadBalancerBackendAddressPoolsServer struct { } // NewLoadBalancerBackendAddressPoolsServerTransport creates a new instance of LoadBalancerBackendAddressPoolsServerTransport with the provided implementation. -// The returned LoadBalancerBackendAddressPoolsServerTransport instance is connected to an instance of armnetwork.LoadBalancerBackendAddressPoolsClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerBackendAddressPoolsServerTransport instance is connected to an instance of armnetwork.LoadBalancerBackendAddressPoolsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerBackendAddressPoolsServerTransport(srv *LoadBalancerBackendAddressPoolsServer) *LoadBalancerBackendAddressPoolsServerTransport { - return &LoadBalancerBackendAddressPoolsServerTransport{srv: srv} + return &LoadBalancerBackendAddressPoolsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientListResponse]](), + } } // LoadBalancerBackendAddressPoolsServerTransport connects instances of armnetwork.LoadBalancerBackendAddressPoolsClient to instances of LoadBalancerBackendAddressPoolsServer. // Don't use this type directly, use NewLoadBalancerBackendAddressPoolsServerTransport instead. type LoadBalancerBackendAddressPoolsServerTransport struct { srv *LoadBalancerBackendAddressPoolsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerBackendAddressPoolsClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerBackendAddressPoolsServerTransport. @@ -92,7 +97,8 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginCreateOrUp if l.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if l.beginCreateOrUpdate == nil { + beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginCreateOrUp if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + l.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(l.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + l.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginCreateOrUpdate) { - l.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + l.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginDelete(req if l.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if l.beginDelete == nil { + beginDelete := l.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchBeginDelete(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginDelete = &respr + beginDelete = &respr + l.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(l.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + l.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginDelete) { - l.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + l.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchNewListPager(re if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (l *LoadBalancerBackendAddressPoolsServerTransport) dispatchNewListPager(re return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerBackendAddressPoolsClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerBackendAddressPoolsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerfrontendipconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerfrontendipconfigurations_server.go index a0a4933eec5c..f251a4d0e50b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerfrontendipconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerfrontendipconfigurations_server.go @@ -34,17 +34,20 @@ type LoadBalancerFrontendIPConfigurationsServer struct { } // NewLoadBalancerFrontendIPConfigurationsServerTransport creates a new instance of LoadBalancerFrontendIPConfigurationsServerTransport with the provided implementation. -// The returned LoadBalancerFrontendIPConfigurationsServerTransport instance is connected to an instance of armnetwork.LoadBalancerFrontendIPConfigurationsClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerFrontendIPConfigurationsServerTransport instance is connected to an instance of armnetwork.LoadBalancerFrontendIPConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerFrontendIPConfigurationsServerTransport(srv *LoadBalancerFrontendIPConfigurationsServer) *LoadBalancerFrontendIPConfigurationsServerTransport { - return &LoadBalancerFrontendIPConfigurationsServerTransport{srv: srv} + return &LoadBalancerFrontendIPConfigurationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse]](), + } } // LoadBalancerFrontendIPConfigurationsServerTransport connects instances of armnetwork.LoadBalancerFrontendIPConfigurationsClient to instances of LoadBalancerFrontendIPConfigurationsServer. // Don't use this type directly, use NewLoadBalancerFrontendIPConfigurationsServerTransport instead. type LoadBalancerFrontendIPConfigurationsServerTransport struct { srv *LoadBalancerFrontendIPConfigurationsServer - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerFrontendIPConfigurationsServerTransport. @@ -115,7 +118,8 @@ func (l *LoadBalancerFrontendIPConfigurationsServerTransport) dispatchNewListPag if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/frontendIPConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (l *LoadBalancerFrontendIPConfigurationsServerTransport) dispatchNewListPag return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerFrontendIPConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerloadbalancingrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerloadbalancingrules_server.go index b23394c296cc..7365be42928d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerloadbalancingrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerloadbalancingrules_server.go @@ -34,17 +34,20 @@ type LoadBalancerLoadBalancingRulesServer struct { } // NewLoadBalancerLoadBalancingRulesServerTransport creates a new instance of LoadBalancerLoadBalancingRulesServerTransport with the provided implementation. -// The returned LoadBalancerLoadBalancingRulesServerTransport instance is connected to an instance of armnetwork.LoadBalancerLoadBalancingRulesClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerLoadBalancingRulesServerTransport instance is connected to an instance of armnetwork.LoadBalancerLoadBalancingRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerLoadBalancingRulesServerTransport(srv *LoadBalancerLoadBalancingRulesServer) *LoadBalancerLoadBalancingRulesServerTransport { - return &LoadBalancerLoadBalancingRulesServerTransport{srv: srv} + return &LoadBalancerLoadBalancingRulesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerLoadBalancingRulesClientListResponse]](), + } } // LoadBalancerLoadBalancingRulesServerTransport connects instances of armnetwork.LoadBalancerLoadBalancingRulesClient to instances of LoadBalancerLoadBalancingRulesServer. // Don't use this type directly, use NewLoadBalancerLoadBalancingRulesServerTransport instead. type LoadBalancerLoadBalancingRulesServerTransport struct { srv *LoadBalancerLoadBalancingRulesServer - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerLoadBalancingRulesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerLoadBalancingRulesClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerLoadBalancingRulesServerTransport. @@ -115,7 +118,8 @@ func (l *LoadBalancerLoadBalancingRulesServerTransport) dispatchNewListPager(req if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancingRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (l *LoadBalancerLoadBalancingRulesServerTransport) dispatchNewListPager(req return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerLoadBalancingRulesClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerLoadBalancingRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancernetworkinterfaces_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancernetworkinterfaces_server.go index ba276df99cfe..169dce20b83c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancernetworkinterfaces_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancernetworkinterfaces_server.go @@ -29,17 +29,20 @@ type LoadBalancerNetworkInterfacesServer struct { } // NewLoadBalancerNetworkInterfacesServerTransport creates a new instance of LoadBalancerNetworkInterfacesServerTransport with the provided implementation. -// The returned LoadBalancerNetworkInterfacesServerTransport instance is connected to an instance of armnetwork.LoadBalancerNetworkInterfacesClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerNetworkInterfacesServerTransport instance is connected to an instance of armnetwork.LoadBalancerNetworkInterfacesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerNetworkInterfacesServerTransport(srv *LoadBalancerNetworkInterfacesServer) *LoadBalancerNetworkInterfacesServerTransport { - return &LoadBalancerNetworkInterfacesServerTransport{srv: srv} + return &LoadBalancerNetworkInterfacesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerNetworkInterfacesClientListResponse]](), + } } // LoadBalancerNetworkInterfacesServerTransport connects instances of armnetwork.LoadBalancerNetworkInterfacesClient to instances of LoadBalancerNetworkInterfacesServer. // Don't use this type directly, use NewLoadBalancerNetworkInterfacesServerTransport instead. type LoadBalancerNetworkInterfacesServerTransport struct { srv *LoadBalancerNetworkInterfacesServer - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerNetworkInterfacesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerNetworkInterfacesClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerNetworkInterfacesServerTransport. @@ -71,7 +74,8 @@ func (l *LoadBalancerNetworkInterfacesServerTransport) dispatchNewListPager(req if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -87,20 +91,22 @@ func (l *LoadBalancerNetworkInterfacesServerTransport) dispatchNewListPager(req return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerNetworkInterfacesClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerNetworkInterfacesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalanceroutboundrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalanceroutboundrules_server.go index 83c0140ca0d2..ad0db80677b3 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalanceroutboundrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalanceroutboundrules_server.go @@ -34,17 +34,20 @@ type LoadBalancerOutboundRulesServer struct { } // NewLoadBalancerOutboundRulesServerTransport creates a new instance of LoadBalancerOutboundRulesServerTransport with the provided implementation. -// The returned LoadBalancerOutboundRulesServerTransport instance is connected to an instance of armnetwork.LoadBalancerOutboundRulesClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerOutboundRulesServerTransport instance is connected to an instance of armnetwork.LoadBalancerOutboundRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerOutboundRulesServerTransport(srv *LoadBalancerOutboundRulesServer) *LoadBalancerOutboundRulesServerTransport { - return &LoadBalancerOutboundRulesServerTransport{srv: srv} + return &LoadBalancerOutboundRulesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerOutboundRulesClientListResponse]](), + } } // LoadBalancerOutboundRulesServerTransport connects instances of armnetwork.LoadBalancerOutboundRulesClient to instances of LoadBalancerOutboundRulesServer. // Don't use this type directly, use NewLoadBalancerOutboundRulesServerTransport instead. type LoadBalancerOutboundRulesServerTransport struct { srv *LoadBalancerOutboundRulesServer - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerOutboundRulesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerOutboundRulesClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerOutboundRulesServerTransport. @@ -115,7 +118,8 @@ func (l *LoadBalancerOutboundRulesServerTransport) dispatchNewListPager(req *htt if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (l *LoadBalancerOutboundRulesServerTransport) dispatchNewListPager(req *htt return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerOutboundRulesClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerOutboundRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerprobes_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerprobes_server.go index 8815f0c0de32..b8410a06421d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancerprobes_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancerprobes_server.go @@ -34,17 +34,20 @@ type LoadBalancerProbesServer struct { } // NewLoadBalancerProbesServerTransport creates a new instance of LoadBalancerProbesServerTransport with the provided implementation. -// The returned LoadBalancerProbesServerTransport instance is connected to an instance of armnetwork.LoadBalancerProbesClient by way of the -// undefined.Transporter field. +// The returned LoadBalancerProbesServerTransport instance is connected to an instance of armnetwork.LoadBalancerProbesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancerProbesServerTransport(srv *LoadBalancerProbesServer) *LoadBalancerProbesServerTransport { - return &LoadBalancerProbesServerTransport{srv: srv} + return &LoadBalancerProbesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancerProbesClientListResponse]](), + } } // LoadBalancerProbesServerTransport connects instances of armnetwork.LoadBalancerProbesClient to instances of LoadBalancerProbesServer. // Don't use this type directly, use NewLoadBalancerProbesServerTransport instead. type LoadBalancerProbesServerTransport struct { srv *LoadBalancerProbesServer - newListPager *azfake.PagerResponder[armnetwork.LoadBalancerProbesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancerProbesClientListResponse]] } // Do implements the policy.Transporter interface for LoadBalancerProbesServerTransport. @@ -115,7 +118,8 @@ func (l *LoadBalancerProbesServerTransport) dispatchNewListPager(req *http.Reque if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/probes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (l *LoadBalancerProbesServerTransport) dispatchNewListPager(req *http.Reque return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, loadBalancerNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancerProbesClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancerProbesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/loadbalancers_server.go b/sdk/resourcemanager/network/armnetwork/fake/loadbalancers_server.go index ad3207f009b5..3b7fbc8acbf1 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/loadbalancers_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/loadbalancers_server.go @@ -58,22 +58,30 @@ type LoadBalancersServer struct { } // NewLoadBalancersServerTransport creates a new instance of LoadBalancersServerTransport with the provided implementation. -// The returned LoadBalancersServerTransport instance is connected to an instance of armnetwork.LoadBalancersClient by way of the -// undefined.Transporter field. +// The returned LoadBalancersServerTransport instance is connected to an instance of armnetwork.LoadBalancersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLoadBalancersServerTransport(srv *LoadBalancersServer) *LoadBalancersServerTransport { - return &LoadBalancersServerTransport{srv: srv} + return &LoadBalancersServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.LoadBalancersClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.LoadBalancersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancersClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.LoadBalancersClientListAllResponse]](), + beginListInboundNatRulePortMappings: newTracker[azfake.PollerResponder[armnetwork.LoadBalancersClientListInboundNatRulePortMappingsResponse]](), + beginSwapPublicIPAddresses: newTracker[azfake.PollerResponder[armnetwork.LoadBalancersClientSwapPublicIPAddressesResponse]](), + } } // LoadBalancersServerTransport connects instances of armnetwork.LoadBalancersClient to instances of LoadBalancersServer. // Don't use this type directly, use NewLoadBalancersServerTransport instead. type LoadBalancersServerTransport struct { srv *LoadBalancersServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.LoadBalancersClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.LoadBalancersClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.LoadBalancersClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.LoadBalancersClientListAllResponse] - beginListInboundNatRulePortMappings *azfake.PollerResponder[armnetwork.LoadBalancersClientListInboundNatRulePortMappingsResponse] - beginSwapPublicIPAddresses *azfake.PollerResponder[armnetwork.LoadBalancersClientSwapPublicIPAddressesResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.LoadBalancersClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.LoadBalancersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancersClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.LoadBalancersClientListAllResponse]] + beginListInboundNatRulePortMappings *tracker[azfake.PollerResponder[armnetwork.LoadBalancersClientListInboundNatRulePortMappingsResponse]] + beginSwapPublicIPAddresses *tracker[azfake.PollerResponder[armnetwork.LoadBalancersClientSwapPublicIPAddressesResponse]] } // Do implements the policy.Transporter interface for LoadBalancersServerTransport. @@ -119,7 +127,8 @@ func (l *LoadBalancersServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if l.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if l.beginCreateOrUpdate == nil { + beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -142,19 +151,21 @@ func (l *LoadBalancersServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + l.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(l.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + l.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginCreateOrUpdate) { - l.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + l.beginCreateOrUpdate.remove(req) } return resp, nil @@ -164,7 +175,8 @@ func (l *LoadBalancersServerTransport) dispatchBeginDelete(req *http.Request) (* if l.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if l.beginDelete == nil { + beginDelete := l.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -183,19 +195,21 @@ func (l *LoadBalancersServerTransport) dispatchBeginDelete(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginDelete = &respr + beginDelete = &respr + l.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(l.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + l.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginDelete) { - l.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + l.beginDelete.remove(req) } return resp, nil @@ -250,7 +264,8 @@ func (l *LoadBalancersServerTransport) dispatchNewListPager(req *http.Request) ( if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -262,20 +277,22 @@ func (l *LoadBalancersServerTransport) dispatchNewListPager(req *http.Request) ( return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LoadBalancersClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LoadBalancersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } @@ -284,7 +301,8 @@ func (l *LoadBalancersServerTransport) dispatchNewListAllPager(req *http.Request if l.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if l.newListAllPager == nil { + newListAllPager := l.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -292,20 +310,22 @@ func (l *LoadBalancersServerTransport) dispatchNewListAllPager(req *http.Request return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := l.srv.NewListAllPager(nil) - l.newListAllPager = &resp - server.PagerResponderInjectNextLinks(l.newListAllPager, req, func(page *armnetwork.LoadBalancersClientListAllResponse, createLink func() string) { + newListAllPager = &resp + l.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.LoadBalancersClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListAllPager) { - l.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + l.newListAllPager.remove(req) } return resp, nil } @@ -314,7 +334,8 @@ func (l *LoadBalancersServerTransport) dispatchBeginListInboundNatRulePortMappin if l.srv.BeginListInboundNatRulePortMappings == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListInboundNatRulePortMappings not implemented")} } - if l.beginListInboundNatRulePortMappings == nil { + beginListInboundNatRulePortMappings := l.beginListInboundNatRulePortMappings.get(req) + if beginListInboundNatRulePortMappings == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/backendAddressPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryInboundNatRulePortMapping` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -341,19 +362,21 @@ func (l *LoadBalancersServerTransport) dispatchBeginListInboundNatRulePortMappin if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginListInboundNatRulePortMappings = &respr + beginListInboundNatRulePortMappings = &respr + l.beginListInboundNatRulePortMappings.add(req, beginListInboundNatRulePortMappings) } - resp, err := server.PollerResponderNext(l.beginListInboundNatRulePortMappings, req) + resp, err := server.PollerResponderNext(beginListInboundNatRulePortMappings, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + l.beginListInboundNatRulePortMappings.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginListInboundNatRulePortMappings) { - l.beginListInboundNatRulePortMappings = nil + if !server.PollerResponderMore(beginListInboundNatRulePortMappings) { + l.beginListInboundNatRulePortMappings.remove(req) } return resp, nil @@ -363,7 +386,8 @@ func (l *LoadBalancersServerTransport) dispatchBeginSwapPublicIPAddresses(req *h if l.srv.BeginSwapPublicIPAddresses == nil { return nil, &nonRetriableError{errors.New("fake for method BeginSwapPublicIPAddresses not implemented")} } - if l.beginSwapPublicIPAddresses == nil { + beginSwapPublicIPAddresses := l.beginSwapPublicIPAddresses.get(req) + if beginSwapPublicIPAddresses == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setLoadBalancerFrontendPublicIpAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -382,19 +406,21 @@ func (l *LoadBalancersServerTransport) dispatchBeginSwapPublicIPAddresses(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginSwapPublicIPAddresses = &respr + beginSwapPublicIPAddresses = &respr + l.beginSwapPublicIPAddresses.add(req, beginSwapPublicIPAddresses) } - resp, err := server.PollerResponderNext(l.beginSwapPublicIPAddresses, req) + resp, err := server.PollerResponderNext(beginSwapPublicIPAddresses, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + l.beginSwapPublicIPAddresses.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginSwapPublicIPAddresses) { - l.beginSwapPublicIPAddresses = nil + if !server.PollerResponderMore(beginSwapPublicIPAddresses) { + l.beginSwapPublicIPAddresses.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/localnetworkgateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/localnetworkgateways_server.go index 57ee105d7a70..2dd5855e712b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/localnetworkgateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/localnetworkgateways_server.go @@ -46,19 +46,24 @@ type LocalNetworkGatewaysServer struct { } // NewLocalNetworkGatewaysServerTransport creates a new instance of LocalNetworkGatewaysServerTransport with the provided implementation. -// The returned LocalNetworkGatewaysServerTransport instance is connected to an instance of armnetwork.LocalNetworkGatewaysClient by way of the -// undefined.Transporter field. +// The returned LocalNetworkGatewaysServerTransport instance is connected to an instance of armnetwork.LocalNetworkGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewLocalNetworkGatewaysServerTransport(srv *LocalNetworkGatewaysServer) *LocalNetworkGatewaysServerTransport { - return &LocalNetworkGatewaysServerTransport{srv: srv} + return &LocalNetworkGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.LocalNetworkGatewaysClientListResponse]](), + } } // LocalNetworkGatewaysServerTransport connects instances of armnetwork.LocalNetworkGatewaysClient to instances of LocalNetworkGatewaysServer. // Don't use this type directly, use NewLocalNetworkGatewaysServerTransport instead. type LocalNetworkGatewaysServerTransport struct { srv *LocalNetworkGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.LocalNetworkGatewaysClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.LocalNetworkGatewaysClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.LocalNetworkGatewaysClientListResponse]] } // Do implements the policy.Transporter interface for LocalNetworkGatewaysServerTransport. @@ -98,7 +103,8 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if l.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if l.beginCreateOrUpdate == nil { + beginCreateOrUpdate := l.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -121,19 +127,21 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + l.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(l.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + l.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginCreateOrUpdate) { - l.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + l.beginCreateOrUpdate.remove(req) } return resp, nil @@ -143,7 +151,8 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Requ if l.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if l.beginDelete == nil { + beginDelete := l.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -162,19 +171,21 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - l.beginDelete = &respr + beginDelete = &respr + l.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(l.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + l.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(l.beginDelete) { - l.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + l.beginDelete.remove(req) } return resp, nil @@ -217,7 +228,8 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchNewListPager(req *http.Req if l.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if l.newListPager == nil { + newListPager := l.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/localNetworkGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -229,20 +241,22 @@ func (l *LocalNetworkGatewaysServerTransport) dispatchNewListPager(req *http.Req return nil, err } resp := l.srv.NewListPager(resourceGroupNameUnescaped, nil) - l.newListPager = &resp - server.PagerResponderInjectNextLinks(l.newListPager, req, func(page *armnetwork.LocalNetworkGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + l.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.LocalNetworkGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(l.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + l.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(l.newListPager) { - l.newListPager = nil + if !server.PagerResponderMore(newListPager) { + l.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/management_server.go b/sdk/resourcemanager/network/armnetwork/fake/management_server.go index d9fbac9f6a5f..252817410f07 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/management_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/management_server.go @@ -79,22 +79,30 @@ type ManagementServer struct { } // NewManagementServerTransport creates a new instance of ManagementServerTransport with the provided implementation. -// The returned ManagementServerTransport instance is connected to an instance of armnetwork.ManagementClient by way of the -// undefined.Transporter field. +// The returned ManagementServerTransport instance is connected to an instance of armnetwork.ManagementClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagementServerTransport(srv *ManagementServer) *ManagementServerTransport { - return &ManagementServerTransport{srv: srv} + return &ManagementServerTransport{ + srv: srv, + beginDeleteBastionShareableLink: newTracker[azfake.PollerResponder[armnetwork.ManagementClientDeleteBastionShareableLinkResponse]](), + newDisconnectActiveSessionsPager: newTracker[azfake.PagerResponder[armnetwork.ManagementClientDisconnectActiveSessionsResponse]](), + beginGeneratevirtualwanvpnserverconfigurationvpnprofile: newTracker[azfake.PollerResponder[armnetwork.ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]](), + beginGetActiveSessions: newTracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientGetActiveSessionsResponse]]](), + newGetBastionShareableLinkPager: newTracker[azfake.PagerResponder[armnetwork.ManagementClientGetBastionShareableLinkResponse]](), + beginPutBastionShareableLink: newTracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientPutBastionShareableLinkResponse]]](), + } } // ManagementServerTransport connects instances of armnetwork.ManagementClient to instances of ManagementServer. // Don't use this type directly, use NewManagementServerTransport instead. type ManagementServerTransport struct { srv *ManagementServer - beginDeleteBastionShareableLink *azfake.PollerResponder[armnetwork.ManagementClientDeleteBastionShareableLinkResponse] - newDisconnectActiveSessionsPager *azfake.PagerResponder[armnetwork.ManagementClientDisconnectActiveSessionsResponse] - beginGeneratevirtualwanvpnserverconfigurationvpnprofile *azfake.PollerResponder[armnetwork.ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse] - beginGetActiveSessions *azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientGetActiveSessionsResponse]] - newGetBastionShareableLinkPager *azfake.PagerResponder[armnetwork.ManagementClientGetBastionShareableLinkResponse] - beginPutBastionShareableLink *azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientPutBastionShareableLinkResponse]] + beginDeleteBastionShareableLink *tracker[azfake.PollerResponder[armnetwork.ManagementClientDeleteBastionShareableLinkResponse]] + newDisconnectActiveSessionsPager *tracker[azfake.PagerResponder[armnetwork.ManagementClientDisconnectActiveSessionsResponse]] + beginGeneratevirtualwanvpnserverconfigurationvpnprofile *tracker[azfake.PollerResponder[armnetwork.ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]] + beginGetActiveSessions *tracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientGetActiveSessionsResponse]]] + newGetBastionShareableLinkPager *tracker[azfake.PagerResponder[armnetwork.ManagementClientGetBastionShareableLinkResponse]] + beginPutBastionShareableLink *tracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.ManagementClientPutBastionShareableLinkResponse]]] } // Do implements the policy.Transporter interface for ManagementServerTransport. @@ -184,7 +192,8 @@ func (m *ManagementServerTransport) dispatchBeginDeleteBastionShareableLink(req if m.srv.BeginDeleteBastionShareableLink == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeleteBastionShareableLink not implemented")} } - if m.beginDeleteBastionShareableLink == nil { + beginDeleteBastionShareableLink := m.beginDeleteBastionShareableLink.get(req) + if beginDeleteBastionShareableLink == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/deleteShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -207,19 +216,21 @@ func (m *ManagementServerTransport) dispatchBeginDeleteBastionShareableLink(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginDeleteBastionShareableLink = &respr + beginDeleteBastionShareableLink = &respr + m.beginDeleteBastionShareableLink.add(req, beginDeleteBastionShareableLink) } - resp, err := server.PollerResponderNext(m.beginDeleteBastionShareableLink, req) + resp, err := server.PollerResponderNext(beginDeleteBastionShareableLink, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + m.beginDeleteBastionShareableLink.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginDeleteBastionShareableLink) { - m.beginDeleteBastionShareableLink = nil + if !server.PollerResponderMore(beginDeleteBastionShareableLink) { + m.beginDeleteBastionShareableLink.remove(req) } return resp, nil @@ -229,7 +240,8 @@ func (m *ManagementServerTransport) dispatchNewDisconnectActiveSessionsPager(req if m.srv.NewDisconnectActiveSessionsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewDisconnectActiveSessionsPager not implemented")} } - if m.newDisconnectActiveSessionsPager == nil { + newDisconnectActiveSessionsPager := m.newDisconnectActiveSessionsPager.get(req) + if newDisconnectActiveSessionsPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectActiveSessions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -249,20 +261,22 @@ func (m *ManagementServerTransport) dispatchNewDisconnectActiveSessionsPager(req return nil, err } resp := m.srv.NewDisconnectActiveSessionsPager(resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) - m.newDisconnectActiveSessionsPager = &resp - server.PagerResponderInjectNextLinks(m.newDisconnectActiveSessionsPager, req, func(page *armnetwork.ManagementClientDisconnectActiveSessionsResponse, createLink func() string) { + newDisconnectActiveSessionsPager = &resp + m.newDisconnectActiveSessionsPager.add(req, newDisconnectActiveSessionsPager) + server.PagerResponderInjectNextLinks(newDisconnectActiveSessionsPager, req, func(page *armnetwork.ManagementClientDisconnectActiveSessionsResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(m.newDisconnectActiveSessionsPager, req) + resp, err := server.PagerResponderNext(newDisconnectActiveSessionsPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + m.newDisconnectActiveSessionsPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(m.newDisconnectActiveSessionsPager) { - m.newDisconnectActiveSessionsPager = nil + if !server.PagerResponderMore(newDisconnectActiveSessionsPager) { + m.newDisconnectActiveSessionsPager.remove(req) } return resp, nil } @@ -300,7 +314,8 @@ func (m *ManagementServerTransport) dispatchBeginGeneratevirtualwanvpnserverconf if m.srv.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGeneratevirtualwanvpnserverconfigurationvpnprofile not implemented")} } - if m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile == nil { + beginGeneratevirtualwanvpnserverconfigurationvpnprofile := m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile.get(req) + if beginGeneratevirtualwanvpnserverconfigurationvpnprofile == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/GenerateVpnProfile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -323,19 +338,21 @@ func (m *ManagementServerTransport) dispatchBeginGeneratevirtualwanvpnserverconf if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile = &respr + beginGeneratevirtualwanvpnserverconfigurationvpnprofile = &respr + m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile.add(req, beginGeneratevirtualwanvpnserverconfigurationvpnprofile) } - resp, err := server.PollerResponderNext(m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile, req) + resp, err := server.PollerResponderNext(beginGeneratevirtualwanvpnserverconfigurationvpnprofile, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile) { - m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile = nil + if !server.PollerResponderMore(beginGeneratevirtualwanvpnserverconfigurationvpnprofile) { + m.beginGeneratevirtualwanvpnserverconfigurationvpnprofile.remove(req) } return resp, nil @@ -345,7 +362,8 @@ func (m *ManagementServerTransport) dispatchBeginGetActiveSessions(req *http.Req if m.srv.BeginGetActiveSessions == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetActiveSessions not implemented")} } - if m.beginGetActiveSessions == nil { + beginGetActiveSessions := m.beginGetActiveSessions.get(req) + if beginGetActiveSessions == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getActiveSessions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -364,19 +382,21 @@ func (m *ManagementServerTransport) dispatchBeginGetActiveSessions(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginGetActiveSessions = &respr + beginGetActiveSessions = &respr + m.beginGetActiveSessions.add(req, beginGetActiveSessions) } - resp, err := server.PollerResponderNext(m.beginGetActiveSessions, req) + resp, err := server.PollerResponderNext(beginGetActiveSessions, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + m.beginGetActiveSessions.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginGetActiveSessions) { - m.beginGetActiveSessions = nil + if !server.PollerResponderMore(beginGetActiveSessions) { + m.beginGetActiveSessions.remove(req) } return resp, nil @@ -386,7 +406,8 @@ func (m *ManagementServerTransport) dispatchNewGetBastionShareableLinkPager(req if m.srv.NewGetBastionShareableLinkPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewGetBastionShareableLinkPager not implemented")} } - if m.newGetBastionShareableLinkPager == nil { + newGetBastionShareableLinkPager := m.newGetBastionShareableLinkPager.get(req) + if newGetBastionShareableLinkPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -406,20 +427,22 @@ func (m *ManagementServerTransport) dispatchNewGetBastionShareableLinkPager(req return nil, err } resp := m.srv.NewGetBastionShareableLinkPager(resourceGroupNameUnescaped, bastionHostNameUnescaped, body, nil) - m.newGetBastionShareableLinkPager = &resp - server.PagerResponderInjectNextLinks(m.newGetBastionShareableLinkPager, req, func(page *armnetwork.ManagementClientGetBastionShareableLinkResponse, createLink func() string) { + newGetBastionShareableLinkPager = &resp + m.newGetBastionShareableLinkPager.add(req, newGetBastionShareableLinkPager) + server.PagerResponderInjectNextLinks(newGetBastionShareableLinkPager, req, func(page *armnetwork.ManagementClientGetBastionShareableLinkResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(m.newGetBastionShareableLinkPager, req) + resp, err := server.PagerResponderNext(newGetBastionShareableLinkPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + m.newGetBastionShareableLinkPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(m.newGetBastionShareableLinkPager) { - m.newGetBastionShareableLinkPager = nil + if !server.PagerResponderMore(newGetBastionShareableLinkPager) { + m.newGetBastionShareableLinkPager.remove(req) } return resp, nil } @@ -660,7 +683,8 @@ func (m *ManagementServerTransport) dispatchBeginPutBastionShareableLink(req *ht if m.srv.BeginPutBastionShareableLink == nil { return nil, &nonRetriableError{errors.New("fake for method BeginPutBastionShareableLink not implemented")} } - if m.beginPutBastionShareableLink == nil { + beginPutBastionShareableLink := m.beginPutBastionShareableLink.get(req) + if beginPutBastionShareableLink == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/bastionHosts/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/createShareableLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -683,19 +707,21 @@ func (m *ManagementServerTransport) dispatchBeginPutBastionShareableLink(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginPutBastionShareableLink = &respr + beginPutBastionShareableLink = &respr + m.beginPutBastionShareableLink.add(req, beginPutBastionShareableLink) } - resp, err := server.PollerResponderNext(m.beginPutBastionShareableLink, req) + resp, err := server.PollerResponderNext(beginPutBastionShareableLink, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + m.beginPutBastionShareableLink.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginPutBastionShareableLink) { - m.beginPutBastionShareableLink = nil + if !server.PollerResponderMore(beginPutBastionShareableLink) { + m.beginPutBastionShareableLink.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/managementgroupnetworkmanagerconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/managementgroupnetworkmanagerconnections_server.go index e4f61634eba0..78efca7d8928 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/managementgroupnetworkmanagerconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/managementgroupnetworkmanagerconnections_server.go @@ -43,17 +43,20 @@ type ManagementGroupNetworkManagerConnectionsServer struct { } // NewManagementGroupNetworkManagerConnectionsServerTransport creates a new instance of ManagementGroupNetworkManagerConnectionsServerTransport with the provided implementation. -// The returned ManagementGroupNetworkManagerConnectionsServerTransport instance is connected to an instance of armnetwork.ManagementGroupNetworkManagerConnectionsClient by way of the -// undefined.Transporter field. +// The returned ManagementGroupNetworkManagerConnectionsServerTransport instance is connected to an instance of armnetwork.ManagementGroupNetworkManagerConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagementGroupNetworkManagerConnectionsServerTransport(srv *ManagementGroupNetworkManagerConnectionsServer) *ManagementGroupNetworkManagerConnectionsServerTransport { - return &ManagementGroupNetworkManagerConnectionsServerTransport{srv: srv} + return &ManagementGroupNetworkManagerConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse]](), + } } // ManagementGroupNetworkManagerConnectionsServerTransport connects instances of armnetwork.ManagementGroupNetworkManagerConnectionsClient to instances of ManagementGroupNetworkManagerConnectionsServer. // Don't use this type directly, use NewManagementGroupNetworkManagerConnectionsServerTransport instead. type ManagementGroupNetworkManagerConnectionsServerTransport struct { srv *ManagementGroupNetworkManagerConnectionsServer - newListPager *azfake.PagerResponder[armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for ManagementGroupNetworkManagerConnectionsServerTransport. @@ -194,7 +197,8 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchNewLis if m.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if m.newListPager == nil { + newListPager := m.newListPager.get(req) + if newListPager == nil { const regexStr = `/providers/Microsoft.Management/managementGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -233,20 +237,22 @@ func (m *ManagementGroupNetworkManagerConnectionsServerTransport) dispatchNewLis } } resp := m.srv.NewListPager(managementGroupIDUnescaped, options) - m.newListPager = &resp - server.PagerResponderInjectNextLinks(m.newListPager, req, func(page *armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + m.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ManagementGroupNetworkManagerConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(m.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + m.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(m.newListPager) { - m.newListPager = nil + if !server.PagerResponderMore(newListPager) { + m.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/managercommits_server.go b/sdk/resourcemanager/network/armnetwork/fake/managercommits_server.go index 9f19715a1a3e..17f9916955da 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/managercommits_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/managercommits_server.go @@ -29,17 +29,20 @@ type ManagerCommitsServer struct { } // NewManagerCommitsServerTransport creates a new instance of ManagerCommitsServerTransport with the provided implementation. -// The returned ManagerCommitsServerTransport instance is connected to an instance of armnetwork.ManagerCommitsClient by way of the -// undefined.Transporter field. +// The returned ManagerCommitsServerTransport instance is connected to an instance of armnetwork.ManagerCommitsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagerCommitsServerTransport(srv *ManagerCommitsServer) *ManagerCommitsServerTransport { - return &ManagerCommitsServerTransport{srv: srv} + return &ManagerCommitsServerTransport{ + srv: srv, + beginPost: newTracker[azfake.PollerResponder[armnetwork.ManagerCommitsClientPostResponse]](), + } } // ManagerCommitsServerTransport connects instances of armnetwork.ManagerCommitsClient to instances of ManagerCommitsServer. // Don't use this type directly, use NewManagerCommitsServerTransport instead. type ManagerCommitsServerTransport struct { srv *ManagerCommitsServer - beginPost *azfake.PollerResponder[armnetwork.ManagerCommitsClientPostResponse] + beginPost *tracker[azfake.PollerResponder[armnetwork.ManagerCommitsClientPostResponse]] } // Do implements the policy.Transporter interface for ManagerCommitsServerTransport. @@ -71,7 +74,8 @@ func (m *ManagerCommitsServerTransport) dispatchBeginPost(req *http.Request) (*h if m.srv.BeginPost == nil { return nil, &nonRetriableError{errors.New("fake for method BeginPost not implemented")} } - if m.beginPost == nil { + beginPost := m.beginPost.get(req) + if beginPost == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/commit` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -94,19 +98,21 @@ func (m *ManagerCommitsServerTransport) dispatchBeginPost(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginPost = &respr + beginPost = &respr + m.beginPost.add(req, beginPost) } - resp, err := server.PollerResponderNext(m.beginPost, req) + resp, err := server.PollerResponderNext(beginPost, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + m.beginPost.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginPost) { - m.beginPost = nil + if !server.PollerResponderMore(beginPost) { + m.beginPost.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/managerdeploymentstatus_server.go b/sdk/resourcemanager/network/armnetwork/fake/managerdeploymentstatus_server.go index df6f6be06a2d..6bf1a4588f1e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/managerdeploymentstatus_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/managerdeploymentstatus_server.go @@ -30,8 +30,8 @@ type ManagerDeploymentStatusServer struct { } // NewManagerDeploymentStatusServerTransport creates a new instance of ManagerDeploymentStatusServerTransport with the provided implementation. -// The returned ManagerDeploymentStatusServerTransport instance is connected to an instance of armnetwork.ManagerDeploymentStatusClient by way of the -// undefined.Transporter field. +// The returned ManagerDeploymentStatusServerTransport instance is connected to an instance of armnetwork.ManagerDeploymentStatusClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagerDeploymentStatusServerTransport(srv *ManagerDeploymentStatusServer) *ManagerDeploymentStatusServerTransport { return &ManagerDeploymentStatusServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/managers_server.go b/sdk/resourcemanager/network/armnetwork/fake/managers_server.go index 7eaab7f447ce..cfd9d21a4b5a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/managers_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/managers_server.go @@ -51,19 +51,24 @@ type ManagersServer struct { } // NewManagersServerTransport creates a new instance of ManagersServerTransport with the provided implementation. -// The returned ManagersServerTransport instance is connected to an instance of armnetwork.ManagersClient by way of the -// undefined.Transporter field. +// The returned ManagersServerTransport instance is connected to an instance of armnetwork.ManagersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewManagersServerTransport(srv *ManagersServer) *ManagersServerTransport { - return &ManagersServerTransport{srv: srv} + return &ManagersServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ManagersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ManagersClientListResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetwork.ManagersClientListBySubscriptionResponse]](), + } } // ManagersServerTransport connects instances of armnetwork.ManagersClient to instances of ManagersServer. // Don't use this type directly, use NewManagersServerTransport instead. type ManagersServerTransport struct { srv *ManagersServer - beginDelete *azfake.PollerResponder[armnetwork.ManagersClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ManagersClientListResponse] - newListBySubscriptionPager *azfake.PagerResponder[armnetwork.ManagersClientListBySubscriptionResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ManagersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ManagersClientListResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetwork.ManagersClientListBySubscriptionResponse]] } // Do implements the policy.Transporter interface for ManagersServerTransport. @@ -142,7 +147,8 @@ func (m *ManagersServerTransport) dispatchBeginDelete(req *http.Request) (*http. if m.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if m.beginDelete == nil { + beginDelete := m.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -176,19 +182,21 @@ func (m *ManagersServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - m.beginDelete = &respr + beginDelete = &respr + m.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(m.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + m.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(m.beginDelete) { - m.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + m.beginDelete.remove(req) } return resp, nil @@ -231,7 +239,8 @@ func (m *ManagersServerTransport) dispatchNewListPager(req *http.Request) (*http if m.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if m.newListPager == nil { + newListPager := m.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -270,20 +279,22 @@ func (m *ManagersServerTransport) dispatchNewListPager(req *http.Request) (*http } } resp := m.srv.NewListPager(resourceGroupNameUnescaped, options) - m.newListPager = &resp - server.PagerResponderInjectNextLinks(m.newListPager, req, func(page *armnetwork.ManagersClientListResponse, createLink func() string) { + newListPager = &resp + m.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ManagersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(m.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + m.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(m.newListPager) { - m.newListPager = nil + if !server.PagerResponderMore(newListPager) { + m.newListPager.remove(req) } return resp, nil } @@ -292,7 +303,8 @@ func (m *ManagersServerTransport) dispatchNewListBySubscriptionPager(req *http.R if m.srv.NewListBySubscriptionPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} } - if m.newListBySubscriptionPager == nil { + newListBySubscriptionPager := m.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -327,20 +339,22 @@ func (m *ManagersServerTransport) dispatchNewListBySubscriptionPager(req *http.R } } resp := m.srv.NewListBySubscriptionPager(options) - m.newListBySubscriptionPager = &resp - server.PagerResponderInjectNextLinks(m.newListBySubscriptionPager, req, func(page *armnetwork.ManagersClientListBySubscriptionResponse, createLink func() string) { + newListBySubscriptionPager = &resp + m.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armnetwork.ManagersClientListBySubscriptionResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(m.newListBySubscriptionPager, req) + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + m.newListBySubscriptionPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(m.newListBySubscriptionPager) { - m.newListBySubscriptionPager = nil + if !server.PagerResponderMore(newListBySubscriptionPager) { + m.newListBySubscriptionPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/natgateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/natgateways_server.go index 1d34c2613f93..823fb195d4a9 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/natgateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/natgateways_server.go @@ -50,20 +50,26 @@ type NatGatewaysServer struct { } // NewNatGatewaysServerTransport creates a new instance of NatGatewaysServerTransport with the provided implementation. -// The returned NatGatewaysServerTransport instance is connected to an instance of armnetwork.NatGatewaysClient by way of the -// undefined.Transporter field. +// The returned NatGatewaysServerTransport instance is connected to an instance of armnetwork.NatGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewNatGatewaysServerTransport(srv *NatGatewaysServer) *NatGatewaysServerTransport { - return &NatGatewaysServerTransport{srv: srv} + return &NatGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.NatGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.NatGatewaysClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.NatGatewaysClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.NatGatewaysClientListAllResponse]](), + } } // NatGatewaysServerTransport connects instances of armnetwork.NatGatewaysClient to instances of NatGatewaysServer. // Don't use this type directly, use NewNatGatewaysServerTransport instead. type NatGatewaysServerTransport struct { srv *NatGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.NatGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.NatGatewaysClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.NatGatewaysClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.NatGatewaysClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.NatGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.NatGatewaysClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.NatGatewaysClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.NatGatewaysClientListAllResponse]] } // Do implements the policy.Transporter interface for NatGatewaysServerTransport. @@ -105,7 +111,8 @@ func (n *NatGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if n.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if n.beginCreateOrUpdate == nil { + beginCreateOrUpdate := n.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (n *NatGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - n.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + n.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(n.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated, http.StatusAccepted}, resp.StatusCode) { + n.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(n.beginCreateOrUpdate) { - n.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + n.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (n *NatGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht if n.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if n.beginDelete == nil { + beginDelete := n.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (n *NatGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - n.beginDelete = &respr + beginDelete = &respr + n.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(n.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + n.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(n.beginDelete) { - n.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + n.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (n *NatGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h if n.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if n.newListPager == nil { + newListPager := n.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (n *NatGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h return nil, err } resp := n.srv.NewListPager(resourceGroupNameUnescaped, nil) - n.newListPager = &resp - server.PagerResponderInjectNextLinks(n.newListPager, req, func(page *armnetwork.NatGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + n.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.NatGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(n.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + n.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(n.newListPager) { - n.newListPager = nil + if !server.PagerResponderMore(newListPager) { + n.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (n *NatGatewaysServerTransport) dispatchNewListAllPager(req *http.Request) if n.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if n.newListAllPager == nil { + newListAllPager := n.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/natGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (n *NatGatewaysServerTransport) dispatchNewListAllPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := n.srv.NewListAllPager(nil) - n.newListAllPager = &resp - server.PagerResponderInjectNextLinks(n.newListAllPager, req, func(page *armnetwork.NatGatewaysClientListAllResponse, createLink func() string) { + newListAllPager = &resp + n.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.NatGatewaysClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(n.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + n.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(n.newListAllPager) { - n.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + n.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/natrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/natrules_server.go index 7a514addbece..ce5e20bc5a19 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/natrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/natrules_server.go @@ -42,19 +42,24 @@ type NatRulesServer struct { } // NewNatRulesServerTransport creates a new instance of NatRulesServerTransport with the provided implementation. -// The returned NatRulesServerTransport instance is connected to an instance of armnetwork.NatRulesClient by way of the -// undefined.Transporter field. +// The returned NatRulesServerTransport instance is connected to an instance of armnetwork.NatRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewNatRulesServerTransport(srv *NatRulesServer) *NatRulesServerTransport { - return &NatRulesServerTransport{srv: srv} + return &NatRulesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.NatRulesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.NatRulesClientDeleteResponse]](), + newListByVPNGatewayPager: newTracker[azfake.PagerResponder[armnetwork.NatRulesClientListByVPNGatewayResponse]](), + } } // NatRulesServerTransport connects instances of armnetwork.NatRulesClient to instances of NatRulesServer. // Don't use this type directly, use NewNatRulesServerTransport instead. type NatRulesServerTransport struct { srv *NatRulesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.NatRulesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.NatRulesClientDeleteResponse] - newListByVPNGatewayPager *azfake.PagerResponder[armnetwork.NatRulesClientListByVPNGatewayResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.NatRulesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.NatRulesClientDeleteResponse]] + newListByVPNGatewayPager *tracker[azfake.PagerResponder[armnetwork.NatRulesClientListByVPNGatewayResponse]] } // Do implements the policy.Transporter interface for NatRulesServerTransport. @@ -92,7 +97,8 @@ func (n *NatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if n.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if n.beginCreateOrUpdate == nil { + beginCreateOrUpdate := n.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (n *NatRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - n.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + n.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(n.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + n.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(n.beginCreateOrUpdate) { - n.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + n.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (n *NatRulesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if n.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if n.beginDelete == nil { + beginDelete := n.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (n *NatRulesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - n.beginDelete = &respr + beginDelete = &respr + n.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(n.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + n.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(n.beginDelete) { - n.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + n.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (n *NatRulesServerTransport) dispatchNewListByVPNGatewayPager(req *http.Req if n.srv.NewListByVPNGatewayPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVPNGatewayPager not implemented")} } - if n.newListByVPNGatewayPager == nil { + newListByVPNGatewayPager := n.newListByVPNGatewayPager.get(req) + if newListByVPNGatewayPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (n *NatRulesServerTransport) dispatchNewListByVPNGatewayPager(req *http.Req return nil, err } resp := n.srv.NewListByVPNGatewayPager(resourceGroupNameUnescaped, gatewayNameUnescaped, nil) - n.newListByVPNGatewayPager = &resp - server.PagerResponderInjectNextLinks(n.newListByVPNGatewayPager, req, func(page *armnetwork.NatRulesClientListByVPNGatewayResponse, createLink func() string) { + newListByVPNGatewayPager = &resp + n.newListByVPNGatewayPager.add(req, newListByVPNGatewayPager) + server.PagerResponderInjectNextLinks(newListByVPNGatewayPager, req, func(page *armnetwork.NatRulesClientListByVPNGatewayResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(n.newListByVPNGatewayPager, req) + resp, err := server.PagerResponderNext(newListByVPNGatewayPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + n.newListByVPNGatewayPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(n.newListByVPNGatewayPager) { - n.newListByVPNGatewayPager = nil + if !server.PagerResponderMore(newListByVPNGatewayPager) { + n.newListByVPNGatewayPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/operations_server.go b/sdk/resourcemanager/network/armnetwork/fake/operations_server.go index 1cd983ca681f..97bb797d170e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/operations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/operations_server.go @@ -27,17 +27,20 @@ type OperationsServer struct { } // NewOperationsServerTransport creates a new instance of OperationsServerTransport with the provided implementation. -// The returned OperationsServerTransport instance is connected to an instance of armnetwork.OperationsClient by way of the -// undefined.Transporter field. +// The returned OperationsServerTransport instance is connected to an instance of armnetwork.OperationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewOperationsServerTransport(srv *OperationsServer) *OperationsServerTransport { - return &OperationsServerTransport{srv: srv} + return &OperationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.OperationsClientListResponse]](), + } } // OperationsServerTransport connects instances of armnetwork.OperationsClient to instances of OperationsServer. // Don't use this type directly, use NewOperationsServerTransport instead. type OperationsServerTransport struct { srv *OperationsServer - newListPager *azfake.PagerResponder[armnetwork.OperationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.OperationsClientListResponse]] } // Do implements the policy.Transporter interface for OperationsServerTransport. @@ -69,22 +72,25 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht if o.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if o.newListPager == nil { + newListPager := o.newListPager.get(req) + if newListPager == nil { resp := o.srv.NewListPager(nil) - o.newListPager = &resp - server.PagerResponderInjectNextLinks(o.newListPager, req, func(page *armnetwork.OperationsClientListResponse, createLink func() string) { + newListPager = &resp + o.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.OperationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(o.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + o.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(o.newListPager) { - o.newListPager = nil + if !server.PagerResponderMore(newListPager) { + o.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/p2svpngateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/p2svpngateways_server.go index 68a95764bc2f..14e562ac15c3 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/p2svpngateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/p2svpngateways_server.go @@ -70,26 +70,38 @@ type P2SVPNGatewaysServer struct { } // NewP2SVPNGatewaysServerTransport creates a new instance of P2SVPNGatewaysServerTransport with the provided implementation. -// The returned P2SVPNGatewaysServerTransport instance is connected to an instance of armnetwork.P2SVPNGatewaysClient by way of the -// undefined.Transporter field. +// The returned P2SVPNGatewaysServerTransport instance is connected to an instance of armnetwork.P2SVPNGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewP2SVPNGatewaysServerTransport(srv *P2SVPNGatewaysServer) *P2SVPNGatewaysServerTransport { - return &P2SVPNGatewaysServerTransport{srv: srv} + return &P2SVPNGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDeleteResponse]](), + beginDisconnectP2SVPNConnections: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]](), + beginGenerateVPNProfile: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGenerateVPNProfileResponse]](), + beginGetP2SVPNConnectionHealth: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]](), + beginGetP2SVPNConnectionHealthDetailed: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse]](), + beginReset: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientResetResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientUpdateTagsResponse]](), + } } // P2SVPNGatewaysServerTransport connects instances of armnetwork.P2SVPNGatewaysClient to instances of P2SVPNGatewaysServer. // Don't use this type directly, use NewP2SVPNGatewaysServerTransport instead. type P2SVPNGatewaysServerTransport struct { srv *P2SVPNGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDeleteResponse] - beginDisconnectP2SVPNConnections *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse] - beginGenerateVPNProfile *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGenerateVPNProfileResponse] - beginGetP2SVPNConnectionHealth *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse] - beginGetP2SVPNConnectionHealthDetailed *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse] - newListPager *azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse] - beginReset *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientResetResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDeleteResponse]] + beginDisconnectP2SVPNConnections *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]] + beginGenerateVPNProfile *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGenerateVPNProfileResponse]] + beginGetP2SVPNConnectionHealth *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]] + beginGetP2SVPNConnectionHealthDetailed *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse]] + beginReset *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientResetResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.P2SVPNGatewaysClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for P2SVPNGatewaysServerTransport. @@ -141,7 +153,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +177,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -186,7 +201,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) ( if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -205,19 +221,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -227,7 +245,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDisconnectP2SVPNConnections if p.srv.BeginDisconnectP2SVPNConnections == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDisconnectP2SVPNConnections not implemented")} } - if p.beginDisconnectP2SVPNConnections == nil { + beginDisconnectP2SVPNConnections := p.beginDisconnectP2SVPNConnections.get(req) + if beginDisconnectP2SVPNConnections == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectP2sVpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -250,19 +269,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginDisconnectP2SVPNConnections if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDisconnectP2SVPNConnections = &respr + beginDisconnectP2SVPNConnections = &respr + p.beginDisconnectP2SVPNConnections.add(req, beginDisconnectP2SVPNConnections) } - resp, err := server.PollerResponderNext(p.beginDisconnectP2SVPNConnections, req) + resp, err := server.PollerResponderNext(beginDisconnectP2SVPNConnections, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginDisconnectP2SVPNConnections.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDisconnectP2SVPNConnections) { - p.beginDisconnectP2SVPNConnections = nil + if !server.PollerResponderMore(beginDisconnectP2SVPNConnections) { + p.beginDisconnectP2SVPNConnections.remove(req) } return resp, nil @@ -272,7 +293,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGenerateVPNProfile(req *htt if p.srv.BeginGenerateVPNProfile == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGenerateVPNProfile not implemented")} } - if p.beginGenerateVPNProfile == nil { + beginGenerateVPNProfile := p.beginGenerateVPNProfile.get(req) + if beginGenerateVPNProfile == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -295,19 +317,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGenerateVPNProfile(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginGenerateVPNProfile = &respr + beginGenerateVPNProfile = &respr + p.beginGenerateVPNProfile.add(req, beginGenerateVPNProfile) } - resp, err := server.PollerResponderNext(p.beginGenerateVPNProfile, req) + resp, err := server.PollerResponderNext(beginGenerateVPNProfile, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginGenerateVPNProfile.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginGenerateVPNProfile) { - p.beginGenerateVPNProfile = nil + if !server.PollerResponderMore(beginGenerateVPNProfile) { + p.beginGenerateVPNProfile.remove(req) } return resp, nil @@ -350,7 +374,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealth(r if p.srv.BeginGetP2SVPNConnectionHealth == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetP2SVPNConnectionHealth not implemented")} } - if p.beginGetP2SVPNConnectionHealth == nil { + beginGetP2SVPNConnectionHealth := p.beginGetP2SVPNConnectionHealth.get(req) + if beginGetP2SVPNConnectionHealth == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -369,19 +394,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealth(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginGetP2SVPNConnectionHealth = &respr + beginGetP2SVPNConnectionHealth = &respr + p.beginGetP2SVPNConnectionHealth.add(req, beginGetP2SVPNConnectionHealth) } - resp, err := server.PollerResponderNext(p.beginGetP2SVPNConnectionHealth, req) + resp, err := server.PollerResponderNext(beginGetP2SVPNConnectionHealth, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginGetP2SVPNConnectionHealth.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginGetP2SVPNConnectionHealth) { - p.beginGetP2SVPNConnectionHealth = nil + if !server.PollerResponderMore(beginGetP2SVPNConnectionHealth) { + p.beginGetP2SVPNConnectionHealth.remove(req) } return resp, nil @@ -391,7 +418,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealthDe if p.srv.BeginGetP2SVPNConnectionHealthDetailed == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetP2SVPNConnectionHealthDetailed not implemented")} } - if p.beginGetP2SVPNConnectionHealthDetailed == nil { + beginGetP2SVPNConnectionHealthDetailed := p.beginGetP2SVPNConnectionHealthDetailed.get(req) + if beginGetP2SVPNConnectionHealthDetailed == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getP2sVpnConnectionHealthDetailed` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -414,19 +442,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginGetP2SVPNConnectionHealthDe if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginGetP2SVPNConnectionHealthDetailed = &respr + beginGetP2SVPNConnectionHealthDetailed = &respr + p.beginGetP2SVPNConnectionHealthDetailed.add(req, beginGetP2SVPNConnectionHealthDetailed) } - resp, err := server.PollerResponderNext(p.beginGetP2SVPNConnectionHealthDetailed, req) + resp, err := server.PollerResponderNext(beginGetP2SVPNConnectionHealthDetailed, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginGetP2SVPNConnectionHealthDetailed.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginGetP2SVPNConnectionHealthDetailed) { - p.beginGetP2SVPNConnectionHealthDetailed = nil + if !server.PollerResponderMore(beginGetP2SVPNConnectionHealthDetailed) { + p.beginGetP2SVPNConnectionHealthDetailed.remove(req) } return resp, nil @@ -436,7 +466,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -444,20 +475,22 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListPager(nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.P2SVPNGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.P2SVPNGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -466,7 +499,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req if p.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if p.newListByResourceGroupPager == nil { + newListByResourceGroupPager := p.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -478,20 +512,22 @@ func (p *P2SVPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req return nil, err } resp := p.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - p.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(p.newListByResourceGroupPager, req, func(page *armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + p.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.P2SVPNGatewaysClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListByResourceGroupPager) { - p.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + p.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -500,7 +536,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (* if p.srv.BeginReset == nil { return nil, &nonRetriableError{errors.New("fake for method BeginReset not implemented")} } - if p.beginReset == nil { + beginReset := p.beginReset.get(req) + if beginReset == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -519,19 +556,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginReset = &respr + beginReset = &respr + p.beginReset.add(req, beginReset) } - resp, err := server.PollerResponderNext(p.beginReset, req) + resp, err := server.PollerResponderNext(beginReset, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginReset.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginReset) { - p.beginReset = nil + if !server.PollerResponderMore(beginReset) { + p.beginReset.remove(req) } return resp, nil @@ -541,7 +580,8 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Reques if p.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if p.beginUpdateTags == nil { + beginUpdateTags := p.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/p2svpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -564,19 +604,21 @@ func (p *P2SVPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginUpdateTags = &respr + beginUpdateTags = &respr + p.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(p.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginUpdateTags) { - p.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + p.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/packetcaptures_server.go b/sdk/resourcemanager/network/armnetwork/fake/packetcaptures_server.go index e1db336f8c85..7ee272537e5c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/packetcaptures_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/packetcaptures_server.go @@ -49,21 +49,28 @@ type PacketCapturesServer struct { } // NewPacketCapturesServerTransport creates a new instance of PacketCapturesServerTransport with the provided implementation. -// The returned PacketCapturesServerTransport instance is connected to an instance of armnetwork.PacketCapturesClient by way of the -// undefined.Transporter field. +// The returned PacketCapturesServerTransport instance is connected to an instance of armnetwork.PacketCapturesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPacketCapturesServerTransport(srv *PacketCapturesServer) *PacketCapturesServerTransport { - return &PacketCapturesServerTransport{srv: srv} + return &PacketCapturesServerTransport{ + srv: srv, + beginCreate: newTracker[azfake.PollerResponder[armnetwork.PacketCapturesClientCreateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PacketCapturesClientDeleteResponse]](), + beginGetStatus: newTracker[azfake.PollerResponder[armnetwork.PacketCapturesClientGetStatusResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PacketCapturesClientListResponse]](), + beginStop: newTracker[azfake.PollerResponder[armnetwork.PacketCapturesClientStopResponse]](), + } } // PacketCapturesServerTransport connects instances of armnetwork.PacketCapturesClient to instances of PacketCapturesServer. // Don't use this type directly, use NewPacketCapturesServerTransport instead. type PacketCapturesServerTransport struct { srv *PacketCapturesServer - beginCreate *azfake.PollerResponder[armnetwork.PacketCapturesClientCreateResponse] - beginDelete *azfake.PollerResponder[armnetwork.PacketCapturesClientDeleteResponse] - beginGetStatus *azfake.PollerResponder[armnetwork.PacketCapturesClientGetStatusResponse] - newListPager *azfake.PagerResponder[armnetwork.PacketCapturesClientListResponse] - beginStop *azfake.PollerResponder[armnetwork.PacketCapturesClientStopResponse] + beginCreate *tracker[azfake.PollerResponder[armnetwork.PacketCapturesClientCreateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PacketCapturesClientDeleteResponse]] + beginGetStatus *tracker[azfake.PollerResponder[armnetwork.PacketCapturesClientGetStatusResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PacketCapturesClientListResponse]] + beginStop *tracker[azfake.PollerResponder[armnetwork.PacketCapturesClientStopResponse]] } // Do implements the policy.Transporter interface for PacketCapturesServerTransport. @@ -105,7 +112,8 @@ func (p *PacketCapturesServerTransport) dispatchBeginCreate(req *http.Request) ( if p.srv.BeginCreate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreate not implemented")} } - if p.beginCreate == nil { + beginCreate := p.beginCreate.get(req) + if beginCreate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -132,19 +140,21 @@ func (p *PacketCapturesServerTransport) dispatchBeginCreate(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreate = &respr + beginCreate = &respr + p.beginCreate.add(req, beginCreate) } - resp, err := server.PollerResponderNext(p.beginCreate, req) + resp, err := server.PollerResponderNext(beginCreate, req) if err != nil { return nil, err } if !contains([]int{http.StatusCreated}, resp.StatusCode) { + p.beginCreate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreate) { - p.beginCreate = nil + if !server.PollerResponderMore(beginCreate) { + p.beginCreate.remove(req) } return resp, nil @@ -154,7 +164,8 @@ func (p *PacketCapturesServerTransport) dispatchBeginDelete(req *http.Request) ( if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -177,19 +188,21 @@ func (p *PacketCapturesServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -236,7 +249,8 @@ func (p *PacketCapturesServerTransport) dispatchBeginGetStatus(req *http.Request if p.srv.BeginGetStatus == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetStatus not implemented")} } - if p.beginGetStatus == nil { + beginGetStatus := p.beginGetStatus.get(req) + if beginGetStatus == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -259,19 +273,21 @@ func (p *PacketCapturesServerTransport) dispatchBeginGetStatus(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginGetStatus = &respr + beginGetStatus = &respr + p.beginGetStatus.add(req, beginGetStatus) } - resp, err := server.PollerResponderNext(p.beginGetStatus, req) + resp, err := server.PollerResponderNext(beginGetStatus, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginGetStatus.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginGetStatus) { - p.beginGetStatus = nil + if !server.PollerResponderMore(beginGetStatus) { + p.beginGetStatus.remove(req) } return resp, nil @@ -281,7 +297,8 @@ func (p *PacketCapturesServerTransport) dispatchNewListPager(req *http.Request) if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -297,17 +314,19 @@ func (p *PacketCapturesServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, networkWatcherNameUnescaped, nil) - p.newListPager = &resp + newListPager = &resp + p.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -316,7 +335,8 @@ func (p *PacketCapturesServerTransport) dispatchBeginStop(req *http.Request) (*h if p.srv.BeginStop == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStop not implemented")} } - if p.beginStop == nil { + beginStop := p.beginStop.get(req) + if beginStop == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/packetCaptures/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -339,19 +359,21 @@ func (p *PacketCapturesServerTransport) dispatchBeginStop(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginStop = &respr + beginStop = &respr + p.beginStop.add(req, beginStop) } - resp, err := server.PollerResponderNext(p.beginStop, req) + resp, err := server.PollerResponderNext(beginStop, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginStop.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginStop) { - p.beginStop = nil + if !server.PollerResponderMore(beginStop) { + p.beginStop.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/peerexpressroutecircuitconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/peerexpressroutecircuitconnections_server.go index 7ab7b4c6de9f..68b81d13f424 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/peerexpressroutecircuitconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/peerexpressroutecircuitconnections_server.go @@ -34,17 +34,20 @@ type PeerExpressRouteCircuitConnectionsServer struct { } // NewPeerExpressRouteCircuitConnectionsServerTransport creates a new instance of PeerExpressRouteCircuitConnectionsServerTransport with the provided implementation. -// The returned PeerExpressRouteCircuitConnectionsServerTransport instance is connected to an instance of armnetwork.PeerExpressRouteCircuitConnectionsClient by way of the -// undefined.Transporter field. +// The returned PeerExpressRouteCircuitConnectionsServerTransport instance is connected to an instance of armnetwork.PeerExpressRouteCircuitConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPeerExpressRouteCircuitConnectionsServerTransport(srv *PeerExpressRouteCircuitConnectionsServer) *PeerExpressRouteCircuitConnectionsServerTransport { - return &PeerExpressRouteCircuitConnectionsServerTransport{srv: srv} + return &PeerExpressRouteCircuitConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse]](), + } } // PeerExpressRouteCircuitConnectionsServerTransport connects instances of armnetwork.PeerExpressRouteCircuitConnectionsClient to instances of PeerExpressRouteCircuitConnectionsServer. // Don't use this type directly, use NewPeerExpressRouteCircuitConnectionsServerTransport instead. type PeerExpressRouteCircuitConnectionsServerTransport struct { srv *PeerExpressRouteCircuitConnectionsServer - newListPager *azfake.PagerResponder[armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for PeerExpressRouteCircuitConnectionsServerTransport. @@ -119,7 +122,8 @@ func (p *PeerExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/expressRouteCircuits/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -139,20 +143,22 @@ func (p *PeerExpressRouteCircuitConnectionsServerTransport) dispatchNewListPager return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, circuitNameUnescaped, peeringNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PeerExpressRouteCircuitConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/privatednszonegroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/privatednszonegroups_server.go index f62a8adc8dbc..c07b11b6350d 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/privatednszonegroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/privatednszonegroups_server.go @@ -42,19 +42,24 @@ type PrivateDNSZoneGroupsServer struct { } // NewPrivateDNSZoneGroupsServerTransport creates a new instance of PrivateDNSZoneGroupsServerTransport with the provided implementation. -// The returned PrivateDNSZoneGroupsServerTransport instance is connected to an instance of armnetwork.PrivateDNSZoneGroupsClient by way of the -// undefined.Transporter field. +// The returned PrivateDNSZoneGroupsServerTransport instance is connected to an instance of armnetwork.PrivateDNSZoneGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPrivateDNSZoneGroupsServerTransport(srv *PrivateDNSZoneGroupsServer) *PrivateDNSZoneGroupsServerTransport { - return &PrivateDNSZoneGroupsServerTransport{srv: srv} + return &PrivateDNSZoneGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PrivateDNSZoneGroupsClientListResponse]](), + } } // PrivateDNSZoneGroupsServerTransport connects instances of armnetwork.PrivateDNSZoneGroupsClient to instances of PrivateDNSZoneGroupsServer. // Don't use this type directly, use NewPrivateDNSZoneGroupsServerTransport instead. type PrivateDNSZoneGroupsServerTransport struct { srv *PrivateDNSZoneGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.PrivateDNSZoneGroupsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PrivateDNSZoneGroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PrivateDNSZoneGroupsClientListResponse]] } // Do implements the policy.Transporter interface for PrivateDNSZoneGroupsServerTransport. @@ -92,7 +97,8 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginCreateOrUpdate(req *h if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginCreateOrUpdate(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginDelete(req *http.Requ if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchBeginDelete(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchNewListPager(req *http.Req if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateDnsZoneGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (p *PrivateDNSZoneGroupsServerTransport) dispatchNewListPager(req *http.Req return nil, err } resp := p.srv.NewListPager(privateEndpointNameUnescaped, resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PrivateDNSZoneGroupsClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateDNSZoneGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/privateendpoints_server.go b/sdk/resourcemanager/network/armnetwork/fake/privateendpoints_server.go index f2bbee596bc1..175a8f073544 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/privateendpoints_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/privateendpoints_server.go @@ -46,20 +46,26 @@ type PrivateEndpointsServer struct { } // NewPrivateEndpointsServerTransport creates a new instance of PrivateEndpointsServerTransport with the provided implementation. -// The returned PrivateEndpointsServerTransport instance is connected to an instance of armnetwork.PrivateEndpointsClient by way of the -// undefined.Transporter field. +// The returned PrivateEndpointsServerTransport instance is connected to an instance of armnetwork.PrivateEndpointsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPrivateEndpointsServerTransport(srv *PrivateEndpointsServer) *PrivateEndpointsServerTransport { - return &PrivateEndpointsServerTransport{srv: srv} + return &PrivateEndpointsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.PrivateEndpointsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PrivateEndpointsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PrivateEndpointsClientListResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetwork.PrivateEndpointsClientListBySubscriptionResponse]](), + } } // PrivateEndpointsServerTransport connects instances of armnetwork.PrivateEndpointsClient to instances of PrivateEndpointsServer. // Don't use this type directly, use NewPrivateEndpointsServerTransport instead. type PrivateEndpointsServerTransport struct { srv *PrivateEndpointsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.PrivateEndpointsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.PrivateEndpointsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.PrivateEndpointsClientListResponse] - newListBySubscriptionPager *azfake.PagerResponder[armnetwork.PrivateEndpointsClientListBySubscriptionResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.PrivateEndpointsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PrivateEndpointsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PrivateEndpointsClientListResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetwork.PrivateEndpointsClientListBySubscriptionResponse]] } // Do implements the policy.Transporter interface for PrivateEndpointsServerTransport. @@ -99,7 +105,8 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginCreateOrUpdate(req *http. if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -122,19 +129,21 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginCreateOrUpdate(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -144,7 +153,8 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginDelete(req *http.Request) if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -163,19 +173,21 @@ func (p *PrivateEndpointsServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -230,7 +242,8 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListPager(req *http.Request if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -242,20 +255,22 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListPager(req *http.Request return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PrivateEndpointsClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateEndpointsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -264,7 +279,8 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListBySubscriptionPager(req if p.srv.NewListBySubscriptionPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} } - if p.newListBySubscriptionPager == nil { + newListBySubscriptionPager := p.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateEndpoints` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -272,20 +288,22 @@ func (p *PrivateEndpointsServerTransport) dispatchNewListBySubscriptionPager(req return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListBySubscriptionPager(nil) - p.newListBySubscriptionPager = &resp - server.PagerResponderInjectNextLinks(p.newListBySubscriptionPager, req, func(page *armnetwork.PrivateEndpointsClientListBySubscriptionResponse, createLink func() string) { + newListBySubscriptionPager = &resp + p.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armnetwork.PrivateEndpointsClientListBySubscriptionResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListBySubscriptionPager, req) + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListBySubscriptionPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListBySubscriptionPager) { - p.newListBySubscriptionPager = nil + if !server.PagerResponderMore(newListBySubscriptionPager) { + p.newListBySubscriptionPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/privatelinkservices_server.go b/sdk/resourcemanager/network/armnetwork/fake/privatelinkservices_server.go index 6797675672b5..827acd1f1040 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/privatelinkservices_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/privatelinkservices_server.go @@ -78,26 +78,38 @@ type PrivateLinkServicesServer struct { } // NewPrivateLinkServicesServerTransport creates a new instance of PrivateLinkServicesServerTransport with the provided implementation. -// The returned PrivateLinkServicesServerTransport instance is connected to an instance of armnetwork.PrivateLinkServicesClient by way of the -// undefined.Transporter field. +// The returned PrivateLinkServicesServerTransport instance is connected to an instance of armnetwork.PrivateLinkServicesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPrivateLinkServicesServerTransport(srv *PrivateLinkServicesServer) *PrivateLinkServicesServerTransport { - return &PrivateLinkServicesServerTransport{srv: srv} + return &PrivateLinkServicesServerTransport{ + srv: srv, + beginCheckPrivateLinkServiceVisibility: newTracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]](), + beginCheckPrivateLinkServiceVisibilityByResourceGroup: newTracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]](), + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeleteResponse]](), + beginDeletePrivateEndpointConnection: newTracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListResponse]](), + newListAutoApprovedPrivateLinkServicesPager: newTracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]](), + newListAutoApprovedPrivateLinkServicesByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]](), + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListBySubscriptionResponse]](), + newListPrivateEndpointConnectionsPager: newTracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]](), + } } // PrivateLinkServicesServerTransport connects instances of armnetwork.PrivateLinkServicesClient to instances of PrivateLinkServicesServer. // Don't use this type directly, use NewPrivateLinkServicesServerTransport instead. type PrivateLinkServicesServerTransport struct { srv *PrivateLinkServicesServer - beginCheckPrivateLinkServiceVisibility *azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse] - beginCheckPrivateLinkServiceVisibilityByResourceGroup *azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse] - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeleteResponse] - beginDeletePrivateEndpointConnection *azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse] - newListPager *azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListResponse] - newListAutoApprovedPrivateLinkServicesPager *azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse] - newListAutoApprovedPrivateLinkServicesByResourceGroupPager *azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse] - newListBySubscriptionPager *azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListBySubscriptionResponse] - newListPrivateEndpointConnectionsPager *azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse] + beginCheckPrivateLinkServiceVisibility *tracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]] + beginCheckPrivateLinkServiceVisibilityByResourceGroup *tracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeleteResponse]] + beginDeletePrivateEndpointConnection *tracker[azfake.PollerResponder[armnetwork.PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListResponse]] + newListAutoApprovedPrivateLinkServicesPager *tracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]] + newListAutoApprovedPrivateLinkServicesByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListBySubscriptionResponse]] + newListPrivateEndpointConnectionsPager *tracker[azfake.PagerResponder[armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]] } // Do implements the policy.Transporter interface for PrivateLinkServicesServerTransport. @@ -153,7 +165,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if p.srv.BeginCheckPrivateLinkServiceVisibility == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCheckPrivateLinkServiceVisibility not implemented")} } - if p.beginCheckPrivateLinkServiceVisibility == nil { + beginCheckPrivateLinkServiceVisibility := p.beginCheckPrivateLinkServiceVisibility.get(req) + if beginCheckPrivateLinkServiceVisibility == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -172,19 +185,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCheckPrivateLinkServiceVisibility = &respr + beginCheckPrivateLinkServiceVisibility = &respr + p.beginCheckPrivateLinkServiceVisibility.add(req, beginCheckPrivateLinkServiceVisibility) } - resp, err := server.PollerResponderNext(p.beginCheckPrivateLinkServiceVisibility, req) + resp, err := server.PollerResponderNext(beginCheckPrivateLinkServiceVisibility, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginCheckPrivateLinkServiceVisibility.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCheckPrivateLinkServiceVisibility) { - p.beginCheckPrivateLinkServiceVisibility = nil + if !server.PollerResponderMore(beginCheckPrivateLinkServiceVisibility) { + p.beginCheckPrivateLinkServiceVisibility.remove(req) } return resp, nil @@ -194,7 +209,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if p.srv.BeginCheckPrivateLinkServiceVisibilityByResourceGroup == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCheckPrivateLinkServiceVisibilityByResourceGroup not implemented")} } - if p.beginCheckPrivateLinkServiceVisibilityByResourceGroup == nil { + beginCheckPrivateLinkServiceVisibilityByResourceGroup := p.beginCheckPrivateLinkServiceVisibilityByResourceGroup.get(req) + if beginCheckPrivateLinkServiceVisibilityByResourceGroup == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/checkPrivateLinkServiceVisibility` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -217,19 +233,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCheckPrivateLinkServic if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCheckPrivateLinkServiceVisibilityByResourceGroup = &respr + beginCheckPrivateLinkServiceVisibilityByResourceGroup = &respr + p.beginCheckPrivateLinkServiceVisibilityByResourceGroup.add(req, beginCheckPrivateLinkServiceVisibilityByResourceGroup) } - resp, err := server.PollerResponderNext(p.beginCheckPrivateLinkServiceVisibilityByResourceGroup, req) + resp, err := server.PollerResponderNext(beginCheckPrivateLinkServiceVisibilityByResourceGroup, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginCheckPrivateLinkServiceVisibilityByResourceGroup.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCheckPrivateLinkServiceVisibilityByResourceGroup) { - p.beginCheckPrivateLinkServiceVisibilityByResourceGroup = nil + if !server.PollerResponderMore(beginCheckPrivateLinkServiceVisibilityByResourceGroup) { + p.beginCheckPrivateLinkServiceVisibilityByResourceGroup.remove(req) } return resp, nil @@ -239,7 +257,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCreateOrUpdate(req *ht if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -262,19 +281,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginCreateOrUpdate(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -284,7 +305,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDelete(req *http.Reque if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -303,19 +325,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDelete(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -325,7 +349,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDeletePrivateEndpointC if p.srv.BeginDeletePrivateEndpointConnection == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDeletePrivateEndpointConnection not implemented")} } - if p.beginDeletePrivateEndpointConnection == nil { + beginDeletePrivateEndpointConnection := p.beginDeletePrivateEndpointConnection.get(req) + if beginDeletePrivateEndpointConnection == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -348,19 +373,21 @@ func (p *PrivateLinkServicesServerTransport) dispatchBeginDeletePrivateEndpointC if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDeletePrivateEndpointConnection = &respr + beginDeletePrivateEndpointConnection = &respr + p.beginDeletePrivateEndpointConnection.add(req, beginDeletePrivateEndpointConnection) } - resp, err := server.PollerResponderNext(p.beginDeletePrivateEndpointConnection, req) + resp, err := server.PollerResponderNext(beginDeletePrivateEndpointConnection, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDeletePrivateEndpointConnection.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDeletePrivateEndpointConnection) { - p.beginDeletePrivateEndpointConnection = nil + if !server.PollerResponderMore(beginDeletePrivateEndpointConnection) { + p.beginDeletePrivateEndpointConnection.remove(req) } return resp, nil @@ -464,7 +491,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPager(req *http.Requ if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -476,20 +504,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPager(req *http.Requ return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PrivateLinkServicesClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PrivateLinkServicesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -498,7 +528,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL if p.srv.NewListAutoApprovedPrivateLinkServicesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAutoApprovedPrivateLinkServicesPager not implemented")} } - if p.newListAutoApprovedPrivateLinkServicesPager == nil { + newListAutoApprovedPrivateLinkServicesPager := p.newListAutoApprovedPrivateLinkServicesPager.get(req) + if newListAutoApprovedPrivateLinkServicesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -510,20 +541,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL return nil, err } resp := p.srv.NewListAutoApprovedPrivateLinkServicesPager(locationUnescaped, nil) - p.newListAutoApprovedPrivateLinkServicesPager = &resp - server.PagerResponderInjectNextLinks(p.newListAutoApprovedPrivateLinkServicesPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, createLink func() string) { + newListAutoApprovedPrivateLinkServicesPager = &resp + p.newListAutoApprovedPrivateLinkServicesPager.add(req, newListAutoApprovedPrivateLinkServicesPager) + server.PagerResponderInjectNextLinks(newListAutoApprovedPrivateLinkServicesPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAutoApprovedPrivateLinkServicesPager, req) + resp, err := server.PagerResponderNext(newListAutoApprovedPrivateLinkServicesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAutoApprovedPrivateLinkServicesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAutoApprovedPrivateLinkServicesPager) { - p.newListAutoApprovedPrivateLinkServicesPager = nil + if !server.PagerResponderMore(newListAutoApprovedPrivateLinkServicesPager) { + p.newListAutoApprovedPrivateLinkServicesPager.remove(req) } return resp, nil } @@ -532,7 +565,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL if p.srv.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAutoApprovedPrivateLinkServicesByResourceGroupPager not implemented")} } - if p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager == nil { + newListAutoApprovedPrivateLinkServicesByResourceGroupPager := p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.get(req) + if newListAutoApprovedPrivateLinkServicesByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/autoApprovedPrivateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -548,20 +582,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListAutoApprovedPrivateL return nil, err } resp := p.srv.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager(locationUnescaped, resourceGroupNameUnescaped, nil) - p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, createLink func() string) { + newListAutoApprovedPrivateLinkServicesByResourceGroupPager = &resp + p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.add(req, newListAutoApprovedPrivateLinkServicesByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListAutoApprovedPrivateLinkServicesByResourceGroupPager, req, func(page *armnetwork.PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListAutoApprovedPrivateLinkServicesByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager) { - p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager = nil + if !server.PagerResponderMore(newListAutoApprovedPrivateLinkServicesByResourceGroupPager) { + p.newListAutoApprovedPrivateLinkServicesByResourceGroupPager.remove(req) } return resp, nil } @@ -570,7 +606,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListBySubscriptionPager( if p.srv.NewListBySubscriptionPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} } - if p.newListBySubscriptionPager == nil { + newListBySubscriptionPager := p.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -578,20 +615,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListBySubscriptionPager( return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListBySubscriptionPager(nil) - p.newListBySubscriptionPager = &resp - server.PagerResponderInjectNextLinks(p.newListBySubscriptionPager, req, func(page *armnetwork.PrivateLinkServicesClientListBySubscriptionResponse, createLink func() string) { + newListBySubscriptionPager = &resp + p.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armnetwork.PrivateLinkServicesClientListBySubscriptionResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListBySubscriptionPager, req) + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListBySubscriptionPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListBySubscriptionPager) { - p.newListBySubscriptionPager = nil + if !server.PagerResponderMore(newListBySubscriptionPager) { + p.newListBySubscriptionPager.remove(req) } return resp, nil } @@ -600,7 +639,8 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPrivateEndpointConne if p.srv.NewListPrivateEndpointConnectionsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPrivateEndpointConnectionsPager not implemented")} } - if p.newListPrivateEndpointConnectionsPager == nil { + newListPrivateEndpointConnectionsPager := p.newListPrivateEndpointConnectionsPager.get(req) + if newListPrivateEndpointConnectionsPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/privateLinkServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/privateEndpointConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -616,20 +656,22 @@ func (p *PrivateLinkServicesServerTransport) dispatchNewListPrivateEndpointConne return nil, err } resp := p.srv.NewListPrivateEndpointConnectionsPager(resourceGroupNameUnescaped, serviceNameUnescaped, nil) - p.newListPrivateEndpointConnectionsPager = &resp - server.PagerResponderInjectNextLinks(p.newListPrivateEndpointConnectionsPager, req, func(page *armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, createLink func() string) { + newListPrivateEndpointConnectionsPager = &resp + p.newListPrivateEndpointConnectionsPager.add(req, newListPrivateEndpointConnectionsPager) + server.PagerResponderInjectNextLinks(newListPrivateEndpointConnectionsPager, req, func(page *armnetwork.PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPrivateEndpointConnectionsPager, req) + resp, err := server.PagerResponderNext(newListPrivateEndpointConnectionsPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPrivateEndpointConnectionsPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPrivateEndpointConnectionsPager) { - p.newListPrivateEndpointConnectionsPager = nil + if !server.PagerResponderMore(newListPrivateEndpointConnectionsPager) { + p.newListPrivateEndpointConnectionsPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/profiles_server.go b/sdk/resourcemanager/network/armnetwork/fake/profiles_server.go index 0e279a32b9a8..634e3e82e0bf 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/profiles_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/profiles_server.go @@ -50,19 +50,24 @@ type ProfilesServer struct { } // NewProfilesServerTransport creates a new instance of ProfilesServerTransport with the provided implementation. -// The returned ProfilesServerTransport instance is connected to an instance of armnetwork.ProfilesClient by way of the -// undefined.Transporter field. +// The returned ProfilesServerTransport instance is connected to an instance of armnetwork.ProfilesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewProfilesServerTransport(srv *ProfilesServer) *ProfilesServerTransport { - return &ProfilesServerTransport{srv: srv} + return &ProfilesServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ProfilesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ProfilesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.ProfilesClientListAllResponse]](), + } } // ProfilesServerTransport connects instances of armnetwork.ProfilesClient to instances of ProfilesServer. // Don't use this type directly, use NewProfilesServerTransport instead. type ProfilesServerTransport struct { srv *ProfilesServer - beginDelete *azfake.PollerResponder[armnetwork.ProfilesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ProfilesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.ProfilesClientListAllResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ProfilesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ProfilesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.ProfilesClientListAllResponse]] } // Do implements the policy.Transporter interface for ProfilesServerTransport. @@ -141,7 +146,8 @@ func (p *ProfilesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -160,19 +166,21 @@ func (p *ProfilesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -227,7 +235,8 @@ func (p *ProfilesServerTransport) dispatchNewListPager(req *http.Request) (*http if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +248,22 @@ func (p *ProfilesServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.ProfilesClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ProfilesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -261,7 +272,8 @@ func (p *ProfilesServerTransport) dispatchNewListAllPager(req *http.Request) (*h if p.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if p.newListAllPager == nil { + newListAllPager := p.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkProfiles` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -269,20 +281,22 @@ func (p *ProfilesServerTransport) dispatchNewListAllPager(req *http.Request) (*h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListAllPager(nil) - p.newListAllPager = &resp - server.PagerResponderInjectNextLinks(p.newListAllPager, req, func(page *armnetwork.ProfilesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + p.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.ProfilesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAllPager) { - p.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + p.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/publicipaddresses_server.go b/sdk/resourcemanager/network/armnetwork/fake/publicipaddresses_server.go index 05d04a08246f..07d9488ef56a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/publicipaddresses_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/publicipaddresses_server.go @@ -78,25 +78,36 @@ type PublicIPAddressesServer struct { } // NewPublicIPAddressesServerTransport creates a new instance of PublicIPAddressesServerTransport with the provided implementation. -// The returned PublicIPAddressesServerTransport instance is connected to an instance of armnetwork.PublicIPAddressesClient by way of the -// undefined.Transporter field. +// The returned PublicIPAddressesServerTransport instance is connected to an instance of armnetwork.PublicIPAddressesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPublicIPAddressesServerTransport(srv *PublicIPAddressesServer) *PublicIPAddressesServerTransport { - return &PublicIPAddressesServerTransport{srv: srv} + return &PublicIPAddressesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientCreateOrUpdateResponse]](), + beginDdosProtectionStatus: newTracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientDdosProtectionStatusResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListAllResponse]](), + newListCloudServicePublicIPAddressesPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]](), + newListCloudServiceRoleInstancePublicIPAddressesPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]](), + newListVirtualMachineScaleSetPublicIPAddressesPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]](), + newListVirtualMachineScaleSetVMPublicIPAddressesPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]](), + } } // PublicIPAddressesServerTransport connects instances of armnetwork.PublicIPAddressesClient to instances of PublicIPAddressesServer. // Don't use this type directly, use NewPublicIPAddressesServerTransport instead. type PublicIPAddressesServerTransport struct { srv *PublicIPAddressesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.PublicIPAddressesClientCreateOrUpdateResponse] - beginDdosProtectionStatus *azfake.PollerResponder[armnetwork.PublicIPAddressesClientDdosProtectionStatusResponse] - beginDelete *azfake.PollerResponder[armnetwork.PublicIPAddressesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListAllResponse] - newListCloudServicePublicIPAddressesPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse] - newListCloudServiceRoleInstancePublicIPAddressesPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse] - newListVirtualMachineScaleSetPublicIPAddressesPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse] - newListVirtualMachineScaleSetVMPublicIPAddressesPager *azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientCreateOrUpdateResponse]] + beginDdosProtectionStatus *tracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientDdosProtectionStatusResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PublicIPAddressesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListAllResponse]] + newListCloudServicePublicIPAddressesPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]] + newListCloudServiceRoleInstancePublicIPAddressesPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]] + newListVirtualMachineScaleSetPublicIPAddressesPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]] + newListVirtualMachineScaleSetVMPublicIPAddressesPager *tracker[azfake.PagerResponder[armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]] } // Do implements the policy.Transporter interface for PublicIPAddressesServerTransport. @@ -152,7 +163,8 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginCreateOrUpdate(req *http if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -175,19 +187,21 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginCreateOrUpdate(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -197,7 +211,8 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDdosProtectionStatus(req if p.srv.BeginDdosProtectionStatus == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDdosProtectionStatus not implemented")} } - if p.beginDdosProtectionStatus == nil { + beginDdosProtectionStatus := p.beginDdosProtectionStatus.get(req) + if beginDdosProtectionStatus == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -216,19 +231,21 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDdosProtectionStatus(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDdosProtectionStatus = &respr + beginDdosProtectionStatus = &respr + p.beginDdosProtectionStatus.add(req, beginDdosProtectionStatus) } - resp, err := server.PollerResponderNext(p.beginDdosProtectionStatus, req) + resp, err := server.PollerResponderNext(beginDdosProtectionStatus, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + p.beginDdosProtectionStatus.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDdosProtectionStatus) { - p.beginDdosProtectionStatus = nil + if !server.PollerResponderMore(beginDdosProtectionStatus) { + p.beginDdosProtectionStatus.remove(req) } return resp, nil @@ -238,7 +255,8 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDelete(req *http.Request if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -257,19 +275,21 @@ func (p *PublicIPAddressesServerTransport) dispatchBeginDelete(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -446,7 +466,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListPager(req *http.Reques if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -458,20 +479,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListPager(req *http.Reques return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PublicIPAddressesClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PublicIPAddressesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -480,7 +503,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListAllPager(req *http.Req if p.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if p.newListAllPager == nil { + newListAllPager := p.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPAddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -488,20 +512,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListAllPager(req *http.Req return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListAllPager(nil) - p.newListAllPager = &resp - server.PagerResponderInjectNextLinks(p.newListAllPager, req, func(page *armnetwork.PublicIPAddressesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + p.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.PublicIPAddressesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAllPager) { - p.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + p.newListAllPager.remove(req) } return resp, nil } @@ -510,7 +536,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServicePublicIPAd if p.srv.NewListCloudServicePublicIPAddressesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListCloudServicePublicIPAddressesPager not implemented")} } - if p.newListCloudServicePublicIPAddressesPager == nil { + newListCloudServicePublicIPAddressesPager := p.newListCloudServicePublicIPAddressesPager.get(req) + if newListCloudServicePublicIPAddressesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -526,20 +553,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServicePublicIPAd return nil, err } resp := p.srv.NewListCloudServicePublicIPAddressesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, nil) - p.newListCloudServicePublicIPAddressesPager = &resp - server.PagerResponderInjectNextLinks(p.newListCloudServicePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, createLink func() string) { + newListCloudServicePublicIPAddressesPager = &resp + p.newListCloudServicePublicIPAddressesPager.add(req, newListCloudServicePublicIPAddressesPager) + server.PagerResponderInjectNextLinks(newListCloudServicePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListCloudServicePublicIPAddressesPager, req) + resp, err := server.PagerResponderNext(newListCloudServicePublicIPAddressesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListCloudServicePublicIPAddressesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListCloudServicePublicIPAddressesPager) { - p.newListCloudServicePublicIPAddressesPager = nil + if !server.PagerResponderMore(newListCloudServicePublicIPAddressesPager) { + p.newListCloudServicePublicIPAddressesPager.remove(req) } return resp, nil } @@ -548,7 +577,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServiceRoleInstan if p.srv.NewListCloudServiceRoleInstancePublicIPAddressesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListCloudServiceRoleInstancePublicIPAddressesPager not implemented")} } - if p.newListCloudServiceRoleInstancePublicIPAddressesPager == nil { + newListCloudServiceRoleInstancePublicIPAddressesPager := p.newListCloudServiceRoleInstancePublicIPAddressesPager.get(req) + if newListCloudServiceRoleInstancePublicIPAddressesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/roleInstances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -576,20 +606,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListCloudServiceRoleInstan return nil, err } resp := p.srv.NewListCloudServiceRoleInstancePublicIPAddressesPager(resourceGroupNameUnescaped, cloudServiceNameUnescaped, roleInstanceNameUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, nil) - p.newListCloudServiceRoleInstancePublicIPAddressesPager = &resp - server.PagerResponderInjectNextLinks(p.newListCloudServiceRoleInstancePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, createLink func() string) { + newListCloudServiceRoleInstancePublicIPAddressesPager = &resp + p.newListCloudServiceRoleInstancePublicIPAddressesPager.add(req, newListCloudServiceRoleInstancePublicIPAddressesPager) + server.PagerResponderInjectNextLinks(newListCloudServiceRoleInstancePublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListCloudServiceRoleInstancePublicIPAddressesPager, req) + resp, err := server.PagerResponderNext(newListCloudServiceRoleInstancePublicIPAddressesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListCloudServiceRoleInstancePublicIPAddressesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListCloudServiceRoleInstancePublicIPAddressesPager) { - p.newListCloudServiceRoleInstancePublicIPAddressesPager = nil + if !server.PagerResponderMore(newListCloudServiceRoleInstancePublicIPAddressesPager) { + p.newListCloudServiceRoleInstancePublicIPAddressesPager.remove(req) } return resp, nil } @@ -598,7 +630,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet if p.srv.NewListVirtualMachineScaleSetPublicIPAddressesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachineScaleSetPublicIPAddressesPager not implemented")} } - if p.newListVirtualMachineScaleSetPublicIPAddressesPager == nil { + newListVirtualMachineScaleSetPublicIPAddressesPager := p.newListVirtualMachineScaleSetPublicIPAddressesPager.get(req) + if newListVirtualMachineScaleSetPublicIPAddressesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -614,20 +647,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet return nil, err } resp := p.srv.NewListVirtualMachineScaleSetPublicIPAddressesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, nil) - p.newListVirtualMachineScaleSetPublicIPAddressesPager = &resp - server.PagerResponderInjectNextLinks(p.newListVirtualMachineScaleSetPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, createLink func() string) { + newListVirtualMachineScaleSetPublicIPAddressesPager = &resp + p.newListVirtualMachineScaleSetPublicIPAddressesPager.add(req, newListVirtualMachineScaleSetPublicIPAddressesPager) + server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListVirtualMachineScaleSetPublicIPAddressesPager, req) + resp, err := server.PagerResponderNext(newListVirtualMachineScaleSetPublicIPAddressesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListVirtualMachineScaleSetPublicIPAddressesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListVirtualMachineScaleSetPublicIPAddressesPager) { - p.newListVirtualMachineScaleSetPublicIPAddressesPager = nil + if !server.PagerResponderMore(newListVirtualMachineScaleSetPublicIPAddressesPager) { + p.newListVirtualMachineScaleSetPublicIPAddressesPager.remove(req) } return resp, nil } @@ -636,7 +671,8 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet if p.srv.NewListVirtualMachineScaleSetVMPublicIPAddressesPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListVirtualMachineScaleSetVMPublicIPAddressesPager not implemented")} } - if p.newListVirtualMachineScaleSetVMPublicIPAddressesPager == nil { + newListVirtualMachineScaleSetVMPublicIPAddressesPager := p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.get(req) + if newListVirtualMachineScaleSetVMPublicIPAddressesPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/virtualMachineScaleSets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualMachines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkInterfaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipconfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/publicipaddresses` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -664,20 +700,22 @@ func (p *PublicIPAddressesServerTransport) dispatchNewListVirtualMachineScaleSet return nil, err } resp := p.srv.NewListVirtualMachineScaleSetVMPublicIPAddressesPager(resourceGroupNameUnescaped, virtualMachineScaleSetNameUnescaped, virtualmachineIndexUnescaped, networkInterfaceNameUnescaped, ipConfigurationNameUnescaped, nil) - p.newListVirtualMachineScaleSetVMPublicIPAddressesPager = &resp - server.PagerResponderInjectNextLinks(p.newListVirtualMachineScaleSetVMPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, createLink func() string) { + newListVirtualMachineScaleSetVMPublicIPAddressesPager = &resp + p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.add(req, newListVirtualMachineScaleSetVMPublicIPAddressesPager) + server.PagerResponderInjectNextLinks(newListVirtualMachineScaleSetVMPublicIPAddressesPager, req, func(page *armnetwork.PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListVirtualMachineScaleSetVMPublicIPAddressesPager, req) + resp, err := server.PagerResponderNext(newListVirtualMachineScaleSetVMPublicIPAddressesPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListVirtualMachineScaleSetVMPublicIPAddressesPager) { - p.newListVirtualMachineScaleSetVMPublicIPAddressesPager = nil + if !server.PagerResponderMore(newListVirtualMachineScaleSetVMPublicIPAddressesPager) { + p.newListVirtualMachineScaleSetVMPublicIPAddressesPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/publicipprefixes_server.go b/sdk/resourcemanager/network/armnetwork/fake/publicipprefixes_server.go index 3cccd36f7329..52b5ba998a39 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/publicipprefixes_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/publicipprefixes_server.go @@ -50,20 +50,26 @@ type PublicIPPrefixesServer struct { } // NewPublicIPPrefixesServerTransport creates a new instance of PublicIPPrefixesServerTransport with the provided implementation. -// The returned PublicIPPrefixesServerTransport instance is connected to an instance of armnetwork.PublicIPPrefixesClient by way of the -// undefined.Transporter field. +// The returned PublicIPPrefixesServerTransport instance is connected to an instance of armnetwork.PublicIPPrefixesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewPublicIPPrefixesServerTransport(srv *PublicIPPrefixesServer) *PublicIPPrefixesServerTransport { - return &PublicIPPrefixesServerTransport{srv: srv} + return &PublicIPPrefixesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.PublicIPPrefixesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.PublicIPPrefixesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListAllResponse]](), + } } // PublicIPPrefixesServerTransport connects instances of armnetwork.PublicIPPrefixesClient to instances of PublicIPPrefixesServer. // Don't use this type directly, use NewPublicIPPrefixesServerTransport instead. type PublicIPPrefixesServerTransport struct { srv *PublicIPPrefixesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.PublicIPPrefixesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.PublicIPPrefixesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.PublicIPPrefixesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.PublicIPPrefixesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.PublicIPPrefixesClientListAllResponse]] } // Do implements the policy.Transporter interface for PublicIPPrefixesServerTransport. @@ -105,7 +111,8 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if p.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if p.beginCreateOrUpdate == nil { + beginCreateOrUpdate := p.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginCreateOrUpdate(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + p.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(p.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + p.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginCreateOrUpdate) { - p.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + p.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) if p.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if p.beginDelete == nil { + beginDelete := p.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (p *PublicIPPrefixesServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - p.beginDelete = &respr + beginDelete = &respr + p.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(p.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + p.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(p.beginDelete) { - p.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + p.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListPager(req *http.Request if p.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if p.newListPager == nil { + newListPager := p.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListPager(req *http.Request return nil, err } resp := p.srv.NewListPager(resourceGroupNameUnescaped, nil) - p.newListPager = &resp - server.PagerResponderInjectNextLinks(p.newListPager, req, func(page *armnetwork.PublicIPPrefixesClientListResponse, createLink func() string) { + newListPager = &resp + p.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.PublicIPPrefixesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListPager) { - p.newListPager = nil + if !server.PagerResponderMore(newListPager) { + p.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ if p.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if p.newListAllPager == nil { + newListAllPager := p.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/publicIPPrefixes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (p *PublicIPPrefixesServerTransport) dispatchNewListAllPager(req *http.Requ return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := p.srv.NewListAllPager(nil) - p.newListAllPager = &resp - server.PagerResponderInjectNextLinks(p.newListAllPager, req, func(page *armnetwork.PublicIPPrefixesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + p.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.PublicIPPrefixesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(p.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + p.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(p.newListAllPager) { - p.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + p.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/resourcenavigationlinks_server.go b/sdk/resourcemanager/network/armnetwork/fake/resourcenavigationlinks_server.go index 57783639dcaf..e482ab34bea2 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/resourcenavigationlinks_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/resourcenavigationlinks_server.go @@ -29,8 +29,8 @@ type ResourceNavigationLinksServer struct { } // NewResourceNavigationLinksServerTransport creates a new instance of ResourceNavigationLinksServerTransport with the provided implementation. -// The returned ResourceNavigationLinksServerTransport instance is connected to an instance of armnetwork.ResourceNavigationLinksClient by way of the -// undefined.Transporter field. +// The returned ResourceNavigationLinksServerTransport instance is connected to an instance of armnetwork.ResourceNavigationLinksClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewResourceNavigationLinksServerTransport(srv *ResourceNavigationLinksServer) *ResourceNavigationLinksServerTransport { return &ResourceNavigationLinksServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routefilterrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/routefilterrules_server.go index 74757ad4d514..ad611896a2e2 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routefilterrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routefilterrules_server.go @@ -42,19 +42,24 @@ type RouteFilterRulesServer struct { } // NewRouteFilterRulesServerTransport creates a new instance of RouteFilterRulesServerTransport with the provided implementation. -// The returned RouteFilterRulesServerTransport instance is connected to an instance of armnetwork.RouteFilterRulesClient by way of the -// undefined.Transporter field. +// The returned RouteFilterRulesServerTransport instance is connected to an instance of armnetwork.RouteFilterRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRouteFilterRulesServerTransport(srv *RouteFilterRulesServer) *RouteFilterRulesServerTransport { - return &RouteFilterRulesServerTransport{srv: srv} + return &RouteFilterRulesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RouteFilterRulesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RouteFilterRulesClientDeleteResponse]](), + newListByRouteFilterPager: newTracker[azfake.PagerResponder[armnetwork.RouteFilterRulesClientListByRouteFilterResponse]](), + } } // RouteFilterRulesServerTransport connects instances of armnetwork.RouteFilterRulesClient to instances of RouteFilterRulesServer. // Don't use this type directly, use NewRouteFilterRulesServerTransport instead. type RouteFilterRulesServerTransport struct { srv *RouteFilterRulesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RouteFilterRulesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RouteFilterRulesClientDeleteResponse] - newListByRouteFilterPager *azfake.PagerResponder[armnetwork.RouteFilterRulesClientListByRouteFilterResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RouteFilterRulesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RouteFilterRulesClientDeleteResponse]] + newListByRouteFilterPager *tracker[azfake.PagerResponder[armnetwork.RouteFilterRulesClientListByRouteFilterResponse]] } // Do implements the policy.Transporter interface for RouteFilterRulesServerTransport. @@ -92,7 +97,8 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginCreateOrUpdate(req *http. if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginCreateOrUpdate(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginDelete(req *http.Request) if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (r *RouteFilterRulesServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (r *RouteFilterRulesServerTransport) dispatchNewListByRouteFilterPager(req if r.srv.NewListByRouteFilterPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByRouteFilterPager not implemented")} } - if r.newListByRouteFilterPager == nil { + newListByRouteFilterPager := r.newListByRouteFilterPager.get(req) + if newListByRouteFilterPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeFilterRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (r *RouteFilterRulesServerTransport) dispatchNewListByRouteFilterPager(req return nil, err } resp := r.srv.NewListByRouteFilterPager(resourceGroupNameUnescaped, routeFilterNameUnescaped, nil) - r.newListByRouteFilterPager = &resp - server.PagerResponderInjectNextLinks(r.newListByRouteFilterPager, req, func(page *armnetwork.RouteFilterRulesClientListByRouteFilterResponse, createLink func() string) { + newListByRouteFilterPager = &resp + r.newListByRouteFilterPager.add(req, newListByRouteFilterPager) + server.PagerResponderInjectNextLinks(newListByRouteFilterPager, req, func(page *armnetwork.RouteFilterRulesClientListByRouteFilterResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListByRouteFilterPager, req) + resp, err := server.PagerResponderNext(newListByRouteFilterPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListByRouteFilterPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListByRouteFilterPager) { - r.newListByRouteFilterPager = nil + if !server.PagerResponderMore(newListByRouteFilterPager) { + r.newListByRouteFilterPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routefilters_server.go b/sdk/resourcemanager/network/armnetwork/fake/routefilters_server.go index 4004ec987cc4..6e5137b2ce23 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routefilters_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routefilters_server.go @@ -50,20 +50,26 @@ type RouteFiltersServer struct { } // NewRouteFiltersServerTransport creates a new instance of RouteFiltersServerTransport with the provided implementation. -// The returned RouteFiltersServerTransport instance is connected to an instance of armnetwork.RouteFiltersClient by way of the -// undefined.Transporter field. +// The returned RouteFiltersServerTransport instance is connected to an instance of armnetwork.RouteFiltersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRouteFiltersServerTransport(srv *RouteFiltersServer) *RouteFiltersServerTransport { - return &RouteFiltersServerTransport{srv: srv} + return &RouteFiltersServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RouteFiltersClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RouteFiltersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.RouteFiltersClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.RouteFiltersClientListByResourceGroupResponse]](), + } } // RouteFiltersServerTransport connects instances of armnetwork.RouteFiltersClient to instances of RouteFiltersServer. // Don't use this type directly, use NewRouteFiltersServerTransport instead. type RouteFiltersServerTransport struct { srv *RouteFiltersServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RouteFiltersClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RouteFiltersClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.RouteFiltersClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.RouteFiltersClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RouteFiltersClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RouteFiltersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.RouteFiltersClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.RouteFiltersClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for RouteFiltersServerTransport. @@ -105,7 +111,8 @@ func (r *RouteFiltersServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (r *RouteFiltersServerTransport) dispatchBeginCreateOrUpdate(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (r *RouteFiltersServerTransport) dispatchBeginDelete(req *http.Request) (*h if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (r *RouteFiltersServerTransport) dispatchBeginDelete(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (r *RouteFiltersServerTransport) dispatchNewListPager(req *http.Request) (* if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -244,20 +257,22 @@ func (r *RouteFiltersServerTransport) dispatchNewListPager(req *http.Request) (* return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := r.srv.NewListPager(nil) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armnetwork.RouteFiltersClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RouteFiltersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } @@ -266,7 +281,8 @@ func (r *RouteFiltersServerTransport) dispatchNewListByResourceGroupPager(req *h if r.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if r.newListByResourceGroupPager == nil { + newListByResourceGroupPager := r.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeFilters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (r *RouteFiltersServerTransport) dispatchNewListByResourceGroupPager(req *h return nil, err } resp := r.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - r.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(r.newListByResourceGroupPager, req, func(page *armnetwork.RouteFiltersClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + r.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.RouteFiltersClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListByResourceGroupPager) { - r.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + r.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routemaps_server.go b/sdk/resourcemanager/network/armnetwork/fake/routemaps_server.go index ea4e6b96a4a8..1d9f88fe8656 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routemaps_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routemaps_server.go @@ -42,19 +42,24 @@ type RouteMapsServer struct { } // NewRouteMapsServerTransport creates a new instance of RouteMapsServerTransport with the provided implementation. -// The returned RouteMapsServerTransport instance is connected to an instance of armnetwork.RouteMapsClient by way of the -// undefined.Transporter field. +// The returned RouteMapsServerTransport instance is connected to an instance of armnetwork.RouteMapsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRouteMapsServerTransport(srv *RouteMapsServer) *RouteMapsServerTransport { - return &RouteMapsServerTransport{srv: srv} + return &RouteMapsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RouteMapsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RouteMapsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.RouteMapsClientListResponse]](), + } } // RouteMapsServerTransport connects instances of armnetwork.RouteMapsClient to instances of RouteMapsServer. // Don't use this type directly, use NewRouteMapsServerTransport instead. type RouteMapsServerTransport struct { srv *RouteMapsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RouteMapsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RouteMapsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.RouteMapsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RouteMapsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RouteMapsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.RouteMapsClientListResponse]] } // Do implements the policy.Transporter interface for RouteMapsServerTransport. @@ -92,7 +97,8 @@ func (r *RouteMapsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (r *RouteMapsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (r *RouteMapsServerTransport) dispatchBeginDelete(req *http.Request) (*http if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (r *RouteMapsServerTransport) dispatchBeginDelete(req *http.Request) (*http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (r *RouteMapsServerTransport) dispatchNewListPager(req *http.Request) (*htt if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeMaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (r *RouteMapsServerTransport) dispatchNewListPager(req *http.Request) (*htt return nil, err } resp := r.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armnetwork.RouteMapsClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RouteMapsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routes_server.go b/sdk/resourcemanager/network/armnetwork/fake/routes_server.go index f54b7a2e89d6..b79b5939675e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routes_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routes_server.go @@ -42,19 +42,24 @@ type RoutesServer struct { } // NewRoutesServerTransport creates a new instance of RoutesServerTransport with the provided implementation. -// The returned RoutesServerTransport instance is connected to an instance of armnetwork.RoutesClient by way of the -// undefined.Transporter field. +// The returned RoutesServerTransport instance is connected to an instance of armnetwork.RoutesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRoutesServerTransport(srv *RoutesServer) *RoutesServerTransport { - return &RoutesServerTransport{srv: srv} + return &RoutesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RoutesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RoutesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.RoutesClientListResponse]](), + } } // RoutesServerTransport connects instances of armnetwork.RoutesClient to instances of RoutesServer. // Don't use this type directly, use NewRoutesServerTransport instead. type RoutesServerTransport struct { srv *RoutesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RoutesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RoutesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.RoutesClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RoutesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RoutesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.RoutesClientListResponse]] } // Do implements the policy.Transporter interface for RoutesServerTransport. @@ -92,7 +97,8 @@ func (r *RoutesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) ( if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (r *RoutesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (r *RoutesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (r *RoutesServerTransport) dispatchBeginDelete(req *http.Request) (*http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (r *RoutesServerTransport) dispatchNewListPager(req *http.Request) (*http.R if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (r *RoutesServerTransport) dispatchNewListPager(req *http.Request) (*http.R return nil, err } resp := r.srv.NewListPager(resourceGroupNameUnescaped, routeTableNameUnescaped, nil) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armnetwork.RoutesClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RoutesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routetables_server.go b/sdk/resourcemanager/network/armnetwork/fake/routetables_server.go index b610a79f647d..49ab44a43090 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routetables_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routetables_server.go @@ -50,20 +50,26 @@ type RouteTablesServer struct { } // NewRouteTablesServerTransport creates a new instance of RouteTablesServerTransport with the provided implementation. -// The returned RouteTablesServerTransport instance is connected to an instance of armnetwork.RouteTablesClient by way of the -// undefined.Transporter field. +// The returned RouteTablesServerTransport instance is connected to an instance of armnetwork.RouteTablesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRouteTablesServerTransport(srv *RouteTablesServer) *RouteTablesServerTransport { - return &RouteTablesServerTransport{srv: srv} + return &RouteTablesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RouteTablesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RouteTablesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.RouteTablesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.RouteTablesClientListAllResponse]](), + } } // RouteTablesServerTransport connects instances of armnetwork.RouteTablesClient to instances of RouteTablesServer. // Don't use this type directly, use NewRouteTablesServerTransport instead. type RouteTablesServerTransport struct { srv *RouteTablesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RouteTablesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RouteTablesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.RouteTablesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.RouteTablesClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RouteTablesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RouteTablesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.RouteTablesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.RouteTablesClientListAllResponse]] } // Do implements the policy.Transporter interface for RouteTablesServerTransport. @@ -105,7 +111,8 @@ func (r *RouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (r *RouteTablesServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (r *RouteTablesServerTransport) dispatchBeginDelete(req *http.Request) (*ht if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (r *RouteTablesServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (r *RouteTablesServerTransport) dispatchNewListPager(req *http.Request) (*h if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (r *RouteTablesServerTransport) dispatchNewListPager(req *http.Request) (*h return nil, err } resp := r.srv.NewListPager(resourceGroupNameUnescaped, nil) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armnetwork.RouteTablesClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RouteTablesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (r *RouteTablesServerTransport) dispatchNewListAllPager(req *http.Request) if r.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if r.newListAllPager == nil { + newListAllPager := r.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (r *RouteTablesServerTransport) dispatchNewListAllPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := r.srv.NewListAllPager(nil) - r.newListAllPager = &resp - server.PagerResponderInjectNextLinks(r.newListAllPager, req, func(page *armnetwork.RouteTablesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + r.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.RouteTablesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListAllPager) { - r.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + r.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/routingintent_server.go b/sdk/resourcemanager/network/armnetwork/fake/routingintent_server.go index e9000f86f2a5..9dc075946f3f 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/routingintent_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/routingintent_server.go @@ -42,19 +42,24 @@ type RoutingIntentServer struct { } // NewRoutingIntentServerTransport creates a new instance of RoutingIntentServerTransport with the provided implementation. -// The returned RoutingIntentServerTransport instance is connected to an instance of armnetwork.RoutingIntentClient by way of the -// undefined.Transporter field. +// The returned RoutingIntentServerTransport instance is connected to an instance of armnetwork.RoutingIntentClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewRoutingIntentServerTransport(srv *RoutingIntentServer) *RoutingIntentServerTransport { - return &RoutingIntentServerTransport{srv: srv} + return &RoutingIntentServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.RoutingIntentClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.RoutingIntentClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.RoutingIntentClientListResponse]](), + } } // RoutingIntentServerTransport connects instances of armnetwork.RoutingIntentClient to instances of RoutingIntentServer. // Don't use this type directly, use NewRoutingIntentServerTransport instead. type RoutingIntentServerTransport struct { srv *RoutingIntentServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.RoutingIntentClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.RoutingIntentClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.RoutingIntentClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.RoutingIntentClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.RoutingIntentClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.RoutingIntentClientListResponse]] } // Do implements the policy.Transporter interface for RoutingIntentServerTransport. @@ -92,7 +97,8 @@ func (r *RoutingIntentServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if r.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if r.beginCreateOrUpdate == nil { + beginCreateOrUpdate := r.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (r *RoutingIntentServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + r.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(r.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + r.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginCreateOrUpdate) { - r.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + r.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (r *RoutingIntentServerTransport) dispatchBeginDelete(req *http.Request) (* if r.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if r.beginDelete == nil { + beginDelete := r.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (r *RoutingIntentServerTransport) dispatchBeginDelete(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - r.beginDelete = &respr + beginDelete = &respr + r.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(r.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + r.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(r.beginDelete) { - r.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + r.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (r *RoutingIntentServerTransport) dispatchNewListPager(req *http.Request) ( if r.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if r.newListPager == nil { + newListPager := r.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routingIntent` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (r *RoutingIntentServerTransport) dispatchNewListPager(req *http.Request) ( return nil, err } resp := r.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - r.newListPager = &resp - server.PagerResponderInjectNextLinks(r.newListPager, req, func(page *armnetwork.RoutingIntentClientListResponse, createLink func() string) { + newListPager = &resp + r.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.RoutingIntentClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(r.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + r.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(r.newListPager) { - r.newListPager = nil + if !server.PagerResponderMore(newListPager) { + r.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/scopeconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/scopeconnections_server.go index 4b7bb94cee82..5945f4a44ec8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/scopeconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/scopeconnections_server.go @@ -43,17 +43,20 @@ type ScopeConnectionsServer struct { } // NewScopeConnectionsServerTransport creates a new instance of ScopeConnectionsServerTransport with the provided implementation. -// The returned ScopeConnectionsServerTransport instance is connected to an instance of armnetwork.ScopeConnectionsClient by way of the -// undefined.Transporter field. +// The returned ScopeConnectionsServerTransport instance is connected to an instance of armnetwork.ScopeConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewScopeConnectionsServerTransport(srv *ScopeConnectionsServer) *ScopeConnectionsServerTransport { - return &ScopeConnectionsServerTransport{srv: srv} + return &ScopeConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ScopeConnectionsClientListResponse]](), + } } // ScopeConnectionsServerTransport connects instances of armnetwork.ScopeConnectionsClient to instances of ScopeConnectionsServer. // Don't use this type directly, use NewScopeConnectionsServerTransport instead. type ScopeConnectionsServerTransport struct { srv *ScopeConnectionsServer - newListPager *azfake.PagerResponder[armnetwork.ScopeConnectionsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ScopeConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for ScopeConnectionsServerTransport. @@ -206,7 +209,8 @@ func (s *ScopeConnectionsServerTransport) dispatchNewListPager(req *http.Request if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/scopeConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -249,20 +253,22 @@ func (s *ScopeConnectionsServerTransport) dispatchNewListPager(req *http.Request } } resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.ScopeConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ScopeConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/securityadminconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/securityadminconfigurations_server.go index e74a88501ee4..ac1762714b30 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/securityadminconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/securityadminconfigurations_server.go @@ -43,18 +43,22 @@ type SecurityAdminConfigurationsServer struct { } // NewSecurityAdminConfigurationsServerTransport creates a new instance of SecurityAdminConfigurationsServerTransport with the provided implementation. -// The returned SecurityAdminConfigurationsServerTransport instance is connected to an instance of armnetwork.SecurityAdminConfigurationsClient by way of the -// undefined.Transporter field. +// The returned SecurityAdminConfigurationsServerTransport instance is connected to an instance of armnetwork.SecurityAdminConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSecurityAdminConfigurationsServerTransport(srv *SecurityAdminConfigurationsServer) *SecurityAdminConfigurationsServerTransport { - return &SecurityAdminConfigurationsServerTransport{srv: srv} + return &SecurityAdminConfigurationsServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.SecurityAdminConfigurationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.SecurityAdminConfigurationsClientListResponse]](), + } } // SecurityAdminConfigurationsServerTransport connects instances of armnetwork.SecurityAdminConfigurationsClient to instances of SecurityAdminConfigurationsServer. // Don't use this type directly, use NewSecurityAdminConfigurationsServerTransport instead. type SecurityAdminConfigurationsServerTransport struct { srv *SecurityAdminConfigurationsServer - beginDelete *azfake.PollerResponder[armnetwork.SecurityAdminConfigurationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.SecurityAdminConfigurationsClientListResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.SecurityAdminConfigurationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.SecurityAdminConfigurationsClientListResponse]] } // Do implements the policy.Transporter interface for SecurityAdminConfigurationsServerTransport. @@ -133,7 +137,8 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchBeginDelete(req *ht if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -171,19 +176,21 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchBeginDelete(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -230,7 +237,8 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchNewListPager(req *h if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityAdminConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -273,20 +281,22 @@ func (s *SecurityAdminConfigurationsServerTransport) dispatchNewListPager(req *h } } resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SecurityAdminConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityAdminConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/securitygroups_server.go b/sdk/resourcemanager/network/armnetwork/fake/securitygroups_server.go index 3d792e0ae09c..08f8ea651c07 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/securitygroups_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/securitygroups_server.go @@ -50,20 +50,26 @@ type SecurityGroupsServer struct { } // NewSecurityGroupsServerTransport creates a new instance of SecurityGroupsServerTransport with the provided implementation. -// The returned SecurityGroupsServerTransport instance is connected to an instance of armnetwork.SecurityGroupsClient by way of the -// undefined.Transporter field. +// The returned SecurityGroupsServerTransport instance is connected to an instance of armnetwork.SecurityGroupsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSecurityGroupsServerTransport(srv *SecurityGroupsServer) *SecurityGroupsServerTransport { - return &SecurityGroupsServerTransport{srv: srv} + return &SecurityGroupsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.SecurityGroupsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.SecurityGroupsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.SecurityGroupsClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.SecurityGroupsClientListAllResponse]](), + } } // SecurityGroupsServerTransport connects instances of armnetwork.SecurityGroupsClient to instances of SecurityGroupsServer. // Don't use this type directly, use NewSecurityGroupsServerTransport instead. type SecurityGroupsServerTransport struct { srv *SecurityGroupsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.SecurityGroupsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.SecurityGroupsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.SecurityGroupsClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.SecurityGroupsClientListAllResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.SecurityGroupsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.SecurityGroupsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.SecurityGroupsClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.SecurityGroupsClientListAllResponse]] } // Do implements the policy.Transporter interface for SecurityGroupsServerTransport. @@ -105,7 +111,8 @@ func (s *SecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (s *SecurityGroupsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (s *SecurityGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (s *SecurityGroupsServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (s *SecurityGroupsServerTransport) dispatchNewListPager(req *http.Request) if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -248,20 +261,22 @@ func (s *SecurityGroupsServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := s.srv.NewListPager(resourceGroupNameUnescaped, nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SecurityGroupsClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityGroupsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } @@ -270,7 +285,8 @@ func (s *SecurityGroupsServerTransport) dispatchNewListAllPager(req *http.Reques if s.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if s.newListAllPager == nil { + newListAllPager := s.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (s *SecurityGroupsServerTransport) dispatchNewListAllPager(req *http.Reques return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListAllPager(nil) - s.newListAllPager = &resp - server.PagerResponderInjectNextLinks(s.newListAllPager, req, func(page *armnetwork.SecurityGroupsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + s.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.SecurityGroupsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListAllPager) { - s.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + s.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/securitypartnerproviders_server.go b/sdk/resourcemanager/network/armnetwork/fake/securitypartnerproviders_server.go index 1cb136c1967b..713d1609f84e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/securitypartnerproviders_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/securitypartnerproviders_server.go @@ -50,20 +50,26 @@ type SecurityPartnerProvidersServer struct { } // NewSecurityPartnerProvidersServerTransport creates a new instance of SecurityPartnerProvidersServerTransport with the provided implementation. -// The returned SecurityPartnerProvidersServerTransport instance is connected to an instance of armnetwork.SecurityPartnerProvidersClient by way of the -// undefined.Transporter field. +// The returned SecurityPartnerProvidersServerTransport instance is connected to an instance of armnetwork.SecurityPartnerProvidersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSecurityPartnerProvidersServerTransport(srv *SecurityPartnerProvidersServer) *SecurityPartnerProvidersServerTransport { - return &SecurityPartnerProvidersServerTransport{srv: srv} + return &SecurityPartnerProvidersServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse]](), + } } // SecurityPartnerProvidersServerTransport connects instances of armnetwork.SecurityPartnerProvidersClient to instances of SecurityPartnerProvidersServer. // Don't use this type directly, use NewSecurityPartnerProvidersServerTransport instead. type SecurityPartnerProvidersServerTransport struct { srv *SecurityPartnerProvidersServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.SecurityPartnerProvidersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for SecurityPartnerProvidersServerTransport. @@ -105,7 +111,8 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginCreateOrUpdate(re if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginCreateOrUpdate(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginDelete(req *http. if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchBeginDelete(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListPager(req *http if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListPager(req *http return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListPager(nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SecurityPartnerProvidersClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityPartnerProvidersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListByResourceGroup if s.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if s.newListByResourceGroupPager == nil { + newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/securityPartnerProviders` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (s *SecurityPartnerProvidersServerTransport) dispatchNewListByResourceGroup return nil, err } resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - s.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(s.newListByResourceGroupPager, req, func(page *armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.SecurityPartnerProvidersClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListByResourceGroupPager) { - s.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + s.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/securityrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/securityrules_server.go index 8a7653bbfde3..22d67de6230f 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/securityrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/securityrules_server.go @@ -42,19 +42,24 @@ type SecurityRulesServer struct { } // NewSecurityRulesServerTransport creates a new instance of SecurityRulesServerTransport with the provided implementation. -// The returned SecurityRulesServerTransport instance is connected to an instance of armnetwork.SecurityRulesClient by way of the -// undefined.Transporter field. +// The returned SecurityRulesServerTransport instance is connected to an instance of armnetwork.SecurityRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSecurityRulesServerTransport(srv *SecurityRulesServer) *SecurityRulesServerTransport { - return &SecurityRulesServerTransport{srv: srv} + return &SecurityRulesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.SecurityRulesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.SecurityRulesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.SecurityRulesClientListResponse]](), + } } // SecurityRulesServerTransport connects instances of armnetwork.SecurityRulesClient to instances of SecurityRulesServer. // Don't use this type directly, use NewSecurityRulesServerTransport instead. type SecurityRulesServerTransport struct { srv *SecurityRulesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.SecurityRulesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.SecurityRulesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.SecurityRulesClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.SecurityRulesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.SecurityRulesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.SecurityRulesClientListResponse]] } // Do implements the policy.Transporter interface for SecurityRulesServerTransport. @@ -92,7 +97,8 @@ func (s *SecurityRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (s *SecurityRulesServerTransport) dispatchBeginCreateOrUpdate(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (s *SecurityRulesServerTransport) dispatchBeginDelete(req *http.Request) (* if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (s *SecurityRulesServerTransport) dispatchBeginDelete(req *http.Request) (* if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (s *SecurityRulesServerTransport) dispatchNewListPager(req *http.Request) ( if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkSecurityGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (s *SecurityRulesServerTransport) dispatchNewListPager(req *http.Request) ( return nil, err } resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkSecurityGroupNameUnescaped, nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SecurityRulesClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SecurityRulesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/serviceassociationlinks_server.go b/sdk/resourcemanager/network/armnetwork/fake/serviceassociationlinks_server.go index 83b35b828017..8efc92fd354a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/serviceassociationlinks_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/serviceassociationlinks_server.go @@ -29,8 +29,8 @@ type ServiceAssociationLinksServer struct { } // NewServiceAssociationLinksServerTransport creates a new instance of ServiceAssociationLinksServerTransport with the provided implementation. -// The returned ServiceAssociationLinksServerTransport instance is connected to an instance of armnetwork.ServiceAssociationLinksClient by way of the -// undefined.Transporter field. +// The returned ServiceAssociationLinksServerTransport instance is connected to an instance of armnetwork.ServiceAssociationLinksClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServiceAssociationLinksServerTransport(srv *ServiceAssociationLinksServer) *ServiceAssociationLinksServerTransport { return &ServiceAssociationLinksServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicies_server.go b/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicies_server.go index 28590a4aed87..656f9d907fb4 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicies_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicies_server.go @@ -50,20 +50,26 @@ type ServiceEndpointPoliciesServer struct { } // NewServiceEndpointPoliciesServerTransport creates a new instance of ServiceEndpointPoliciesServerTransport with the provided implementation. -// The returned ServiceEndpointPoliciesServerTransport instance is connected to an instance of armnetwork.ServiceEndpointPoliciesClient by way of the -// undefined.Transporter field. +// The returned ServiceEndpointPoliciesServerTransport instance is connected to an instance of armnetwork.ServiceEndpointPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServiceEndpointPoliciesServerTransport(srv *ServiceEndpointPoliciesServer) *ServiceEndpointPoliciesServerTransport { - return &ServiceEndpointPoliciesServerTransport{srv: srv} + return &ServiceEndpointPoliciesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse]](), + } } // ServiceEndpointPoliciesServerTransport connects instances of armnetwork.ServiceEndpointPoliciesClient to instances of ServiceEndpointPoliciesServer. // Don't use this type directly, use NewServiceEndpointPoliciesServerTransport instead. type ServiceEndpointPoliciesServerTransport struct { srv *ServiceEndpointPoliciesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ServiceEndpointPoliciesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for ServiceEndpointPoliciesServerTransport. @@ -105,7 +111,8 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginCreateOrUpdate(req if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginDelete(req *http.R if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchBeginDelete(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListPager(req *http. if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ServiceEndpointPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -244,20 +257,22 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListPager(req *http. return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := s.srv.NewListPager(nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.ServiceEndpointPoliciesClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ServiceEndpointPoliciesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } @@ -266,7 +281,8 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListByResourceGroupP if s.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if s.newListByResourceGroupPager == nil { + newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (s *ServiceEndpointPoliciesServerTransport) dispatchNewListByResourceGroupP return nil, err } resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - s.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(s.newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPoliciesClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListByResourceGroupPager) { - s.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + s.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicydefinitions_server.go b/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicydefinitions_server.go index 1235bef457ed..a717a1afc3be 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicydefinitions_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/serviceendpointpolicydefinitions_server.go @@ -42,19 +42,24 @@ type ServiceEndpointPolicyDefinitionsServer struct { } // NewServiceEndpointPolicyDefinitionsServerTransport creates a new instance of ServiceEndpointPolicyDefinitionsServerTransport with the provided implementation. -// The returned ServiceEndpointPolicyDefinitionsServerTransport instance is connected to an instance of armnetwork.ServiceEndpointPolicyDefinitionsClient by way of the -// undefined.Transporter field. +// The returned ServiceEndpointPolicyDefinitionsServerTransport instance is connected to an instance of armnetwork.ServiceEndpointPolicyDefinitionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServiceEndpointPolicyDefinitionsServerTransport(srv *ServiceEndpointPolicyDefinitionsServer) *ServiceEndpointPolicyDefinitionsServerTransport { - return &ServiceEndpointPolicyDefinitionsServerTransport{srv: srv} + return &ServiceEndpointPolicyDefinitionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientDeleteResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]](), + } } // ServiceEndpointPolicyDefinitionsServerTransport connects instances of armnetwork.ServiceEndpointPolicyDefinitionsClient to instances of ServiceEndpointPolicyDefinitionsServer. // Don't use this type directly, use NewServiceEndpointPolicyDefinitionsServerTransport instead. type ServiceEndpointPolicyDefinitionsServerTransport struct { srv *ServiceEndpointPolicyDefinitionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientDeleteResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientDeleteResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for ServiceEndpointPolicyDefinitionsServerTransport. @@ -92,7 +97,8 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginCreateOrU if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginCreateOrU if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginDelete(re if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchBeginDelete(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchNewListByResou if s.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if s.newListByResourceGroupPager == nil { + newListByResourceGroupPager := s.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/serviceEndpointPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceEndpointPolicyDefinitions` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (s *ServiceEndpointPolicyDefinitionsServerTransport) dispatchNewListByResou return nil, err } resp := s.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, serviceEndpointPolicyNameUnescaped, nil) - s.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(s.newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + s.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListByResourceGroupPager) { - s.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + s.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/servicetaginformation_server.go b/sdk/resourcemanager/network/armnetwork/fake/servicetaginformation_server.go index 7c464c9cad8b..8b45f61c3576 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/servicetaginformation_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/servicetaginformation_server.go @@ -30,17 +30,20 @@ type ServiceTagInformationServer struct { } // NewServiceTagInformationServerTransport creates a new instance of ServiceTagInformationServerTransport with the provided implementation. -// The returned ServiceTagInformationServerTransport instance is connected to an instance of armnetwork.ServiceTagInformationClient by way of the -// undefined.Transporter field. +// The returned ServiceTagInformationServerTransport instance is connected to an instance of armnetwork.ServiceTagInformationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServiceTagInformationServerTransport(srv *ServiceTagInformationServer) *ServiceTagInformationServerTransport { - return &ServiceTagInformationServerTransport{srv: srv} + return &ServiceTagInformationServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.ServiceTagInformationClientListResponse]](), + } } // ServiceTagInformationServerTransport connects instances of armnetwork.ServiceTagInformationClient to instances of ServiceTagInformationServer. // Don't use this type directly, use NewServiceTagInformationServerTransport instead. type ServiceTagInformationServerTransport struct { srv *ServiceTagInformationServer - newListPager *azfake.PagerResponder[armnetwork.ServiceTagInformationClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.ServiceTagInformationClientListResponse]] } // Do implements the policy.Transporter interface for ServiceTagInformationServerTransport. @@ -72,7 +75,8 @@ func (s *ServiceTagInformationServerTransport) dispatchNewListPager(req *http.Re if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/serviceTagDetails` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -105,20 +109,22 @@ func (s *ServiceTagInformationServerTransport) dispatchNewListPager(req *http.Re } } resp := s.srv.NewListPager(locationUnescaped, options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.ServiceTagInformationClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.ServiceTagInformationClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/servicetags_server.go b/sdk/resourcemanager/network/armnetwork/fake/servicetags_server.go index e788bf218a1c..9e5ee9d2807b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/servicetags_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/servicetags_server.go @@ -29,8 +29,8 @@ type ServiceTagsServer struct { } // NewServiceTagsServerTransport creates a new instance of ServiceTagsServerTransport with the provided implementation. -// The returned ServiceTagsServerTransport instance is connected to an instance of armnetwork.ServiceTagsClient by way of the -// undefined.Transporter field. +// The returned ServiceTagsServerTransport instance is connected to an instance of armnetwork.ServiceTagsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServiceTagsServerTransport(srv *ServiceTagsServer) *ServiceTagsServerTransport { return &ServiceTagsServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/staticmembers_server.go b/sdk/resourcemanager/network/armnetwork/fake/staticmembers_server.go index 4d45dff229f6..f3dca8e83ff3 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/staticmembers_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/staticmembers_server.go @@ -43,17 +43,20 @@ type StaticMembersServer struct { } // NewStaticMembersServerTransport creates a new instance of StaticMembersServerTransport with the provided implementation. -// The returned StaticMembersServerTransport instance is connected to an instance of armnetwork.StaticMembersClient by way of the -// undefined.Transporter field. +// The returned StaticMembersServerTransport instance is connected to an instance of armnetwork.StaticMembersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewStaticMembersServerTransport(srv *StaticMembersServer) *StaticMembersServerTransport { - return &StaticMembersServerTransport{srv: srv} + return &StaticMembersServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.StaticMembersClientListResponse]](), + } } // StaticMembersServerTransport connects instances of armnetwork.StaticMembersClient to instances of StaticMembersServer. // Don't use this type directly, use NewStaticMembersServerTransport instead. type StaticMembersServerTransport struct { srv *StaticMembersServer - newListPager *azfake.PagerResponder[armnetwork.StaticMembersClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.StaticMembersClientListResponse]] } // Do implements the policy.Transporter interface for StaticMembersServerTransport. @@ -218,7 +221,8 @@ func (s *StaticMembersServerTransport) dispatchNewListPager(req *http.Request) ( if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/staticMembers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -265,20 +269,22 @@ func (s *StaticMembersServerTransport) dispatchNewListPager(req *http.Request) ( } } resp := s.srv.NewListPager(resourceGroupNameUnescaped, networkManagerNameUnescaped, networkGroupNameUnescaped, options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.StaticMembersClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.StaticMembersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/subnets_server.go b/sdk/resourcemanager/network/armnetwork/fake/subnets_server.go index 78b9b870b43f..1ad2708c081c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/subnets_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/subnets_server.go @@ -50,21 +50,28 @@ type SubnetsServer struct { } // NewSubnetsServerTransport creates a new instance of SubnetsServerTransport with the provided implementation. -// The returned SubnetsServerTransport instance is connected to an instance of armnetwork.SubnetsClient by way of the -// undefined.Transporter field. +// The returned SubnetsServerTransport instance is connected to an instance of armnetwork.SubnetsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSubnetsServerTransport(srv *SubnetsServer) *SubnetsServerTransport { - return &SubnetsServerTransport{srv: srv} + return &SubnetsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.SubnetsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.SubnetsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.SubnetsClientListResponse]](), + beginPrepareNetworkPolicies: newTracker[azfake.PollerResponder[armnetwork.SubnetsClientPrepareNetworkPoliciesResponse]](), + beginUnprepareNetworkPolicies: newTracker[azfake.PollerResponder[armnetwork.SubnetsClientUnprepareNetworkPoliciesResponse]](), + } } // SubnetsServerTransport connects instances of armnetwork.SubnetsClient to instances of SubnetsServer. // Don't use this type directly, use NewSubnetsServerTransport instead. type SubnetsServerTransport struct { srv *SubnetsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.SubnetsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.SubnetsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.SubnetsClientListResponse] - beginPrepareNetworkPolicies *azfake.PollerResponder[armnetwork.SubnetsClientPrepareNetworkPoliciesResponse] - beginUnprepareNetworkPolicies *azfake.PollerResponder[armnetwork.SubnetsClientUnprepareNetworkPoliciesResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.SubnetsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.SubnetsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.SubnetsClientListResponse]] + beginPrepareNetworkPolicies *tracker[azfake.PollerResponder[armnetwork.SubnetsClientPrepareNetworkPoliciesResponse]] + beginUnprepareNetworkPolicies *tracker[azfake.PollerResponder[armnetwork.SubnetsClientUnprepareNetworkPoliciesResponse]] } // Do implements the policy.Transporter interface for SubnetsServerTransport. @@ -106,7 +113,8 @@ func (s *SubnetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if s.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if s.beginCreateOrUpdate == nil { + beginCreateOrUpdate := s.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -133,19 +141,21 @@ func (s *SubnetsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + s.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(s.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + s.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginCreateOrUpdate) { - s.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + s.beginCreateOrUpdate.remove(req) } return resp, nil @@ -155,7 +165,8 @@ func (s *SubnetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.R if s.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if s.beginDelete == nil { + beginDelete := s.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -178,19 +189,21 @@ func (s *SubnetsServerTransport) dispatchBeginDelete(req *http.Request) (*http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginDelete = &respr + beginDelete = &respr + s.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(s.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + s.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginDelete) { - s.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + s.beginDelete.remove(req) } return resp, nil @@ -249,7 +262,8 @@ func (s *SubnetsServerTransport) dispatchNewListPager(req *http.Request) (*http. if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -265,20 +279,22 @@ func (s *SubnetsServerTransport) dispatchNewListPager(req *http.Request) (*http. return nil, err } resp := s.srv.NewListPager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SubnetsClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SubnetsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } @@ -287,7 +303,8 @@ func (s *SubnetsServerTransport) dispatchBeginPrepareNetworkPolicies(req *http.R if s.srv.BeginPrepareNetworkPolicies == nil { return nil, &nonRetriableError{errors.New("fake for method BeginPrepareNetworkPolicies not implemented")} } - if s.beginPrepareNetworkPolicies == nil { + beginPrepareNetworkPolicies := s.beginPrepareNetworkPolicies.get(req) + if beginPrepareNetworkPolicies == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/PrepareNetworkPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -314,19 +331,21 @@ func (s *SubnetsServerTransport) dispatchBeginPrepareNetworkPolicies(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginPrepareNetworkPolicies = &respr + beginPrepareNetworkPolicies = &respr + s.beginPrepareNetworkPolicies.add(req, beginPrepareNetworkPolicies) } - resp, err := server.PollerResponderNext(s.beginPrepareNetworkPolicies, req) + resp, err := server.PollerResponderNext(beginPrepareNetworkPolicies, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginPrepareNetworkPolicies.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginPrepareNetworkPolicies) { - s.beginPrepareNetworkPolicies = nil + if !server.PollerResponderMore(beginPrepareNetworkPolicies) { + s.beginPrepareNetworkPolicies.remove(req) } return resp, nil @@ -336,7 +355,8 @@ func (s *SubnetsServerTransport) dispatchBeginUnprepareNetworkPolicies(req *http if s.srv.BeginUnprepareNetworkPolicies == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUnprepareNetworkPolicies not implemented")} } - if s.beginUnprepareNetworkPolicies == nil { + beginUnprepareNetworkPolicies := s.beginUnprepareNetworkPolicies.get(req) + if beginUnprepareNetworkPolicies == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/subnets/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/UnprepareNetworkPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -363,19 +383,21 @@ func (s *SubnetsServerTransport) dispatchBeginUnprepareNetworkPolicies(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - s.beginUnprepareNetworkPolicies = &respr + beginUnprepareNetworkPolicies = &respr + s.beginUnprepareNetworkPolicies.add(req, beginUnprepareNetworkPolicies) } - resp, err := server.PollerResponderNext(s.beginUnprepareNetworkPolicies, req) + resp, err := server.PollerResponderNext(beginUnprepareNetworkPolicies, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + s.beginUnprepareNetworkPolicies.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(s.beginUnprepareNetworkPolicies) { - s.beginUnprepareNetworkPolicies = nil + if !server.PollerResponderMore(beginUnprepareNetworkPolicies) { + s.beginUnprepareNetworkPolicies.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/subscriptionnetworkmanagerconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/subscriptionnetworkmanagerconnections_server.go index 4422d6370fbe..073f1ea618ee 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/subscriptionnetworkmanagerconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/subscriptionnetworkmanagerconnections_server.go @@ -43,17 +43,20 @@ type SubscriptionNetworkManagerConnectionsServer struct { } // NewSubscriptionNetworkManagerConnectionsServerTransport creates a new instance of SubscriptionNetworkManagerConnectionsServerTransport with the provided implementation. -// The returned SubscriptionNetworkManagerConnectionsServerTransport instance is connected to an instance of armnetwork.SubscriptionNetworkManagerConnectionsClient by way of the -// undefined.Transporter field. +// The returned SubscriptionNetworkManagerConnectionsServerTransport instance is connected to an instance of armnetwork.SubscriptionNetworkManagerConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSubscriptionNetworkManagerConnectionsServerTransport(srv *SubscriptionNetworkManagerConnectionsServer) *SubscriptionNetworkManagerConnectionsServerTransport { - return &SubscriptionNetworkManagerConnectionsServerTransport{srv: srv} + return &SubscriptionNetworkManagerConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.SubscriptionNetworkManagerConnectionsClientListResponse]](), + } } // SubscriptionNetworkManagerConnectionsServerTransport connects instances of armnetwork.SubscriptionNetworkManagerConnectionsClient to instances of SubscriptionNetworkManagerConnectionsServer. // Don't use this type directly, use NewSubscriptionNetworkManagerConnectionsServerTransport instead. type SubscriptionNetworkManagerConnectionsServerTransport struct { srv *SubscriptionNetworkManagerConnectionsServer - newListPager *azfake.PagerResponder[armnetwork.SubscriptionNetworkManagerConnectionsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.SubscriptionNetworkManagerConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for SubscriptionNetworkManagerConnectionsServerTransport. @@ -182,7 +185,8 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchNewListPa if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkManagerConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -217,20 +221,22 @@ func (s *SubscriptionNetworkManagerConnectionsServerTransport) dispatchNewListPa } } resp := s.srv.NewListPager(options) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armnetwork.SubscriptionNetworkManagerConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.SubscriptionNetworkManagerConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/usages_server.go b/sdk/resourcemanager/network/armnetwork/fake/usages_server.go index 98fee5e4214b..9f3344635490 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/usages_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/usages_server.go @@ -29,17 +29,20 @@ type UsagesServer struct { } // NewUsagesServerTransport creates a new instance of UsagesServerTransport with the provided implementation. -// The returned UsagesServerTransport instance is connected to an instance of armnetwork.UsagesClient by way of the -// undefined.Transporter field. +// The returned UsagesServerTransport instance is connected to an instance of armnetwork.UsagesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewUsagesServerTransport(srv *UsagesServer) *UsagesServerTransport { - return &UsagesServerTransport{srv: srv} + return &UsagesServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.UsagesClientListResponse]](), + } } // UsagesServerTransport connects instances of armnetwork.UsagesClient to instances of UsagesServer. // Don't use this type directly, use NewUsagesServerTransport instead. type UsagesServerTransport struct { srv *UsagesServer - newListPager *azfake.PagerResponder[armnetwork.UsagesClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.UsagesClientListResponse]] } // Do implements the policy.Transporter interface for UsagesServerTransport. @@ -71,7 +74,8 @@ func (u *UsagesServerTransport) dispatchNewListPager(req *http.Request) (*http.R if u.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if u.newListPager == nil { + newListPager := u.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -83,20 +87,22 @@ func (u *UsagesServerTransport) dispatchNewListPager(req *http.Request) (*http.R return nil, err } resp := u.srv.NewListPager(locationUnescaped, nil) - u.newListPager = &resp - server.PagerResponderInjectNextLinks(u.newListPager, req, func(page *armnetwork.UsagesClientListResponse, createLink func() string) { + newListPager = &resp + u.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.UsagesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(u.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + u.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(u.newListPager) { - u.newListPager = nil + if !server.PagerResponderMore(newListPager) { + u.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vipswap_server.go b/sdk/resourcemanager/network/armnetwork/fake/vipswap_server.go index 52b08f78042d..b030c3107160 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vipswap_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vipswap_server.go @@ -37,17 +37,20 @@ type VipSwapServer struct { } // NewVipSwapServerTransport creates a new instance of VipSwapServerTransport with the provided implementation. -// The returned VipSwapServerTransport instance is connected to an instance of armnetwork.VipSwapClient by way of the -// undefined.Transporter field. +// The returned VipSwapServerTransport instance is connected to an instance of armnetwork.VipSwapClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVipSwapServerTransport(srv *VipSwapServer) *VipSwapServerTransport { - return &VipSwapServerTransport{srv: srv} + return &VipSwapServerTransport{ + srv: srv, + beginCreate: newTracker[azfake.PollerResponder[armnetwork.VipSwapClientCreateResponse]](), + } } // VipSwapServerTransport connects instances of armnetwork.VipSwapClient to instances of VipSwapServer. // Don't use this type directly, use NewVipSwapServerTransport instead. type VipSwapServerTransport struct { srv *VipSwapServer - beginCreate *azfake.PollerResponder[armnetwork.VipSwapClientCreateResponse] + beginCreate *tracker[azfake.PollerResponder[armnetwork.VipSwapClientCreateResponse]] } // Do implements the policy.Transporter interface for VipSwapServerTransport. @@ -83,7 +86,8 @@ func (v *VipSwapServerTransport) dispatchBeginCreate(req *http.Request) (*http.R if v.srv.BeginCreate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreate not implemented")} } - if v.beginCreate == nil { + beginCreate := v.beginCreate.get(req) + if beginCreate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Compute/cloudServices/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/cloudServiceSlots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -106,19 +110,21 @@ func (v *VipSwapServerTransport) dispatchBeginCreate(req *http.Request) (*http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreate = &respr + beginCreate = &respr + v.beginCreate.add(req, beginCreate) } - resp, err := server.PollerResponderNext(v.beginCreate, req) + resp, err := server.PollerResponderNext(beginCreate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginCreate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreate) { - v.beginCreate = nil + if !server.PollerResponderMore(beginCreate) { + v.beginCreate.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceconnections_server.go index 9933b3351641..b22866daed4c 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceconnections_server.go @@ -42,19 +42,24 @@ type VirtualApplianceConnectionsServer struct { } // NewVirtualApplianceConnectionsServerTransport creates a new instance of VirtualApplianceConnectionsServerTransport with the provided implementation. -// The returned VirtualApplianceConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualApplianceConnectionsClient by way of the -// undefined.Transporter field. +// The returned VirtualApplianceConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualApplianceConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualApplianceConnectionsServerTransport(srv *VirtualApplianceConnectionsServer) *VirtualApplianceConnectionsServerTransport { - return &VirtualApplianceConnectionsServerTransport{srv: srv} + return &VirtualApplianceConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualApplianceConnectionsClientListResponse]](), + } } // VirtualApplianceConnectionsServerTransport connects instances of armnetwork.VirtualApplianceConnectionsClient to instances of VirtualApplianceConnectionsServer. // Don't use this type directly, use NewVirtualApplianceConnectionsServerTransport instead. type VirtualApplianceConnectionsServerTransport struct { srv *VirtualApplianceConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualApplianceConnectionsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualApplianceConnectionsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualApplianceConnectionsClientListResponse]] } // Do implements the policy.Transporter interface for VirtualApplianceConnectionsServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginCreateOrUpdate if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginCreateOrUpdate if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginDelete(req *ht if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchBeginDelete(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchNewListPager(req *h if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkVirtualApplianceConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualApplianceConnectionsServerTransport) dispatchNewListPager(req *h return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualApplianceConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualApplianceConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualappliances_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualappliances_server.go index 6834be34c4a1..68ed28471baa 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualappliances_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualappliances_server.go @@ -50,20 +50,26 @@ type VirtualAppliancesServer struct { } // NewVirtualAppliancesServerTransport creates a new instance of VirtualAppliancesServerTransport with the provided implementation. -// The returned VirtualAppliancesServerTransport instance is connected to an instance of armnetwork.VirtualAppliancesClient by way of the -// undefined.Transporter field. +// The returned VirtualAppliancesServerTransport instance is connected to an instance of armnetwork.VirtualAppliancesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualAppliancesServerTransport(srv *VirtualAppliancesServer) *VirtualAppliancesServerTransport { - return &VirtualAppliancesServerTransport{srv: srv} + return &VirtualAppliancesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualAppliancesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualAppliancesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualAppliancesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VirtualAppliancesClientListByResourceGroupResponse]](), + } } // VirtualAppliancesServerTransport connects instances of armnetwork.VirtualAppliancesClient to instances of VirtualAppliancesServer. // Don't use this type directly, use NewVirtualAppliancesServerTransport instead. type VirtualAppliancesServerTransport struct { srv *VirtualAppliancesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualAppliancesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualAppliancesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualAppliancesClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VirtualAppliancesClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualAppliancesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualAppliancesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualAppliancesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VirtualAppliancesClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VirtualAppliancesServerTransport. @@ -105,7 +111,8 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginCreateOrUpdate(req *http if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginCreateOrUpdate(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginDelete(req *http.Request if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (v *VirtualAppliancesServerTransport) dispatchBeginDelete(req *http.Request if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -236,7 +248,8 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListPager(req *http.Reques if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -244,20 +257,22 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListPager(req *http.Reques return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualAppliancesClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualAppliancesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -266,7 +281,8 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListByResourceGroupPager(r if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -278,20 +294,22 @@ func (v *VirtualAppliancesServerTransport) dispatchNewListByResourceGroupPager(r return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VirtualAppliancesClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualAppliancesClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualappliancesites_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualappliancesites_server.go index 7ee29ef675d0..12fae84c6e8e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualappliancesites_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualappliancesites_server.go @@ -42,19 +42,24 @@ type VirtualApplianceSitesServer struct { } // NewVirtualApplianceSitesServerTransport creates a new instance of VirtualApplianceSitesServerTransport with the provided implementation. -// The returned VirtualApplianceSitesServerTransport instance is connected to an instance of armnetwork.VirtualApplianceSitesClient by way of the -// undefined.Transporter field. +// The returned VirtualApplianceSitesServerTransport instance is connected to an instance of armnetwork.VirtualApplianceSitesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualApplianceSitesServerTransport(srv *VirtualApplianceSitesServer) *VirtualApplianceSitesServerTransport { - return &VirtualApplianceSitesServerTransport{srv: srv} + return &VirtualApplianceSitesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualApplianceSitesClientListResponse]](), + } } // VirtualApplianceSitesServerTransport connects instances of armnetwork.VirtualApplianceSitesClient to instances of VirtualApplianceSitesServer. // Don't use this type directly, use NewVirtualApplianceSitesServerTransport instead. type VirtualApplianceSitesServerTransport struct { srv *VirtualApplianceSitesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualApplianceSitesClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualApplianceSitesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualApplianceSitesClientListResponse]] } // Do implements the policy.Transporter interface for VirtualApplianceSitesServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginCreateOrUpdate(req * if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginCreateOrUpdate(req * if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginDelete(req *http.Req if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualApplianceSitesServerTransport) dispatchBeginDelete(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualApplianceSitesServerTransport) dispatchNewListPager(req *http.Re if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualAppliances/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualApplianceSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualApplianceSitesServerTransport) dispatchNewListPager(req *http.Re return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, networkVirtualApplianceNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualApplianceSitesClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualApplianceSitesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceskus_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceskus_server.go index efbd18982b2c..1276cc8e8737 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceskus_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualapplianceskus_server.go @@ -34,17 +34,20 @@ type VirtualApplianceSKUsServer struct { } // NewVirtualApplianceSKUsServerTransport creates a new instance of VirtualApplianceSKUsServerTransport with the provided implementation. -// The returned VirtualApplianceSKUsServerTransport instance is connected to an instance of armnetwork.VirtualApplianceSKUsClient by way of the -// undefined.Transporter field. +// The returned VirtualApplianceSKUsServerTransport instance is connected to an instance of armnetwork.VirtualApplianceSKUsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualApplianceSKUsServerTransport(srv *VirtualApplianceSKUsServer) *VirtualApplianceSKUsServerTransport { - return &VirtualApplianceSKUsServerTransport{srv: srv} + return &VirtualApplianceSKUsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualApplianceSKUsClientListResponse]](), + } } // VirtualApplianceSKUsServerTransport connects instances of armnetwork.VirtualApplianceSKUsClient to instances of VirtualApplianceSKUsServer. // Don't use this type directly, use NewVirtualApplianceSKUsServerTransport instead. type VirtualApplianceSKUsServerTransport struct { srv *VirtualApplianceSKUsServer - newListPager *azfake.PagerResponder[armnetwork.VirtualApplianceSKUsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualApplianceSKUsClientListResponse]] } // Do implements the policy.Transporter interface for VirtualApplianceSKUsServerTransport. @@ -107,7 +110,8 @@ func (v *VirtualApplianceSKUsServerTransport) dispatchNewListPager(req *http.Req if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkVirtualApplianceSkus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -115,20 +119,22 @@ func (v *VirtualApplianceSKUsServerTransport) dispatchNewListPager(req *http.Req return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualApplianceSKUsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualApplianceSKUsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnection_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnection_server.go index 6762d7df9fdf..6727d9327036 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnection_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnection_server.go @@ -37,18 +37,22 @@ type VirtualHubBgpConnectionServer struct { } // NewVirtualHubBgpConnectionServerTransport creates a new instance of VirtualHubBgpConnectionServerTransport with the provided implementation. -// The returned VirtualHubBgpConnectionServerTransport instance is connected to an instance of armnetwork.VirtualHubBgpConnectionClient by way of the -// undefined.Transporter field. +// The returned VirtualHubBgpConnectionServerTransport instance is connected to an instance of armnetwork.VirtualHubBgpConnectionClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualHubBgpConnectionServerTransport(srv *VirtualHubBgpConnectionServer) *VirtualHubBgpConnectionServerTransport { - return &VirtualHubBgpConnectionServerTransport{srv: srv} + return &VirtualHubBgpConnectionServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientDeleteResponse]](), + } } // VirtualHubBgpConnectionServerTransport connects instances of armnetwork.VirtualHubBgpConnectionClient to instances of VirtualHubBgpConnectionServer. // Don't use this type directly, use NewVirtualHubBgpConnectionServerTransport instead. type VirtualHubBgpConnectionServerTransport struct { srv *VirtualHubBgpConnectionServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientDeleteResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionClientDeleteResponse]] } // Do implements the policy.Transporter interface for VirtualHubBgpConnectionServerTransport. @@ -84,7 +88,8 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginCreateOrUpdate(req if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -111,19 +116,21 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -133,7 +140,8 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginDelete(req *http.R if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -156,19 +164,21 @@ func (v *VirtualHubBgpConnectionServerTransport) dispatchBeginDelete(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnections_server.go index 30e5892a851b..db3af3f11b51 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualhubbgpconnections_server.go @@ -38,19 +38,24 @@ type VirtualHubBgpConnectionsServer struct { } // NewVirtualHubBgpConnectionsServerTransport creates a new instance of VirtualHubBgpConnectionsServerTransport with the provided implementation. -// The returned VirtualHubBgpConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualHubBgpConnectionsClient by way of the -// undefined.Transporter field. +// The returned VirtualHubBgpConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualHubBgpConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualHubBgpConnectionsServerTransport(srv *VirtualHubBgpConnectionsServer) *VirtualHubBgpConnectionsServerTransport { - return &VirtualHubBgpConnectionsServerTransport{srv: srv} + return &VirtualHubBgpConnectionsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualHubBgpConnectionsClientListResponse]](), + beginListAdvertisedRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]](), + beginListLearnedRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListLearnedRoutesResponse]](), + } } // VirtualHubBgpConnectionsServerTransport connects instances of armnetwork.VirtualHubBgpConnectionsClient to instances of VirtualHubBgpConnectionsServer. // Don't use this type directly, use NewVirtualHubBgpConnectionsServerTransport instead. type VirtualHubBgpConnectionsServerTransport struct { srv *VirtualHubBgpConnectionsServer - newListPager *azfake.PagerResponder[armnetwork.VirtualHubBgpConnectionsClientListResponse] - beginListAdvertisedRoutes *azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse] - beginListLearnedRoutes *azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListLearnedRoutesResponse] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualHubBgpConnectionsClientListResponse]] + beginListAdvertisedRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]] + beginListLearnedRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualHubBgpConnectionsClientListLearnedRoutesResponse]] } // Do implements the policy.Transporter interface for VirtualHubBgpConnectionsServerTransport. @@ -86,7 +91,8 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchNewListPager(req *http if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -102,20 +108,22 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchNewListPager(req *http return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualHubBgpConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubBgpConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -124,7 +132,8 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListAdvertisedRou if v.srv.BeginListAdvertisedRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListAdvertisedRoutes not implemented")} } - if v.beginListAdvertisedRoutes == nil { + beginListAdvertisedRoutes := v.beginListAdvertisedRoutes.get(req) + if beginListAdvertisedRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/advertisedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -147,19 +156,21 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListAdvertisedRou if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginListAdvertisedRoutes = &respr + beginListAdvertisedRoutes = &respr + v.beginListAdvertisedRoutes.add(req, beginListAdvertisedRoutes) } - resp, err := server.PollerResponderNext(v.beginListAdvertisedRoutes, req) + resp, err := server.PollerResponderNext(beginListAdvertisedRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginListAdvertisedRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginListAdvertisedRoutes) { - v.beginListAdvertisedRoutes = nil + if !server.PollerResponderMore(beginListAdvertisedRoutes) { + v.beginListAdvertisedRoutes.remove(req) } return resp, nil @@ -169,7 +180,8 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListLearnedRoutes if v.srv.BeginListLearnedRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListLearnedRoutes not implemented")} } - if v.beginListLearnedRoutes == nil { + beginListLearnedRoutes := v.beginListLearnedRoutes.get(req) + if beginListLearnedRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/bgpConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/learnedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -192,19 +204,21 @@ func (v *VirtualHubBgpConnectionsServerTransport) dispatchBeginListLearnedRoutes if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginListLearnedRoutes = &respr + beginListLearnedRoutes = &respr + v.beginListLearnedRoutes.add(req, beginListLearnedRoutes) } - resp, err := server.PollerResponderNext(v.beginListLearnedRoutes, req) + resp, err := server.PollerResponderNext(beginListLearnedRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginListLearnedRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginListLearnedRoutes) { - v.beginListLearnedRoutes = nil + if !server.PollerResponderMore(beginListLearnedRoutes) { + v.beginListLearnedRoutes.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualhubipconfiguration_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualhubipconfiguration_server.go index 73b1fe33884c..d00f26843d6a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualhubipconfiguration_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualhubipconfiguration_server.go @@ -42,19 +42,24 @@ type VirtualHubIPConfigurationServer struct { } // NewVirtualHubIPConfigurationServerTransport creates a new instance of VirtualHubIPConfigurationServerTransport with the provided implementation. -// The returned VirtualHubIPConfigurationServerTransport instance is connected to an instance of armnetwork.VirtualHubIPConfigurationClient by way of the -// undefined.Transporter field. +// The returned VirtualHubIPConfigurationServerTransport instance is connected to an instance of armnetwork.VirtualHubIPConfigurationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualHubIPConfigurationServerTransport(srv *VirtualHubIPConfigurationServer) *VirtualHubIPConfigurationServerTransport { - return &VirtualHubIPConfigurationServerTransport{srv: srv} + return &VirtualHubIPConfigurationServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualHubIPConfigurationClientListResponse]](), + } } // VirtualHubIPConfigurationServerTransport connects instances of armnetwork.VirtualHubIPConfigurationClient to instances of VirtualHubIPConfigurationServer. // Don't use this type directly, use NewVirtualHubIPConfigurationServerTransport instead. type VirtualHubIPConfigurationServerTransport struct { srv *VirtualHubIPConfigurationServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualHubIPConfigurationClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualHubIPConfigurationClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualHubIPConfigurationClientListResponse]] } // Do implements the policy.Transporter interface for VirtualHubIPConfigurationServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginCreateOrUpdate(r if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginCreateOrUpdate(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginDelete(req *http if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchBeginDelete(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchNewListPager(req *htt if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualHubIPConfigurationServerTransport) dispatchNewListPager(req *htt return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualHubIPConfigurationClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubIPConfigurationClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualhubroutetablev2s_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualhubroutetablev2s_server.go index aa50ef753365..77b20a25373b 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualhubroutetablev2s_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualhubroutetablev2s_server.go @@ -42,19 +42,24 @@ type VirtualHubRouteTableV2SServer struct { } // NewVirtualHubRouteTableV2SServerTransport creates a new instance of VirtualHubRouteTableV2SServerTransport with the provided implementation. -// The returned VirtualHubRouteTableV2SServerTransport instance is connected to an instance of armnetwork.VirtualHubRouteTableV2SClient by way of the -// undefined.Transporter field. +// The returned VirtualHubRouteTableV2SServerTransport instance is connected to an instance of armnetwork.VirtualHubRouteTableV2SClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualHubRouteTableV2SServerTransport(srv *VirtualHubRouteTableV2SServer) *VirtualHubRouteTableV2SServerTransport { - return &VirtualHubRouteTableV2SServerTransport{srv: srv} + return &VirtualHubRouteTableV2SServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualHubRouteTableV2SClientListResponse]](), + } } // VirtualHubRouteTableV2SServerTransport connects instances of armnetwork.VirtualHubRouteTableV2SClient to instances of VirtualHubRouteTableV2SServer. // Don't use this type directly, use NewVirtualHubRouteTableV2SServerTransport instead. type VirtualHubRouteTableV2SServerTransport struct { srv *VirtualHubRouteTableV2SServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualHubRouteTableV2SClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualHubRouteTableV2SClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualHubRouteTableV2SClientListResponse]] } // Do implements the policy.Transporter interface for VirtualHubRouteTableV2SServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginCreateOrUpdate(req if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginDelete(req *http.R if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchBeginDelete(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchNewListPager(req *http. if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/routeTables` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualHubRouteTableV2SServerTransport) dispatchNewListPager(req *http. return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualHubNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualHubRouteTableV2SClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubRouteTableV2SClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualhubs_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualhubs_server.go index 40983d2bed5c..6108fb9f5f19 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualhubs_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualhubs_server.go @@ -63,23 +63,32 @@ type VirtualHubsServer struct { } // NewVirtualHubsServerTransport creates a new instance of VirtualHubsServerTransport with the provided implementation. -// The returned VirtualHubsServerTransport instance is connected to an instance of armnetwork.VirtualHubsClient by way of the -// undefined.Transporter field. +// The returned VirtualHubsServerTransport instance is connected to an instance of armnetwork.VirtualHubsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualHubsServerTransport(srv *VirtualHubsServer) *VirtualHubsServerTransport { - return &VirtualHubsServerTransport{srv: srv} + return &VirtualHubsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualHubsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualHubsClientDeleteResponse]](), + beginGetEffectiveVirtualHubRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]](), + beginGetInboundRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetInboundRoutesResponse]](), + beginGetOutboundRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetOutboundRoutesResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualHubsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VirtualHubsClientListByResourceGroupResponse]](), + } } // VirtualHubsServerTransport connects instances of armnetwork.VirtualHubsClient to instances of VirtualHubsServer. // Don't use this type directly, use NewVirtualHubsServerTransport instead. type VirtualHubsServerTransport struct { srv *VirtualHubsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualHubsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualHubsClientDeleteResponse] - beginGetEffectiveVirtualHubRoutes *azfake.PollerResponder[armnetwork.VirtualHubsClientGetEffectiveVirtualHubRoutesResponse] - beginGetInboundRoutes *azfake.PollerResponder[armnetwork.VirtualHubsClientGetInboundRoutesResponse] - beginGetOutboundRoutes *azfake.PollerResponder[armnetwork.VirtualHubsClientGetOutboundRoutesResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualHubsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VirtualHubsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualHubsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualHubsClientDeleteResponse]] + beginGetEffectiveVirtualHubRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]] + beginGetInboundRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetInboundRoutesResponse]] + beginGetOutboundRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualHubsClientGetOutboundRoutesResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualHubsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VirtualHubsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VirtualHubsServerTransport. @@ -127,7 +136,8 @@ func (v *VirtualHubsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -150,19 +160,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -172,7 +184,8 @@ func (v *VirtualHubsServerTransport) dispatchBeginDelete(req *http.Request) (*ht if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -191,19 +204,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -246,7 +261,8 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetEffectiveVirtualHubRoutes(r if v.srv.BeginGetEffectiveVirtualHubRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetEffectiveVirtualHubRoutes not implemented")} } - if v.beginGetEffectiveVirtualHubRoutes == nil { + beginGetEffectiveVirtualHubRoutes := v.beginGetEffectiveVirtualHubRoutes.get(req) + if beginGetEffectiveVirtualHubRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/effectiveRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -275,19 +291,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetEffectiveVirtualHubRoutes(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetEffectiveVirtualHubRoutes = &respr + beginGetEffectiveVirtualHubRoutes = &respr + v.beginGetEffectiveVirtualHubRoutes.add(req, beginGetEffectiveVirtualHubRoutes) } - resp, err := server.PollerResponderNext(v.beginGetEffectiveVirtualHubRoutes, req) + resp, err := server.PollerResponderNext(beginGetEffectiveVirtualHubRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetEffectiveVirtualHubRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetEffectiveVirtualHubRoutes) { - v.beginGetEffectiveVirtualHubRoutes = nil + if !server.PollerResponderMore(beginGetEffectiveVirtualHubRoutes) { + v.beginGetEffectiveVirtualHubRoutes.remove(req) } return resp, nil @@ -297,7 +315,8 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetInboundRoutes(req *http.Req if v.srv.BeginGetInboundRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetInboundRoutes not implemented")} } - if v.beginGetInboundRoutes == nil { + beginGetInboundRoutes := v.beginGetInboundRoutes.get(req) + if beginGetInboundRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/inboundRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -320,19 +339,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetInboundRoutes(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetInboundRoutes = &respr + beginGetInboundRoutes = &respr + v.beginGetInboundRoutes.add(req, beginGetInboundRoutes) } - resp, err := server.PollerResponderNext(v.beginGetInboundRoutes, req) + resp, err := server.PollerResponderNext(beginGetInboundRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetInboundRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetInboundRoutes) { - v.beginGetInboundRoutes = nil + if !server.PollerResponderMore(beginGetInboundRoutes) { + v.beginGetInboundRoutes.remove(req) } return resp, nil @@ -342,7 +363,8 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetOutboundRoutes(req *http.Re if v.srv.BeginGetOutboundRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetOutboundRoutes not implemented")} } - if v.beginGetOutboundRoutes == nil { + beginGetOutboundRoutes := v.beginGetOutboundRoutes.get(req) + if beginGetOutboundRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/outboundRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -365,19 +387,21 @@ func (v *VirtualHubsServerTransport) dispatchBeginGetOutboundRoutes(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetOutboundRoutes = &respr + beginGetOutboundRoutes = &respr + v.beginGetOutboundRoutes.add(req, beginGetOutboundRoutes) } - resp, err := server.PollerResponderNext(v.beginGetOutboundRoutes, req) + resp, err := server.PollerResponderNext(beginGetOutboundRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetOutboundRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetOutboundRoutes) { - v.beginGetOutboundRoutes = nil + if !server.PollerResponderMore(beginGetOutboundRoutes) { + v.beginGetOutboundRoutes.remove(req) } return resp, nil @@ -387,7 +411,8 @@ func (v *VirtualHubsServerTransport) dispatchNewListPager(req *http.Request) (*h if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -395,20 +420,22 @@ func (v *VirtualHubsServerTransport) dispatchNewListPager(req *http.Request) (*h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualHubsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualHubsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -417,7 +444,8 @@ func (v *VirtualHubsServerTransport) dispatchNewListByResourceGroupPager(req *ht if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualHubs` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -429,20 +457,22 @@ func (v *VirtualHubsServerTransport) dispatchNewListByResourceGroupPager(req *ht return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VirtualHubsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualHubsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewayconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewayconnections_server.go index f57038a68de4..6b59a59ad538 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewayconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewayconnections_server.go @@ -75,26 +75,38 @@ type VirtualNetworkGatewayConnectionsServer struct { } // NewVirtualNetworkGatewayConnectionsServerTransport creates a new instance of VirtualNetworkGatewayConnectionsServerTransport with the provided implementation. -// The returned VirtualNetworkGatewayConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewayConnectionsClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworkGatewayConnectionsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewayConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworkGatewayConnectionsServerTransport(srv *VirtualNetworkGatewayConnectionsServer) *VirtualNetworkGatewayConnectionsServerTransport { - return &VirtualNetworkGatewayConnectionsServerTransport{srv: srv} + return &VirtualNetworkGatewayConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientDeleteResponse]](), + beginGetIkeSas: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientListResponse]](), + beginResetConnection: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetConnectionResponse]](), + beginResetSharedKey: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]](), + beginSetSharedKey: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]](), + beginStartPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]](), + beginStopPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]](), + } } // VirtualNetworkGatewayConnectionsServerTransport connects instances of armnetwork.VirtualNetworkGatewayConnectionsClient to instances of VirtualNetworkGatewayConnectionsServer. // Don't use this type directly, use NewVirtualNetworkGatewayConnectionsServerTransport instead. type VirtualNetworkGatewayConnectionsServerTransport struct { srv *VirtualNetworkGatewayConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientDeleteResponse] - beginGetIkeSas *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientGetIkeSasResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientListResponse] - beginResetConnection *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetConnectionResponse] - beginResetSharedKey *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse] - beginSetSharedKey *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse] - beginStartPacketCapture *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse] - beginStopPacketCapture *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientDeleteResponse]] + beginGetIkeSas *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientListResponse]] + beginResetConnection *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetConnectionResponse]] + beginResetSharedKey *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]] + beginSetSharedKey *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]] + beginStartPacketCapture *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]] + beginStopPacketCapture *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for VirtualNetworkGatewayConnectionsServerTransport. @@ -148,7 +160,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginCreateOrU if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -171,19 +184,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginCreateOrU if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -193,7 +208,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginDelete(re if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -212,19 +228,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginDelete(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -267,7 +285,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginGetIkeSas if v.srv.BeginGetIkeSas == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetIkeSas not implemented")} } - if v.beginGetIkeSas == nil { + beginGetIkeSas := v.beginGetIkeSas.get(req) + if beginGetIkeSas == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -286,19 +305,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginGetIkeSas if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetIkeSas = &respr + beginGetIkeSas = &respr + v.beginGetIkeSas.add(req, beginGetIkeSas) } - resp, err := server.PollerResponderNext(v.beginGetIkeSas, req) + resp, err := server.PollerResponderNext(beginGetIkeSas, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetIkeSas.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetIkeSas) { - v.beginGetIkeSas = nil + if !server.PollerResponderMore(beginGetIkeSas) { + v.beginGetIkeSas.remove(req) } return resp, nil @@ -341,7 +362,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchNewListPager(r if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -353,20 +375,22 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchNewListPager(r return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualNetworkGatewayConnectionsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkGatewayConnectionsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -375,7 +399,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetConn if v.srv.BeginResetConnection == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResetConnection not implemented")} } - if v.beginResetConnection == nil { + beginResetConnection := v.beginResetConnection.get(req) + if beginResetConnection == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -394,19 +419,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetConn if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginResetConnection = &respr + beginResetConnection = &respr + v.beginResetConnection.add(req, beginResetConnection) } - resp, err := server.PollerResponderNext(v.beginResetConnection, req) + resp, err := server.PollerResponderNext(beginResetConnection, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + v.beginResetConnection.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginResetConnection) { - v.beginResetConnection = nil + if !server.PollerResponderMore(beginResetConnection) { + v.beginResetConnection.remove(req) } return resp, nil @@ -416,7 +443,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetShar if v.srv.BeginResetSharedKey == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResetSharedKey not implemented")} } - if v.beginResetSharedKey == nil { + beginResetSharedKey := v.beginResetSharedKey.get(req) + if beginResetSharedKey == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -439,19 +467,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginResetShar if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginResetSharedKey = &respr + beginResetSharedKey = &respr + v.beginResetSharedKey.add(req, beginResetSharedKey) } - resp, err := server.PollerResponderNext(v.beginResetSharedKey, req) + resp, err := server.PollerResponderNext(beginResetSharedKey, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginResetSharedKey.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginResetSharedKey) { - v.beginResetSharedKey = nil + if !server.PollerResponderMore(beginResetSharedKey) { + v.beginResetSharedKey.remove(req) } return resp, nil @@ -461,7 +491,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginSetShared if v.srv.BeginSetSharedKey == nil { return nil, &nonRetriableError{errors.New("fake for method BeginSetSharedKey not implemented")} } - if v.beginSetSharedKey == nil { + beginSetSharedKey := v.beginSetSharedKey.get(req) + if beginSetSharedKey == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/sharedkey` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -484,19 +515,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginSetShared if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginSetSharedKey = &respr + beginSetSharedKey = &respr + v.beginSetSharedKey.add(req, beginSetSharedKey) } - resp, err := server.PollerResponderNext(v.beginSetSharedKey, req) + resp, err := server.PollerResponderNext(beginSetSharedKey, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginSetSharedKey.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginSetSharedKey) { - v.beginSetSharedKey = nil + if !server.PollerResponderMore(beginSetSharedKey) { + v.beginSetSharedKey.remove(req) } return resp, nil @@ -506,7 +539,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStartPack if v.srv.BeginStartPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStartPacketCapture not implemented")} } - if v.beginStartPacketCapture == nil { + beginStartPacketCapture := v.beginStartPacketCapture.get(req) + if beginStartPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -535,19 +569,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStartPack if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStartPacketCapture = &respr + beginStartPacketCapture = &respr + v.beginStartPacketCapture.add(req, beginStartPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStartPacketCapture, req) + resp, err := server.PollerResponderNext(beginStartPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStartPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStartPacketCapture) { - v.beginStartPacketCapture = nil + if !server.PollerResponderMore(beginStartPacketCapture) { + v.beginStartPacketCapture.remove(req) } return resp, nil @@ -557,7 +593,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStopPacke if v.srv.BeginStopPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStopPacketCapture not implemented")} } - if v.beginStopPacketCapture == nil { + beginStopPacketCapture := v.beginStopPacketCapture.get(req) + if beginStopPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -580,19 +617,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginStopPacke if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStopPacketCapture = &respr + beginStopPacketCapture = &respr + v.beginStopPacketCapture.add(req, beginStopPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStopPacketCapture, req) + resp, err := server.PollerResponderNext(beginStopPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStopPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStopPacketCapture) { - v.beginStopPacketCapture = nil + if !server.PollerResponderMore(beginStopPacketCapture) { + v.beginStopPacketCapture.remove(req) } return resp, nil @@ -602,7 +641,8 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginUpdateTag if v.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if v.beginUpdateTags == nil { + beginUpdateTags := v.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/connections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -625,19 +665,21 @@ func (v *VirtualNetworkGatewayConnectionsServerTransport) dispatchBeginUpdateTag if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginUpdateTags = &respr + beginUpdateTags = &respr + v.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(v.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginUpdateTags) { - v.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + v.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewaynatrules_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewaynatrules_server.go index f0c496e3ae23..e2cfd9f166a0 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewaynatrules_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgatewaynatrules_server.go @@ -42,19 +42,24 @@ type VirtualNetworkGatewayNatRulesServer struct { } // NewVirtualNetworkGatewayNatRulesServerTransport creates a new instance of VirtualNetworkGatewayNatRulesServerTransport with the provided implementation. -// The returned VirtualNetworkGatewayNatRulesServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewayNatRulesClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworkGatewayNatRulesServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewayNatRulesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworkGatewayNatRulesServerTransport(srv *VirtualNetworkGatewayNatRulesServer) *VirtualNetworkGatewayNatRulesServerTransport { - return &VirtualNetworkGatewayNatRulesServerTransport{srv: srv} + return &VirtualNetworkGatewayNatRulesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientDeleteResponse]](), + newListByVirtualNetworkGatewayPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]](), + } } // VirtualNetworkGatewayNatRulesServerTransport connects instances of armnetwork.VirtualNetworkGatewayNatRulesClient to instances of VirtualNetworkGatewayNatRulesServer. // Don't use this type directly, use NewVirtualNetworkGatewayNatRulesServerTransport instead. type VirtualNetworkGatewayNatRulesServerTransport struct { srv *VirtualNetworkGatewayNatRulesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientDeleteResponse] - newListByVirtualNetworkGatewayPager *azfake.PagerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientDeleteResponse]] + newListByVirtualNetworkGatewayPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]] } // Do implements the policy.Transporter interface for VirtualNetworkGatewayNatRulesServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginCreateOrUpda if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginCreateOrUpda if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginDelete(req * if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchBeginDelete(req * if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchNewListByVirtualN if v.srv.NewListByVirtualNetworkGatewayPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVirtualNetworkGatewayPager not implemented")} } - if v.newListByVirtualNetworkGatewayPager == nil { + newListByVirtualNetworkGatewayPager := v.newListByVirtualNetworkGatewayPager.get(req) + if newListByVirtualNetworkGatewayPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/natRules` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualNetworkGatewayNatRulesServerTransport) dispatchNewListByVirtualN return nil, err } resp := v.srv.NewListByVirtualNetworkGatewayPager(resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) - v.newListByVirtualNetworkGatewayPager = &resp - server.PagerResponderInjectNextLinks(v.newListByVirtualNetworkGatewayPager, req, func(page *armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, createLink func() string) { + newListByVirtualNetworkGatewayPager = &resp + v.newListByVirtualNetworkGatewayPager.add(req, newListByVirtualNetworkGatewayPager) + server.PagerResponderInjectNextLinks(newListByVirtualNetworkGatewayPager, req, func(page *armnetwork.VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByVirtualNetworkGatewayPager, req) + resp, err := server.PagerResponderNext(newListByVirtualNetworkGatewayPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByVirtualNetworkGatewayPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByVirtualNetworkGatewayPager) { - v.newListByVirtualNetworkGatewayPager = nil + if !server.PagerResponderMore(newListByVirtualNetworkGatewayPager) { + v.newListByVirtualNetworkGatewayPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgateways_server.go index d83bb4202fcb..29c8aef9219e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkgateways_server.go @@ -115,35 +115,56 @@ type VirtualNetworkGatewaysServer struct { } // NewVirtualNetworkGatewaysServerTransport creates a new instance of VirtualNetworkGatewaysServerTransport with the provided implementation. -// The returned VirtualNetworkGatewaysServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewaysClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworkGatewaysServerTransport instance is connected to an instance of armnetwork.VirtualNetworkGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworkGatewaysServerTransport(srv *VirtualNetworkGatewaysServer) *VirtualNetworkGatewaysServerTransport { - return &VirtualNetworkGatewaysServerTransport{srv: srv} + return &VirtualNetworkGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDeleteResponse]](), + beginDisconnectVirtualNetworkGatewayVPNConnections: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]](), + beginGenerateVPNProfile: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGenerateVPNProfileResponse]](), + beginGeneratevpnclientpackage: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]](), + beginGetAdvertisedRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]](), + beginGetBgpPeerStatus: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]](), + beginGetLearnedRoutes: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetLearnedRoutesResponse]](), + beginGetVPNProfilePackageURL: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]](), + beginGetVpnclientConnectionHealth: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]](), + beginGetVpnclientIPSecParameters: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListResponse]](), + newListConnectionsPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse]](), + beginReset: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetResponse]](), + beginResetVPNClientSharedKey: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]](), + beginSetVpnclientIPSecParameters: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]](), + beginStartPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStartPacketCaptureResponse]](), + beginStopPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStopPacketCaptureResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientUpdateTagsResponse]](), + } } // VirtualNetworkGatewaysServerTransport connects instances of armnetwork.VirtualNetworkGatewaysClient to instances of VirtualNetworkGatewaysServer. // Don't use this type directly, use NewVirtualNetworkGatewaysServerTransport instead. type VirtualNetworkGatewaysServerTransport struct { srv *VirtualNetworkGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDeleteResponse] - beginDisconnectVirtualNetworkGatewayVPNConnections *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse] - beginGenerateVPNProfile *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGenerateVPNProfileResponse] - beginGeneratevpnclientpackage *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse] - beginGetAdvertisedRoutes *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse] - beginGetBgpPeerStatus *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetBgpPeerStatusResponse] - beginGetLearnedRoutes *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetLearnedRoutesResponse] - beginGetVPNProfilePackageURL *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse] - beginGetVpnclientConnectionHealth *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse] - beginGetVpnclientIPSecParameters *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListResponse] - newListConnectionsPager *azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse] - beginReset *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetResponse] - beginResetVPNClientSharedKey *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse] - beginSetVpnclientIPSecParameters *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse] - beginStartPacketCapture *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStartPacketCaptureResponse] - beginStopPacketCapture *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStopPacketCaptureResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDeleteResponse]] + beginDisconnectVirtualNetworkGatewayVPNConnections *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]] + beginGenerateVPNProfile *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGenerateVPNProfileResponse]] + beginGeneratevpnclientpackage *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]] + beginGetAdvertisedRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]] + beginGetBgpPeerStatus *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]] + beginGetLearnedRoutes *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetLearnedRoutesResponse]] + beginGetVPNProfilePackageURL *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]] + beginGetVpnclientConnectionHealth *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]] + beginGetVpnclientIPSecParameters *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListResponse]] + newListConnectionsPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse]] + beginReset *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetResponse]] + beginResetVPNClientSharedKey *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]] + beginSetVpnclientIPSecParameters *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]] + beginStartPacketCapture *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStartPacketCaptureResponse]] + beginStopPacketCapture *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientStopPacketCaptureResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkGatewaysClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for VirtualNetworkGatewaysServerTransport. @@ -217,7 +238,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -240,19 +262,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -262,7 +286,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Re if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -281,19 +306,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDelete(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -303,7 +330,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDisconnectVirtualNe if v.srv.BeginDisconnectVirtualNetworkGatewayVPNConnections == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDisconnectVirtualNetworkGatewayVPNConnections not implemented")} } - if v.beginDisconnectVirtualNetworkGatewayVPNConnections == nil { + beginDisconnectVirtualNetworkGatewayVPNConnections := v.beginDisconnectVirtualNetworkGatewayVPNConnections.get(req) + if beginDisconnectVirtualNetworkGatewayVPNConnections == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/disconnectVirtualNetworkGatewayVpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -326,19 +354,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginDisconnectVirtualNe if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDisconnectVirtualNetworkGatewayVPNConnections = &respr + beginDisconnectVirtualNetworkGatewayVPNConnections = &respr + v.beginDisconnectVirtualNetworkGatewayVPNConnections.add(req, beginDisconnectVirtualNetworkGatewayVPNConnections) } - resp, err := server.PollerResponderNext(v.beginDisconnectVirtualNetworkGatewayVPNConnections, req) + resp, err := server.PollerResponderNext(beginDisconnectVirtualNetworkGatewayVPNConnections, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginDisconnectVirtualNetworkGatewayVPNConnections.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDisconnectVirtualNetworkGatewayVPNConnections) { - v.beginDisconnectVirtualNetworkGatewayVPNConnections = nil + if !server.PollerResponderMore(beginDisconnectVirtualNetworkGatewayVPNConnections) { + v.beginDisconnectVirtualNetworkGatewayVPNConnections.remove(req) } return resp, nil @@ -348,7 +378,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGenerateVPNProfile( if v.srv.BeginGenerateVPNProfile == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGenerateVPNProfile not implemented")} } - if v.beginGenerateVPNProfile == nil { + beginGenerateVPNProfile := v.beginGenerateVPNProfile.get(req) + if beginGenerateVPNProfile == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnprofile` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -371,19 +402,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGenerateVPNProfile( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGenerateVPNProfile = &respr + beginGenerateVPNProfile = &respr + v.beginGenerateVPNProfile.add(req, beginGenerateVPNProfile) } - resp, err := server.PollerResponderNext(v.beginGenerateVPNProfile, req) + resp, err := server.PollerResponderNext(beginGenerateVPNProfile, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGenerateVPNProfile.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGenerateVPNProfile) { - v.beginGenerateVPNProfile = nil + if !server.PollerResponderMore(beginGenerateVPNProfile) { + v.beginGenerateVPNProfile.remove(req) } return resp, nil @@ -393,7 +426,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGeneratevpnclientpa if v.srv.BeginGeneratevpnclientpackage == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGeneratevpnclientpackage not implemented")} } - if v.beginGeneratevpnclientpackage == nil { + beginGeneratevpnclientpackage := v.beginGeneratevpnclientpackage.get(req) + if beginGeneratevpnclientpackage == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/generatevpnclientpackage` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -416,19 +450,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGeneratevpnclientpa if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGeneratevpnclientpackage = &respr + beginGeneratevpnclientpackage = &respr + v.beginGeneratevpnclientpackage.add(req, beginGeneratevpnclientpackage) } - resp, err := server.PollerResponderNext(v.beginGeneratevpnclientpackage, req) + resp, err := server.PollerResponderNext(beginGeneratevpnclientpackage, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGeneratevpnclientpackage.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGeneratevpnclientpackage) { - v.beginGeneratevpnclientpackage = nil + if !server.PollerResponderMore(beginGeneratevpnclientpackage) { + v.beginGeneratevpnclientpackage.remove(req) } return resp, nil @@ -471,7 +507,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetAdvertisedRoutes if v.srv.BeginGetAdvertisedRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetAdvertisedRoutes not implemented")} } - if v.beginGetAdvertisedRoutes == nil { + beginGetAdvertisedRoutes := v.beginGetAdvertisedRoutes.get(req) + if beginGetAdvertisedRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getAdvertisedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -495,19 +532,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetAdvertisedRoutes if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetAdvertisedRoutes = &respr + beginGetAdvertisedRoutes = &respr + v.beginGetAdvertisedRoutes.add(req, beginGetAdvertisedRoutes) } - resp, err := server.PollerResponderNext(v.beginGetAdvertisedRoutes, req) + resp, err := server.PollerResponderNext(beginGetAdvertisedRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetAdvertisedRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetAdvertisedRoutes) { - v.beginGetAdvertisedRoutes = nil + if !server.PollerResponderMore(beginGetAdvertisedRoutes) { + v.beginGetAdvertisedRoutes.remove(req) } return resp, nil @@ -517,7 +556,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetBgpPeerStatus(re if v.srv.BeginGetBgpPeerStatus == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetBgpPeerStatus not implemented")} } - if v.beginGetBgpPeerStatus == nil { + beginGetBgpPeerStatus := v.beginGetBgpPeerStatus.get(req) + if beginGetBgpPeerStatus == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getBgpPeerStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -548,19 +588,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetBgpPeerStatus(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetBgpPeerStatus = &respr + beginGetBgpPeerStatus = &respr + v.beginGetBgpPeerStatus.add(req, beginGetBgpPeerStatus) } - resp, err := server.PollerResponderNext(v.beginGetBgpPeerStatus, req) + resp, err := server.PollerResponderNext(beginGetBgpPeerStatus, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetBgpPeerStatus.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetBgpPeerStatus) { - v.beginGetBgpPeerStatus = nil + if !server.PollerResponderMore(beginGetBgpPeerStatus) { + v.beginGetBgpPeerStatus.remove(req) } return resp, nil @@ -570,7 +612,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetLearnedRoutes(re if v.srv.BeginGetLearnedRoutes == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetLearnedRoutes not implemented")} } - if v.beginGetLearnedRoutes == nil { + beginGetLearnedRoutes := v.beginGetLearnedRoutes.get(req) + if beginGetLearnedRoutes == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getLearnedRoutes` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -589,19 +632,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetLearnedRoutes(re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetLearnedRoutes = &respr + beginGetLearnedRoutes = &respr + v.beginGetLearnedRoutes.add(req, beginGetLearnedRoutes) } - resp, err := server.PollerResponderNext(v.beginGetLearnedRoutes, req) + resp, err := server.PollerResponderNext(beginGetLearnedRoutes, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetLearnedRoutes.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetLearnedRoutes) { - v.beginGetLearnedRoutes = nil + if !server.PollerResponderMore(beginGetLearnedRoutes) { + v.beginGetLearnedRoutes.remove(req) } return resp, nil @@ -611,7 +656,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVPNProfilePackag if v.srv.BeginGetVPNProfilePackageURL == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetVPNProfilePackageURL not implemented")} } - if v.beginGetVPNProfilePackageURL == nil { + beginGetVPNProfilePackageURL := v.beginGetVPNProfilePackageURL.get(req) + if beginGetVPNProfilePackageURL == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnprofilepackageurl` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -630,19 +676,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVPNProfilePackag if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetVPNProfilePackageURL = &respr + beginGetVPNProfilePackageURL = &respr + v.beginGetVPNProfilePackageURL.add(req, beginGetVPNProfilePackageURL) } - resp, err := server.PollerResponderNext(v.beginGetVPNProfilePackageURL, req) + resp, err := server.PollerResponderNext(beginGetVPNProfilePackageURL, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetVPNProfilePackageURL.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetVPNProfilePackageURL) { - v.beginGetVPNProfilePackageURL = nil + if !server.PollerResponderMore(beginGetVPNProfilePackageURL) { + v.beginGetVPNProfilePackageURL.remove(req) } return resp, nil @@ -652,7 +700,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientConnect if v.srv.BeginGetVpnclientConnectionHealth == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetVpnclientConnectionHealth not implemented")} } - if v.beginGetVpnclientConnectionHealth == nil { + beginGetVpnclientConnectionHealth := v.beginGetVpnclientConnectionHealth.get(req) + if beginGetVpnclientConnectionHealth == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getVpnClientConnectionHealth` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -671,19 +720,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientConnect if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetVpnclientConnectionHealth = &respr + beginGetVpnclientConnectionHealth = &respr + v.beginGetVpnclientConnectionHealth.add(req, beginGetVpnclientConnectionHealth) } - resp, err := server.PollerResponderNext(v.beginGetVpnclientConnectionHealth, req) + resp, err := server.PollerResponderNext(beginGetVpnclientConnectionHealth, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetVpnclientConnectionHealth.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetVpnclientConnectionHealth) { - v.beginGetVpnclientConnectionHealth = nil + if !server.PollerResponderMore(beginGetVpnclientConnectionHealth) { + v.beginGetVpnclientConnectionHealth.remove(req) } return resp, nil @@ -693,7 +744,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientIPSecPa if v.srv.BeginGetVpnclientIPSecParameters == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetVpnclientIPSecParameters not implemented")} } - if v.beginGetVpnclientIPSecParameters == nil { + beginGetVpnclientIPSecParameters := v.beginGetVpnclientIPSecParameters.get(req) + if beginGetVpnclientIPSecParameters == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getvpnclientipsecparameters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -712,19 +764,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginGetVpnclientIPSecPa if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetVpnclientIPSecParameters = &respr + beginGetVpnclientIPSecParameters = &respr + v.beginGetVpnclientIPSecParameters.add(req, beginGetVpnclientIPSecParameters) } - resp, err := server.PollerResponderNext(v.beginGetVpnclientIPSecParameters, req) + resp, err := server.PollerResponderNext(beginGetVpnclientIPSecParameters, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.beginGetVpnclientIPSecParameters.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetVpnclientIPSecParameters) { - v.beginGetVpnclientIPSecParameters = nil + if !server.PollerResponderMore(beginGetVpnclientIPSecParameters) { + v.beginGetVpnclientIPSecParameters.remove(req) } return resp, nil @@ -734,7 +788,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListPager(req *http.R if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -746,20 +801,22 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListPager(req *http.R return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -768,7 +825,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListConnectionsPager( if v.srv.NewListConnectionsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListConnectionsPager not implemented")} } - if v.newListConnectionsPager == nil { + newListConnectionsPager := v.newListConnectionsPager.get(req) + if newListConnectionsPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -784,20 +842,22 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchNewListConnectionsPager( return nil, err } resp := v.srv.NewListConnectionsPager(resourceGroupNameUnescaped, virtualNetworkGatewayNameUnescaped, nil) - v.newListConnectionsPager = &resp - server.PagerResponderInjectNextLinks(v.newListConnectionsPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse, createLink func() string) { + newListConnectionsPager = &resp + v.newListConnectionsPager.add(req, newListConnectionsPager) + server.PagerResponderInjectNextLinks(newListConnectionsPager, req, func(page *armnetwork.VirtualNetworkGatewaysClientListConnectionsResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListConnectionsPager, req) + resp, err := server.PagerResponderNext(newListConnectionsPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListConnectionsPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListConnectionsPager) { - v.newListConnectionsPager = nil + if !server.PagerResponderMore(newListConnectionsPager) { + v.newListConnectionsPager.remove(req) } return resp, nil } @@ -806,7 +866,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginReset(req *http.Req if v.srv.BeginReset == nil { return nil, &nonRetriableError{errors.New("fake for method BeginReset not implemented")} } - if v.beginReset == nil { + beginReset := v.beginReset.get(req) + if beginReset == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -837,19 +898,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginReset(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginReset = &respr + beginReset = &respr + v.beginReset.add(req, beginReset) } - resp, err := server.PollerResponderNext(v.beginReset, req) + resp, err := server.PollerResponderNext(beginReset, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginReset.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginReset) { - v.beginReset = nil + if !server.PollerResponderMore(beginReset) { + v.beginReset.remove(req) } return resp, nil @@ -859,7 +922,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginResetVPNClientShare if v.srv.BeginResetVPNClientSharedKey == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResetVPNClientSharedKey not implemented")} } - if v.beginResetVPNClientSharedKey == nil { + beginResetVPNClientSharedKey := v.beginResetVPNClientSharedKey.get(req) + if beginResetVPNClientSharedKey == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetvpnclientsharedkey` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -878,19 +942,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginResetVPNClientShare if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginResetVPNClientSharedKey = &respr + beginResetVPNClientSharedKey = &respr + v.beginResetVPNClientSharedKey.add(req, beginResetVPNClientSharedKey) } - resp, err := server.PollerResponderNext(v.beginResetVPNClientSharedKey, req) + resp, err := server.PollerResponderNext(beginResetVPNClientSharedKey, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginResetVPNClientSharedKey.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginResetVPNClientSharedKey) { - v.beginResetVPNClientSharedKey = nil + if !server.PollerResponderMore(beginResetVPNClientSharedKey) { + v.beginResetVPNClientSharedKey.remove(req) } return resp, nil @@ -900,7 +966,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginSetVpnclientIPSecPa if v.srv.BeginSetVpnclientIPSecParameters == nil { return nil, &nonRetriableError{errors.New("fake for method BeginSetVpnclientIPSecParameters not implemented")} } - if v.beginSetVpnclientIPSecParameters == nil { + beginSetVpnclientIPSecParameters := v.beginSetVpnclientIPSecParameters.get(req) + if beginSetVpnclientIPSecParameters == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/setvpnclientipsecparameters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -923,19 +990,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginSetVpnclientIPSecPa if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginSetVpnclientIPSecParameters = &respr + beginSetVpnclientIPSecParameters = &respr + v.beginSetVpnclientIPSecParameters.add(req, beginSetVpnclientIPSecParameters) } - resp, err := server.PollerResponderNext(v.beginSetVpnclientIPSecParameters, req) + resp, err := server.PollerResponderNext(beginSetVpnclientIPSecParameters, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginSetVpnclientIPSecParameters.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginSetVpnclientIPSecParameters) { - v.beginSetVpnclientIPSecParameters = nil + if !server.PollerResponderMore(beginSetVpnclientIPSecParameters) { + v.beginSetVpnclientIPSecParameters.remove(req) } return resp, nil @@ -945,7 +1014,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStartPacketCapture( if v.srv.BeginStartPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStartPacketCapture not implemented")} } - if v.beginStartPacketCapture == nil { + beginStartPacketCapture := v.beginStartPacketCapture.get(req) + if beginStartPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -974,19 +1044,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStartPacketCapture( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStartPacketCapture = &respr + beginStartPacketCapture = &respr + v.beginStartPacketCapture.add(req, beginStartPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStartPacketCapture, req) + resp, err := server.PollerResponderNext(beginStartPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStartPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStartPacketCapture) { - v.beginStartPacketCapture = nil + if !server.PollerResponderMore(beginStartPacketCapture) { + v.beginStartPacketCapture.remove(req) } return resp, nil @@ -996,7 +1068,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStopPacketCapture(r if v.srv.BeginStopPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStopPacketCapture not implemented")} } - if v.beginStopPacketCapture == nil { + beginStopPacketCapture := v.beginStopPacketCapture.get(req) + if beginStopPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stopPacketCapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1019,19 +1092,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginStopPacketCapture(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStopPacketCapture = &respr + beginStopPacketCapture = &respr + v.beginStopPacketCapture.add(req, beginStopPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStopPacketCapture, req) + resp, err := server.PollerResponderNext(beginStopPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStopPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStopPacketCapture) { - v.beginStopPacketCapture = nil + if !server.PollerResponderMore(beginStopPacketCapture) { + v.beginStopPacketCapture.remove(req) } return resp, nil @@ -1074,7 +1149,8 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginUpdateTags(req *htt if v.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if v.beginUpdateTags == nil { + beginUpdateTags := v.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -1097,19 +1173,21 @@ func (v *VirtualNetworkGatewaysServerTransport) dispatchBeginUpdateTags(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginUpdateTags = &respr + beginUpdateTags = &respr + v.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(v.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginUpdateTags) { - v.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + v.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkpeerings_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkpeerings_server.go index 37dcfd36fc73..37131899e70a 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkpeerings_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworkpeerings_server.go @@ -42,19 +42,24 @@ type VirtualNetworkPeeringsServer struct { } // NewVirtualNetworkPeeringsServerTransport creates a new instance of VirtualNetworkPeeringsServerTransport with the provided implementation. -// The returned VirtualNetworkPeeringsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkPeeringsClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworkPeeringsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkPeeringsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworkPeeringsServerTransport(srv *VirtualNetworkPeeringsServer) *VirtualNetworkPeeringsServerTransport { - return &VirtualNetworkPeeringsServerTransport{srv: srv} + return &VirtualNetworkPeeringsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkPeeringsClientListResponse]](), + } } // VirtualNetworkPeeringsServerTransport connects instances of armnetwork.VirtualNetworkPeeringsClient to instances of VirtualNetworkPeeringsServer. // Don't use this type directly, use NewVirtualNetworkPeeringsServerTransport instead. type VirtualNetworkPeeringsServerTransport struct { srv *VirtualNetworkPeeringsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualNetworkPeeringsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkPeeringsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkPeeringsClientListResponse]] } // Do implements the policy.Transporter interface for VirtualNetworkPeeringsServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginCreateOrUpdate(req if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,19 +137,21 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -153,7 +161,8 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginDelete(req *http.Re if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -176,19 +185,21 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchBeginDelete(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -235,7 +246,8 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchNewListPager(req *http.R if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/virtualNetworkPeerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -251,20 +263,22 @@ func (v *VirtualNetworkPeeringsServerTransport) dispatchNewListPager(req *http.R return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualNetworkPeeringsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworkPeeringsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworks_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworks_server.go index accaa21f8d90..648821762484 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworks_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworks_server.go @@ -63,22 +63,30 @@ type VirtualNetworksServer struct { } // NewVirtualNetworksServerTransport creates a new instance of VirtualNetworksServerTransport with the provided implementation. -// The returned VirtualNetworksServerTransport instance is connected to an instance of armnetwork.VirtualNetworksClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworksServerTransport instance is connected to an instance of armnetwork.VirtualNetworksClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworksServerTransport(srv *VirtualNetworksServer) *VirtualNetworksServerTransport { - return &VirtualNetworksServerTransport{srv: srv} + return &VirtualNetworksServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworksClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworksClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListAllResponse]](), + beginListDdosProtectionStatus: newTracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.VirtualNetworksClientListDdosProtectionStatusResponse]]](), + newListUsagePager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListUsageResponse]](), + } } // VirtualNetworksServerTransport connects instances of armnetwork.VirtualNetworksClient to instances of VirtualNetworksServer. // Don't use this type directly, use NewVirtualNetworksServerTransport instead. type VirtualNetworksServerTransport struct { srv *VirtualNetworksServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworksClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworksClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualNetworksClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.VirtualNetworksClientListAllResponse] - beginListDdosProtectionStatus *azfake.PollerResponder[azfake.PagerResponder[armnetwork.VirtualNetworksClientListDdosProtectionStatusResponse]] - newListUsagePager *azfake.PagerResponder[armnetwork.VirtualNetworksClientListUsageResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworksClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworksClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListAllResponse]] + beginListDdosProtectionStatus *tracker[azfake.PollerResponder[azfake.PagerResponder[armnetwork.VirtualNetworksClientListDdosProtectionStatusResponse]]] + newListUsagePager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworksClientListUsageResponse]] } // Do implements the policy.Transporter interface for VirtualNetworksServerTransport. @@ -164,7 +172,8 @@ func (v *VirtualNetworksServerTransport) dispatchBeginCreateOrUpdate(req *http.R if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -187,19 +196,21 @@ func (v *VirtualNetworksServerTransport) dispatchBeginCreateOrUpdate(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -209,7 +220,8 @@ func (v *VirtualNetworksServerTransport) dispatchBeginDelete(req *http.Request) if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -228,19 +240,21 @@ func (v *VirtualNetworksServerTransport) dispatchBeginDelete(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -295,7 +309,8 @@ func (v *VirtualNetworksServerTransport) dispatchNewListPager(req *http.Request) if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -307,20 +322,22 @@ func (v *VirtualNetworksServerTransport) dispatchNewListPager(req *http.Request) return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualNetworksClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualNetworksClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -329,7 +346,8 @@ func (v *VirtualNetworksServerTransport) dispatchNewListAllPager(req *http.Reque if v.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if v.newListAllPager == nil { + newListAllPager := v.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -337,20 +355,22 @@ func (v *VirtualNetworksServerTransport) dispatchNewListAllPager(req *http.Reque return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListAllPager(nil) - v.newListAllPager = &resp - server.PagerResponderInjectNextLinks(v.newListAllPager, req, func(page *armnetwork.VirtualNetworksClientListAllResponse, createLink func() string) { + newListAllPager = &resp + v.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.VirtualNetworksClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListAllPager) { - v.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + v.newListAllPager.remove(req) } return resp, nil } @@ -359,7 +379,8 @@ func (v *VirtualNetworksServerTransport) dispatchBeginListDdosProtectionStatus(r if v.srv.BeginListDdosProtectionStatus == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListDdosProtectionStatus not implemented")} } - if v.beginListDdosProtectionStatus == nil { + beginListDdosProtectionStatus := v.beginListDdosProtectionStatus.get(req) + if beginListDdosProtectionStatus == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ddosProtectionStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -405,19 +426,21 @@ func (v *VirtualNetworksServerTransport) dispatchBeginListDdosProtectionStatus(r if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginListDdosProtectionStatus = &respr + beginListDdosProtectionStatus = &respr + v.beginListDdosProtectionStatus.add(req, beginListDdosProtectionStatus) } - resp, err := server.PollerResponderNext(v.beginListDdosProtectionStatus, req) + resp, err := server.PollerResponderNext(beginListDdosProtectionStatus, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginListDdosProtectionStatus.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginListDdosProtectionStatus) { - v.beginListDdosProtectionStatus = nil + if !server.PollerResponderMore(beginListDdosProtectionStatus) { + v.beginListDdosProtectionStatus.remove(req) } return resp, nil @@ -427,7 +450,8 @@ func (v *VirtualNetworksServerTransport) dispatchNewListUsagePager(req *http.Req if v.srv.NewListUsagePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListUsagePager not implemented")} } - if v.newListUsagePager == nil { + newListUsagePager := v.newListUsagePager.get(req) + if newListUsagePager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworks/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/usages` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -443,20 +467,22 @@ func (v *VirtualNetworksServerTransport) dispatchNewListUsagePager(req *http.Req return nil, err } resp := v.srv.NewListUsagePager(resourceGroupNameUnescaped, virtualNetworkNameUnescaped, nil) - v.newListUsagePager = &resp - server.PagerResponderInjectNextLinks(v.newListUsagePager, req, func(page *armnetwork.VirtualNetworksClientListUsageResponse, createLink func() string) { + newListUsagePager = &resp + v.newListUsagePager.add(req, newListUsagePager) + server.PagerResponderInjectNextLinks(newListUsagePager, req, func(page *armnetwork.VirtualNetworksClientListUsageResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListUsagePager, req) + resp, err := server.PagerResponderNext(newListUsagePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListUsagePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListUsagePager) { - v.newListUsagePager = nil + if !server.PagerResponderMore(newListUsagePager) { + v.newListUsagePager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworktaps_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworktaps_server.go index 7381ba1ebe08..77c732932623 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualnetworktaps_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualnetworktaps_server.go @@ -50,20 +50,26 @@ type VirtualNetworkTapsServer struct { } // NewVirtualNetworkTapsServerTransport creates a new instance of VirtualNetworkTapsServerTransport with the provided implementation. -// The returned VirtualNetworkTapsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkTapsClient by way of the -// undefined.Transporter field. +// The returned VirtualNetworkTapsServerTransport instance is connected to an instance of armnetwork.VirtualNetworkTapsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualNetworkTapsServerTransport(srv *VirtualNetworkTapsServer) *VirtualNetworkTapsServerTransport { - return &VirtualNetworkTapsServerTransport{srv: srv} + return &VirtualNetworkTapsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientDeleteResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListAllResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse]](), + } } // VirtualNetworkTapsServerTransport connects instances of armnetwork.VirtualNetworkTapsClient to instances of VirtualNetworkTapsServer. // Don't use this type directly, use NewVirtualNetworkTapsServerTransport instead. type VirtualNetworkTapsServerTransport struct { srv *VirtualNetworkTapsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientDeleteResponse] - newListAllPager *azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListAllResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualNetworkTapsClientDeleteResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListAllResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VirtualNetworkTapsServerTransport. @@ -105,7 +111,8 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginCreateOrUpdate(req *htt if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginCreateOrUpdate(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginDelete(req *http.Reques if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (v *VirtualNetworkTapsServerTransport) dispatchBeginDelete(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListAllPager(req *http.Re if v.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if v.newListAllPager == nil { + newListAllPager := v.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListAllPager(req *http.Re return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListAllPager(nil) - v.newListAllPager = &resp - server.PagerResponderInjectNextLinks(v.newListAllPager, req, func(page *armnetwork.VirtualNetworkTapsClientListAllResponse, createLink func() string) { + newListAllPager = &resp + v.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.VirtualNetworkTapsClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListAllPager) { - v.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + v.newListAllPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListByResourceGroupPager( if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualNetworkTaps` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (v *VirtualNetworkTapsServerTransport) dispatchNewListByResourceGroupPager( return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualNetworkTapsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualrouterpeerings_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualrouterpeerings_server.go index b628cb6f3a7d..871fd9137731 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualrouterpeerings_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualrouterpeerings_server.go @@ -42,19 +42,24 @@ type VirtualRouterPeeringsServer struct { } // NewVirtualRouterPeeringsServerTransport creates a new instance of VirtualRouterPeeringsServerTransport with the provided implementation. -// The returned VirtualRouterPeeringsServerTransport instance is connected to an instance of armnetwork.VirtualRouterPeeringsClient by way of the -// undefined.Transporter field. +// The returned VirtualRouterPeeringsServerTransport instance is connected to an instance of armnetwork.VirtualRouterPeeringsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualRouterPeeringsServerTransport(srv *VirtualRouterPeeringsServer) *VirtualRouterPeeringsServerTransport { - return &VirtualRouterPeeringsServerTransport{srv: srv} + return &VirtualRouterPeeringsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualRouterPeeringsClientListResponse]](), + } } // VirtualRouterPeeringsServerTransport connects instances of armnetwork.VirtualRouterPeeringsClient to instances of VirtualRouterPeeringsServer. // Don't use this type directly, use NewVirtualRouterPeeringsServerTransport instead. type VirtualRouterPeeringsServerTransport struct { srv *VirtualRouterPeeringsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualRouterPeeringsClientListResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualRouterPeeringsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualRouterPeeringsClientListResponse]] } // Do implements the policy.Transporter interface for VirtualRouterPeeringsServerTransport. @@ -92,7 +97,8 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginCreateOrUpdate(req * if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -119,19 +125,21 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginCreateOrUpdate(req * if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -141,7 +149,8 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginDelete(req *http.Req if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -164,19 +173,21 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchBeginDelete(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -223,7 +234,8 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchNewListPager(req *http.Re if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/peerings` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -239,20 +251,22 @@ func (v *VirtualRouterPeeringsServerTransport) dispatchNewListPager(req *http.Re return nil, err } resp := v.srv.NewListPager(resourceGroupNameUnescaped, virtualRouterNameUnescaped, nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualRouterPeeringsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualRouterPeeringsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualrouters_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualrouters_server.go index b6daf691a24b..f99c72c7c122 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualrouters_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualrouters_server.go @@ -46,20 +46,26 @@ type VirtualRoutersServer struct { } // NewVirtualRoutersServerTransport creates a new instance of VirtualRoutersServerTransport with the provided implementation. -// The returned VirtualRoutersServerTransport instance is connected to an instance of armnetwork.VirtualRoutersClient by way of the -// undefined.Transporter field. +// The returned VirtualRoutersServerTransport instance is connected to an instance of armnetwork.VirtualRoutersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualRoutersServerTransport(srv *VirtualRoutersServer) *VirtualRoutersServerTransport { - return &VirtualRoutersServerTransport{srv: srv} + return &VirtualRoutersServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualRoutersClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualRoutersClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualRoutersClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VirtualRoutersClientListByResourceGroupResponse]](), + } } // VirtualRoutersServerTransport connects instances of armnetwork.VirtualRoutersClient to instances of VirtualRoutersServer. // Don't use this type directly, use NewVirtualRoutersServerTransport instead. type VirtualRoutersServerTransport struct { srv *VirtualRoutersServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualRoutersClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualRoutersClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualRoutersClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VirtualRoutersClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualRoutersClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualRoutersClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualRoutersClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VirtualRoutersClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VirtualRoutersServerTransport. @@ -99,7 +105,8 @@ func (v *VirtualRoutersServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -122,19 +129,21 @@ func (v *VirtualRoutersServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -144,7 +153,8 @@ func (v *VirtualRoutersServerTransport) dispatchBeginDelete(req *http.Request) ( if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -163,19 +173,21 @@ func (v *VirtualRoutersServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -230,7 +242,8 @@ func (v *VirtualRoutersServerTransport) dispatchNewListPager(req *http.Request) if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -238,20 +251,22 @@ func (v *VirtualRoutersServerTransport) dispatchNewListPager(req *http.Request) return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualRoutersClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualRoutersClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -260,7 +275,8 @@ func (v *VirtualRoutersServerTransport) dispatchNewListByResourceGroupPager(req if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualRouters` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -272,20 +288,22 @@ func (v *VirtualRoutersServerTransport) dispatchNewListByResourceGroupPager(req return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VirtualRoutersClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualRoutersClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/virtualwans_server.go b/sdk/resourcemanager/network/armnetwork/fake/virtualwans_server.go index 416a8b75e406..cd419061c1ab 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/virtualwans_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/virtualwans_server.go @@ -50,20 +50,26 @@ type VirtualWansServer struct { } // NewVirtualWansServerTransport creates a new instance of VirtualWansServerTransport with the provided implementation. -// The returned VirtualWansServerTransport instance is connected to an instance of armnetwork.VirtualWansClient by way of the -// undefined.Transporter field. +// The returned VirtualWansServerTransport instance is connected to an instance of armnetwork.VirtualWansClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVirtualWansServerTransport(srv *VirtualWansServer) *VirtualWansServerTransport { - return &VirtualWansServerTransport{srv: srv} + return &VirtualWansServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VirtualWansClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VirtualWansClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VirtualWansClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VirtualWansClientListByResourceGroupResponse]](), + } } // VirtualWansServerTransport connects instances of armnetwork.VirtualWansClient to instances of VirtualWansServer. // Don't use this type directly, use NewVirtualWansServerTransport instead. type VirtualWansServerTransport struct { srv *VirtualWansServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VirtualWansClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VirtualWansClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VirtualWansClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VirtualWansClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VirtualWansClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VirtualWansClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VirtualWansClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VirtualWansClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VirtualWansServerTransport. @@ -105,7 +111,8 @@ func (v *VirtualWansServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (v *VirtualWansServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (v *VirtualWansServerTransport) dispatchBeginDelete(req *http.Request) (*ht if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (v *VirtualWansServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (v *VirtualWansServerTransport) dispatchNewListPager(req *http.Request) (*h if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (v *VirtualWansServerTransport) dispatchNewListPager(req *http.Request) (*h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VirtualWansClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VirtualWansClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (v *VirtualWansServerTransport) dispatchNewListByResourceGroupPager(req *ht if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (v *VirtualWansServerTransport) dispatchNewListByResourceGroupPager(req *ht return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VirtualWansClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VirtualWansClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnconnections_server.go index d92458e51ae3..52d3fa96da18 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnconnections_server.go @@ -51,21 +51,28 @@ type VPNConnectionsServer struct { } // NewVPNConnectionsServerTransport creates a new instance of VPNConnectionsServerTransport with the provided implementation. -// The returned VPNConnectionsServerTransport instance is connected to an instance of armnetwork.VPNConnectionsClient by way of the -// undefined.Transporter field. +// The returned VPNConnectionsServerTransport instance is connected to an instance of armnetwork.VPNConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNConnectionsServerTransport(srv *VPNConnectionsServer) *VPNConnectionsServerTransport { - return &VPNConnectionsServerTransport{srv: srv} + return &VPNConnectionsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientDeleteResponse]](), + newListByVPNGatewayPager: newTracker[azfake.PagerResponder[armnetwork.VPNConnectionsClientListByVPNGatewayResponse]](), + beginStartPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientStartPacketCaptureResponse]](), + beginStopPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientStopPacketCaptureResponse]](), + } } // VPNConnectionsServerTransport connects instances of armnetwork.VPNConnectionsClient to instances of VPNConnectionsServer. // Don't use this type directly, use NewVPNConnectionsServerTransport instead. type VPNConnectionsServerTransport struct { srv *VPNConnectionsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VPNConnectionsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VPNConnectionsClientDeleteResponse] - newListByVPNGatewayPager *azfake.PagerResponder[armnetwork.VPNConnectionsClientListByVPNGatewayResponse] - beginStartPacketCapture *azfake.PollerResponder[armnetwork.VPNConnectionsClientStartPacketCaptureResponse] - beginStopPacketCapture *azfake.PollerResponder[armnetwork.VPNConnectionsClientStopPacketCaptureResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientDeleteResponse]] + newListByVPNGatewayPager *tracker[azfake.PagerResponder[armnetwork.VPNConnectionsClientListByVPNGatewayResponse]] + beginStartPacketCapture *tracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientStartPacketCaptureResponse]] + beginStopPacketCapture *tracker[azfake.PollerResponder[armnetwork.VPNConnectionsClientStopPacketCaptureResponse]] } // Do implements the policy.Transporter interface for VPNConnectionsServerTransport. @@ -107,7 +114,8 @@ func (v *VPNConnectionsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -134,19 +142,21 @@ func (v *VPNConnectionsServerTransport) dispatchBeginCreateOrUpdate(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -156,7 +166,8 @@ func (v *VPNConnectionsServerTransport) dispatchBeginDelete(req *http.Request) ( if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -179,19 +190,21 @@ func (v *VPNConnectionsServerTransport) dispatchBeginDelete(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -238,7 +251,8 @@ func (v *VPNConnectionsServerTransport) dispatchNewListByVPNGatewayPager(req *ht if v.srv.NewListByVPNGatewayPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVPNGatewayPager not implemented")} } - if v.newListByVPNGatewayPager == nil { + newListByVPNGatewayPager := v.newListByVPNGatewayPager.get(req) + if newListByVPNGatewayPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -254,20 +268,22 @@ func (v *VPNConnectionsServerTransport) dispatchNewListByVPNGatewayPager(req *ht return nil, err } resp := v.srv.NewListByVPNGatewayPager(resourceGroupNameUnescaped, gatewayNameUnescaped, nil) - v.newListByVPNGatewayPager = &resp - server.PagerResponderInjectNextLinks(v.newListByVPNGatewayPager, req, func(page *armnetwork.VPNConnectionsClientListByVPNGatewayResponse, createLink func() string) { + newListByVPNGatewayPager = &resp + v.newListByVPNGatewayPager.add(req, newListByVPNGatewayPager) + server.PagerResponderInjectNextLinks(newListByVPNGatewayPager, req, func(page *armnetwork.VPNConnectionsClientListByVPNGatewayResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByVPNGatewayPager, req) + resp, err := server.PagerResponderNext(newListByVPNGatewayPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByVPNGatewayPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByVPNGatewayPager) { - v.newListByVPNGatewayPager = nil + if !server.PagerResponderMore(newListByVPNGatewayPager) { + v.newListByVPNGatewayPager.remove(req) } return resp, nil } @@ -276,7 +292,8 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStartPacketCapture(req *htt if v.srv.BeginStartPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStartPacketCapture not implemented")} } - if v.beginStartPacketCapture == nil { + beginStartPacketCapture := v.beginStartPacketCapture.get(req) + if beginStartPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -309,19 +326,21 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStartPacketCapture(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStartPacketCapture = &respr + beginStartPacketCapture = &respr + v.beginStartPacketCapture.add(req, beginStartPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStartPacketCapture, req) + resp, err := server.PollerResponderNext(beginStartPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStartPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStartPacketCapture) { - v.beginStartPacketCapture = nil + if !server.PollerResponderMore(beginStartPacketCapture) { + v.beginStartPacketCapture.remove(req) } return resp, nil @@ -331,7 +350,8 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStopPacketCapture(req *http if v.srv.BeginStopPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStopPacketCapture not implemented")} } - if v.beginStopPacketCapture == nil { + beginStopPacketCapture := v.beginStopPacketCapture.get(req) + if beginStopPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -364,19 +384,21 @@ func (v *VPNConnectionsServerTransport) dispatchBeginStopPacketCapture(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStopPacketCapture = &respr + beginStopPacketCapture = &respr + v.beginStopPacketCapture.add(req, beginStopPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStopPacketCapture, req) + resp, err := server.PollerResponderNext(beginStopPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStopPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStopPacketCapture) { - v.beginStopPacketCapture = nil + if !server.PollerResponderMore(beginStopPacketCapture) { + v.beginStopPacketCapture.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpngateways_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpngateways_server.go index df8c901ecb99..ec89e9ecab01 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpngateways_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpngateways_server.go @@ -63,24 +63,34 @@ type VPNGatewaysServer struct { } // NewVPNGatewaysServerTransport creates a new instance of VPNGatewaysServerTransport with the provided implementation. -// The returned VPNGatewaysServerTransport instance is connected to an instance of armnetwork.VPNGatewaysClient by way of the -// undefined.Transporter field. +// The returned VPNGatewaysServerTransport instance is connected to an instance of armnetwork.VPNGatewaysClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNGatewaysServerTransport(srv *VPNGatewaysServer) *VPNGatewaysServerTransport { - return &VPNGatewaysServerTransport{srv: srv} + return &VPNGatewaysServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VPNGatewaysClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VPNGatewaysClientListByResourceGroupResponse]](), + beginReset: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientResetResponse]](), + beginStartPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientStartPacketCaptureResponse]](), + beginStopPacketCapture: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientStopPacketCaptureResponse]](), + beginUpdateTags: newTracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientUpdateTagsResponse]](), + } } // VPNGatewaysServerTransport connects instances of armnetwork.VPNGatewaysClient to instances of VPNGatewaysServer. // Don't use this type directly, use NewVPNGatewaysServerTransport instead. type VPNGatewaysServerTransport struct { srv *VPNGatewaysServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VPNGatewaysClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VPNGatewaysClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VPNGatewaysClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VPNGatewaysClientListByResourceGroupResponse] - beginReset *azfake.PollerResponder[armnetwork.VPNGatewaysClientResetResponse] - beginStartPacketCapture *azfake.PollerResponder[armnetwork.VPNGatewaysClientStartPacketCaptureResponse] - beginStopPacketCapture *azfake.PollerResponder[armnetwork.VPNGatewaysClientStopPacketCaptureResponse] - beginUpdateTags *azfake.PollerResponder[armnetwork.VPNGatewaysClientUpdateTagsResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VPNGatewaysClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VPNGatewaysClientListByResourceGroupResponse]] + beginReset *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientResetResponse]] + beginStartPacketCapture *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientStartPacketCaptureResponse]] + beginStopPacketCapture *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientStopPacketCaptureResponse]] + beginUpdateTags *tracker[azfake.PollerResponder[armnetwork.VPNGatewaysClientUpdateTagsResponse]] } // Do implements the policy.Transporter interface for VPNGatewaysServerTransport. @@ -128,7 +138,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -151,19 +162,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginCreateOrUpdate(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -173,7 +186,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -192,19 +206,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginDelete(req *http.Request) (*ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -247,7 +263,8 @@ func (v *VPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -255,20 +272,22 @@ func (v *VPNGatewaysServerTransport) dispatchNewListPager(req *http.Request) (*h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VPNGatewaysClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VPNGatewaysClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -277,7 +296,8 @@ func (v *VPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req *ht if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -289,20 +309,22 @@ func (v *VPNGatewaysServerTransport) dispatchNewListByResourceGroupPager(req *ht return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VPNGatewaysClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNGatewaysClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } @@ -311,7 +333,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (*htt if v.srv.BeginReset == nil { return nil, &nonRetriableError{errors.New("fake for method BeginReset not implemented")} } - if v.beginReset == nil { + beginReset := v.beginReset.get(req) + if beginReset == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/reset` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -342,19 +365,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginReset(req *http.Request) (*htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginReset = &respr + beginReset = &respr + v.beginReset.add(req, beginReset) } - resp, err := server.PollerResponderNext(v.beginReset, req) + resp, err := server.PollerResponderNext(beginReset, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginReset.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginReset) { - v.beginReset = nil + if !server.PollerResponderMore(beginReset) { + v.beginReset.remove(req) } return resp, nil @@ -364,7 +389,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStartPacketCapture(req *http.R if v.srv.BeginStartPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStartPacketCapture not implemented")} } - if v.beginStartPacketCapture == nil { + beginStartPacketCapture := v.beginStartPacketCapture.get(req) + if beginStartPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/startpacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -393,19 +419,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStartPacketCapture(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStartPacketCapture = &respr + beginStartPacketCapture = &respr + v.beginStartPacketCapture.add(req, beginStartPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStartPacketCapture, req) + resp, err := server.PollerResponderNext(beginStartPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStartPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStartPacketCapture) { - v.beginStartPacketCapture = nil + if !server.PollerResponderMore(beginStartPacketCapture) { + v.beginStartPacketCapture.remove(req) } return resp, nil @@ -415,7 +443,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStopPacketCapture(req *http.Re if v.srv.BeginStopPacketCapture == nil { return nil, &nonRetriableError{errors.New("fake for method BeginStopPacketCapture not implemented")} } - if v.beginStopPacketCapture == nil { + beginStopPacketCapture := v.beginStopPacketCapture.get(req) + if beginStopPacketCapture == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/stoppacketcapture` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -444,19 +473,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginStopPacketCapture(req *http.Re if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginStopPacketCapture = &respr + beginStopPacketCapture = &respr + v.beginStopPacketCapture.add(req, beginStopPacketCapture) } - resp, err := server.PollerResponderNext(v.beginStopPacketCapture, req) + resp, err := server.PollerResponderNext(beginStopPacketCapture, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginStopPacketCapture.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginStopPacketCapture) { - v.beginStopPacketCapture = nil + if !server.PollerResponderMore(beginStopPacketCapture) { + v.beginStopPacketCapture.remove(req) } return resp, nil @@ -466,7 +497,8 @@ func (v *VPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Request) if v.srv.BeginUpdateTags == nil { return nil, &nonRetriableError{errors.New("fake for method BeginUpdateTags not implemented")} } - if v.beginUpdateTags == nil { + beginUpdateTags := v.beginUpdateTags.get(req) + if beginUpdateTags == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -489,19 +521,21 @@ func (v *VPNGatewaysServerTransport) dispatchBeginUpdateTags(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginUpdateTags = &respr + beginUpdateTags = &respr + v.beginUpdateTags.add(req, beginUpdateTags) } - resp, err := server.PollerResponderNext(v.beginUpdateTags, req) + resp, err := server.PollerResponderNext(beginUpdateTags, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginUpdateTags.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginUpdateTags) { - v.beginUpdateTags = nil + if !server.PollerResponderMore(beginUpdateTags) { + v.beginUpdateTags.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnlinkconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnlinkconnections_server.go index e44a46ff64b8..c68bf0a267d2 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnlinkconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnlinkconnections_server.go @@ -38,19 +38,24 @@ type VPNLinkConnectionsServer struct { } // NewVPNLinkConnectionsServerTransport creates a new instance of VPNLinkConnectionsServerTransport with the provided implementation. -// The returned VPNLinkConnectionsServerTransport instance is connected to an instance of armnetwork.VPNLinkConnectionsClient by way of the -// undefined.Transporter field. +// The returned VPNLinkConnectionsServerTransport instance is connected to an instance of armnetwork.VPNLinkConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNLinkConnectionsServerTransport(srv *VPNLinkConnectionsServer) *VPNLinkConnectionsServerTransport { - return &VPNLinkConnectionsServerTransport{srv: srv} + return &VPNLinkConnectionsServerTransport{ + srv: srv, + beginGetIkeSas: newTracker[azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientGetIkeSasResponse]](), + newListByVPNConnectionPager: newTracker[azfake.PagerResponder[armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse]](), + beginResetConnection: newTracker[azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientResetConnectionResponse]](), + } } // VPNLinkConnectionsServerTransport connects instances of armnetwork.VPNLinkConnectionsClient to instances of VPNLinkConnectionsServer. // Don't use this type directly, use NewVPNLinkConnectionsServerTransport instead. type VPNLinkConnectionsServerTransport struct { srv *VPNLinkConnectionsServer - beginGetIkeSas *azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientGetIkeSasResponse] - newListByVPNConnectionPager *azfake.PagerResponder[armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse] - beginResetConnection *azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientResetConnectionResponse] + beginGetIkeSas *tracker[azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientGetIkeSasResponse]] + newListByVPNConnectionPager *tracker[azfake.PagerResponder[armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse]] + beginResetConnection *tracker[azfake.PollerResponder[armnetwork.VPNLinkConnectionsClientResetConnectionResponse]] } // Do implements the policy.Transporter interface for VPNLinkConnectionsServerTransport. @@ -86,7 +91,8 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginGetIkeSas(req *http.Req if v.srv.BeginGetIkeSas == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetIkeSas not implemented")} } - if v.beginGetIkeSas == nil { + beginGetIkeSas := v.beginGetIkeSas.get(req) + if beginGetIkeSas == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/getikesas` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -113,19 +119,21 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginGetIkeSas(req *http.Req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginGetIkeSas = &respr + beginGetIkeSas = &respr + v.beginGetIkeSas.add(req, beginGetIkeSas) } - resp, err := server.PollerResponderNext(v.beginGetIkeSas, req) + resp, err := server.PollerResponderNext(beginGetIkeSas, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginGetIkeSas.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginGetIkeSas) { - v.beginGetIkeSas = nil + if !server.PollerResponderMore(beginGetIkeSas) { + v.beginGetIkeSas.remove(req) } return resp, nil @@ -135,7 +143,8 @@ func (v *VPNLinkConnectionsServerTransport) dispatchNewListByVPNConnectionPager( if v.srv.NewListByVPNConnectionPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVPNConnectionPager not implemented")} } - if v.newListByVPNConnectionPager == nil { + newListByVPNConnectionPager := v.newListByVPNConnectionPager.get(req) + if newListByVPNConnectionPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -155,20 +164,22 @@ func (v *VPNLinkConnectionsServerTransport) dispatchNewListByVPNConnectionPager( return nil, err } resp := v.srv.NewListByVPNConnectionPager(resourceGroupNameUnescaped, gatewayNameUnescaped, connectionNameUnescaped, nil) - v.newListByVPNConnectionPager = &resp - server.PagerResponderInjectNextLinks(v.newListByVPNConnectionPager, req, func(page *armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse, createLink func() string) { + newListByVPNConnectionPager = &resp + v.newListByVPNConnectionPager.add(req, newListByVPNConnectionPager) + server.PagerResponderInjectNextLinks(newListByVPNConnectionPager, req, func(page *armnetwork.VPNLinkConnectionsClientListByVPNConnectionResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByVPNConnectionPager, req) + resp, err := server.PagerResponderNext(newListByVPNConnectionPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByVPNConnectionPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByVPNConnectionPager) { - v.newListByVPNConnectionPager = nil + if !server.PagerResponderMore(newListByVPNConnectionPager) { + v.newListByVPNConnectionPager.remove(req) } return resp, nil } @@ -177,7 +188,8 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginResetConnection(req *ht if v.srv.BeginResetConnection == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResetConnection not implemented")} } - if v.beginResetConnection == nil { + beginResetConnection := v.beginResetConnection.get(req) + if beginResetConnection == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnGateways/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnLinkConnections/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resetconnection` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -204,19 +216,21 @@ func (v *VPNLinkConnectionsServerTransport) dispatchBeginResetConnection(req *ht if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginResetConnection = &respr + beginResetConnection = &respr + v.beginResetConnection.add(req, beginResetConnection) } - resp, err := server.PollerResponderNext(v.beginResetConnection, req) + resp, err := server.PollerResponderNext(beginResetConnection, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted}, resp.StatusCode) { + v.beginResetConnection.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginResetConnection) { - v.beginResetConnection = nil + if !server.PollerResponderMore(beginResetConnection) { + v.beginResetConnection.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurations_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurations_server.go index ce632cacd91c..c20c62d1a280 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurations_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurations_server.go @@ -50,20 +50,26 @@ type VPNServerConfigurationsServer struct { } // NewVPNServerConfigurationsServerTransport creates a new instance of VPNServerConfigurationsServerTransport with the provided implementation. -// The returned VPNServerConfigurationsServerTransport instance is connected to an instance of armnetwork.VPNServerConfigurationsClient by way of the -// undefined.Transporter field. +// The returned VPNServerConfigurationsServerTransport instance is connected to an instance of armnetwork.VPNServerConfigurationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNServerConfigurationsServerTransport(srv *VPNServerConfigurationsServer) *VPNServerConfigurationsServerTransport { - return &VPNServerConfigurationsServerTransport{srv: srv} + return &VPNServerConfigurationsServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse]](), + } } // VPNServerConfigurationsServerTransport connects instances of armnetwork.VPNServerConfigurationsClient to instances of VPNServerConfigurationsServer. // Don't use this type directly, use NewVPNServerConfigurationsServerTransport instead. type VPNServerConfigurationsServerTransport struct { srv *VPNServerConfigurationsServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VPNServerConfigurationsServerTransport. @@ -105,7 +111,8 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginCreateOrUpdate(req if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginCreateOrUpdate(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginDelete(req *http.R if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (v *VPNServerConfigurationsServerTransport) dispatchBeginDelete(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListPager(req *http. if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListPager(req *http. return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VPNServerConfigurationsClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VPNServerConfigurationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListByResourceGroupP if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (v *VPNServerConfigurationsServerTransport) dispatchNewListByResourceGroupP return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNServerConfigurationsClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go index f00fad417b1d..80c0986c2e81 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnserverconfigurationsassociatedwithvirtualwan_server.go @@ -29,17 +29,20 @@ type VPNServerConfigurationsAssociatedWithVirtualWanServer struct { } // NewVPNServerConfigurationsAssociatedWithVirtualWanServerTransport creates a new instance of VPNServerConfigurationsAssociatedWithVirtualWanServerTransport with the provided implementation. -// The returned VPNServerConfigurationsAssociatedWithVirtualWanServerTransport instance is connected to an instance of armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClient by way of the -// undefined.Transporter field. +// The returned VPNServerConfigurationsAssociatedWithVirtualWanServerTransport instance is connected to an instance of armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNServerConfigurationsAssociatedWithVirtualWanServerTransport(srv *VPNServerConfigurationsAssociatedWithVirtualWanServer) *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport { - return &VPNServerConfigurationsAssociatedWithVirtualWanServerTransport{srv: srv} + return &VPNServerConfigurationsAssociatedWithVirtualWanServerTransport{ + srv: srv, + beginList: newTracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]](), + } } // VPNServerConfigurationsAssociatedWithVirtualWanServerTransport connects instances of armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClient to instances of VPNServerConfigurationsAssociatedWithVirtualWanServer. // Don't use this type directly, use NewVPNServerConfigurationsAssociatedWithVirtualWanServerTransport instead. type VPNServerConfigurationsAssociatedWithVirtualWanServerTransport struct { srv *VPNServerConfigurationsAssociatedWithVirtualWanServer - beginList *azfake.PollerResponder[armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse] + beginList *tracker[azfake.PollerResponder[armnetwork.VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]] } // Do implements the policy.Transporter interface for VPNServerConfigurationsAssociatedWithVirtualWanServerTransport. @@ -71,7 +74,8 @@ func (v *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport) dispatc if v.srv.BeginList == nil { return nil, &nonRetriableError{errors.New("fake for method BeginList not implemented")} } - if v.beginList == nil { + beginList := v.beginList.get(req) + if beginList == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnServerConfigurations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -90,19 +94,21 @@ func (v *VPNServerConfigurationsAssociatedWithVirtualWanServerTransport) dispatc if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginList = &respr + beginList = &respr + v.beginList.add(req, beginList) } - resp, err := server.PollerResponderNext(v.beginList, req) + resp, err := server.PollerResponderNext(beginList, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginList.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginList) { - v.beginList = nil + if !server.PollerResponderMore(beginList) { + v.beginList.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinkconnections_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinkconnections_server.go index 123c0a135c65..0791193381c8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinkconnections_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinkconnections_server.go @@ -29,8 +29,8 @@ type VPNSiteLinkConnectionsServer struct { } // NewVPNSiteLinkConnectionsServerTransport creates a new instance of VPNSiteLinkConnectionsServerTransport with the provided implementation. -// The returned VPNSiteLinkConnectionsServerTransport instance is connected to an instance of armnetwork.VPNSiteLinkConnectionsClient by way of the -// undefined.Transporter field. +// The returned VPNSiteLinkConnectionsServerTransport instance is connected to an instance of armnetwork.VPNSiteLinkConnectionsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNSiteLinkConnectionsServerTransport(srv *VPNSiteLinkConnectionsServer) *VPNSiteLinkConnectionsServerTransport { return &VPNSiteLinkConnectionsServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinks_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinks_server.go index fe8b4d76f325..160ee5255948 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinks_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnsitelinks_server.go @@ -34,17 +34,20 @@ type VPNSiteLinksServer struct { } // NewVPNSiteLinksServerTransport creates a new instance of VPNSiteLinksServerTransport with the provided implementation. -// The returned VPNSiteLinksServerTransport instance is connected to an instance of armnetwork.VPNSiteLinksClient by way of the -// undefined.Transporter field. +// The returned VPNSiteLinksServerTransport instance is connected to an instance of armnetwork.VPNSiteLinksClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNSiteLinksServerTransport(srv *VPNSiteLinksServer) *VPNSiteLinksServerTransport { - return &VPNSiteLinksServerTransport{srv: srv} + return &VPNSiteLinksServerTransport{ + srv: srv, + newListByVPNSitePager: newTracker[azfake.PagerResponder[armnetwork.VPNSiteLinksClientListByVPNSiteResponse]](), + } } // VPNSiteLinksServerTransport connects instances of armnetwork.VPNSiteLinksClient to instances of VPNSiteLinksServer. // Don't use this type directly, use NewVPNSiteLinksServerTransport instead. type VPNSiteLinksServerTransport struct { srv *VPNSiteLinksServer - newListByVPNSitePager *azfake.PagerResponder[armnetwork.VPNSiteLinksClientListByVPNSiteResponse] + newListByVPNSitePager *tracker[azfake.PagerResponder[armnetwork.VPNSiteLinksClientListByVPNSiteResponse]] } // Do implements the policy.Transporter interface for VPNSiteLinksServerTransport. @@ -115,7 +118,8 @@ func (v *VPNSiteLinksServerTransport) dispatchNewListByVPNSitePager(req *http.Re if v.srv.NewListByVPNSitePager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByVPNSitePager not implemented")} } - if v.newListByVPNSitePager == nil { + newListByVPNSitePager := v.newListByVPNSitePager.get(req) + if newListByVPNSitePager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnSiteLinks` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -131,20 +135,22 @@ func (v *VPNSiteLinksServerTransport) dispatchNewListByVPNSitePager(req *http.Re return nil, err } resp := v.srv.NewListByVPNSitePager(resourceGroupNameUnescaped, vpnSiteNameUnescaped, nil) - v.newListByVPNSitePager = &resp - server.PagerResponderInjectNextLinks(v.newListByVPNSitePager, req, func(page *armnetwork.VPNSiteLinksClientListByVPNSiteResponse, createLink func() string) { + newListByVPNSitePager = &resp + v.newListByVPNSitePager.add(req, newListByVPNSitePager) + server.PagerResponderInjectNextLinks(newListByVPNSitePager, req, func(page *armnetwork.VPNSiteLinksClientListByVPNSiteResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByVPNSitePager, req) + resp, err := server.PagerResponderNext(newListByVPNSitePager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByVPNSitePager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByVPNSitePager) { - v.newListByVPNSitePager = nil + if !server.PagerResponderMore(newListByVPNSitePager) { + v.newListByVPNSitePager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnsites_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnsites_server.go index 449ae6b03668..f953217652d8 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnsites_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnsites_server.go @@ -50,20 +50,26 @@ type VPNSitesServer struct { } // NewVPNSitesServerTransport creates a new instance of VPNSitesServerTransport with the provided implementation. -// The returned VPNSitesServerTransport instance is connected to an instance of armnetwork.VPNSitesClient by way of the -// undefined.Transporter field. +// The returned VPNSitesServerTransport instance is connected to an instance of armnetwork.VPNSitesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNSitesServerTransport(srv *VPNSitesServer) *VPNSitesServerTransport { - return &VPNSitesServerTransport{srv: srv} + return &VPNSitesServerTransport{ + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armnetwork.VPNSitesClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.VPNSitesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.VPNSitesClientListResponse]](), + newListByResourceGroupPager: newTracker[azfake.PagerResponder[armnetwork.VPNSitesClientListByResourceGroupResponse]](), + } } // VPNSitesServerTransport connects instances of armnetwork.VPNSitesClient to instances of VPNSitesServer. // Don't use this type directly, use NewVPNSitesServerTransport instead. type VPNSitesServerTransport struct { srv *VPNSitesServer - beginCreateOrUpdate *azfake.PollerResponder[armnetwork.VPNSitesClientCreateOrUpdateResponse] - beginDelete *azfake.PollerResponder[armnetwork.VPNSitesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.VPNSitesClientListResponse] - newListByResourceGroupPager *azfake.PagerResponder[armnetwork.VPNSitesClientListByResourceGroupResponse] + beginCreateOrUpdate *tracker[azfake.PollerResponder[armnetwork.VPNSitesClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.VPNSitesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.VPNSitesClientListResponse]] + newListByResourceGroupPager *tracker[azfake.PagerResponder[armnetwork.VPNSitesClientListByResourceGroupResponse]] } // Do implements the policy.Transporter interface for VPNSitesServerTransport. @@ -105,7 +111,8 @@ func (v *VPNSitesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if v.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} } - if v.beginCreateOrUpdate == nil { + beginCreateOrUpdate := v.beginCreateOrUpdate.get(req) + if beginCreateOrUpdate == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -128,19 +135,21 @@ func (v *VPNSitesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginCreateOrUpdate = &respr + beginCreateOrUpdate = &respr + v.beginCreateOrUpdate.add(req, beginCreateOrUpdate) } - resp, err := server.PollerResponderNext(v.beginCreateOrUpdate, req) + resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { + v.beginCreateOrUpdate.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginCreateOrUpdate) { - v.beginCreateOrUpdate = nil + if !server.PollerResponderMore(beginCreateOrUpdate) { + v.beginCreateOrUpdate.remove(req) } return resp, nil @@ -150,7 +159,8 @@ func (v *VPNSitesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if v.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if v.beginDelete == nil { + beginDelete := v.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -169,19 +179,21 @@ func (v *VPNSitesServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDelete = &respr + beginDelete = &respr + v.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(v.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + v.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDelete) { - v.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + v.beginDelete.remove(req) } return resp, nil @@ -224,7 +236,8 @@ func (v *VPNSitesServerTransport) dispatchNewListPager(req *http.Request) (*http if v.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if v.newListPager == nil { + newListPager := v.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -232,20 +245,22 @@ func (v *VPNSitesServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := v.srv.NewListPager(nil) - v.newListPager = &resp - server.PagerResponderInjectNextLinks(v.newListPager, req, func(page *armnetwork.VPNSitesClientListResponse, createLink func() string) { + newListPager = &resp + v.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.VPNSitesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListPager) { - v.newListPager = nil + if !server.PagerResponderMore(newListPager) { + v.newListPager.remove(req) } return resp, nil } @@ -254,7 +269,8 @@ func (v *VPNSitesServerTransport) dispatchNewListByResourceGroupPager(req *http. if v.srv.NewListByResourceGroupPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} } - if v.newListByResourceGroupPager == nil { + newListByResourceGroupPager := v.newListByResourceGroupPager.get(req) + if newListByResourceGroupPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/vpnSites` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -266,20 +282,22 @@ func (v *VPNSitesServerTransport) dispatchNewListByResourceGroupPager(req *http. return nil, err } resp := v.srv.NewListByResourceGroupPager(resourceGroupNameUnescaped, nil) - v.newListByResourceGroupPager = &resp - server.PagerResponderInjectNextLinks(v.newListByResourceGroupPager, req, func(page *armnetwork.VPNSitesClientListByResourceGroupResponse, createLink func() string) { + newListByResourceGroupPager = &resp + v.newListByResourceGroupPager.add(req, newListByResourceGroupPager) + server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armnetwork.VPNSitesClientListByResourceGroupResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(v.newListByResourceGroupPager, req) + resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + v.newListByResourceGroupPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(v.newListByResourceGroupPager) { - v.newListByResourceGroupPager = nil + if !server.PagerResponderMore(newListByResourceGroupPager) { + v.newListByResourceGroupPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/vpnsitesconfiguration_server.go b/sdk/resourcemanager/network/armnetwork/fake/vpnsitesconfiguration_server.go index aa9133606a7c..3bb0fc06358e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/vpnsitesconfiguration_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/vpnsitesconfiguration_server.go @@ -29,17 +29,20 @@ type VPNSitesConfigurationServer struct { } // NewVPNSitesConfigurationServerTransport creates a new instance of VPNSitesConfigurationServerTransport with the provided implementation. -// The returned VPNSitesConfigurationServerTransport instance is connected to an instance of armnetwork.VPNSitesConfigurationClient by way of the -// undefined.Transporter field. +// The returned VPNSitesConfigurationServerTransport instance is connected to an instance of armnetwork.VPNSitesConfigurationClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewVPNSitesConfigurationServerTransport(srv *VPNSitesConfigurationServer) *VPNSitesConfigurationServerTransport { - return &VPNSitesConfigurationServerTransport{srv: srv} + return &VPNSitesConfigurationServerTransport{ + srv: srv, + beginDownload: newTracker[azfake.PollerResponder[armnetwork.VPNSitesConfigurationClientDownloadResponse]](), + } } // VPNSitesConfigurationServerTransport connects instances of armnetwork.VPNSitesConfigurationClient to instances of VPNSitesConfigurationServer. // Don't use this type directly, use NewVPNSitesConfigurationServerTransport instead. type VPNSitesConfigurationServerTransport struct { srv *VPNSitesConfigurationServer - beginDownload *azfake.PollerResponder[armnetwork.VPNSitesConfigurationClientDownloadResponse] + beginDownload *tracker[azfake.PollerResponder[armnetwork.VPNSitesConfigurationClientDownloadResponse]] } // Do implements the policy.Transporter interface for VPNSitesConfigurationServerTransport. @@ -71,7 +74,8 @@ func (v *VPNSitesConfigurationServerTransport) dispatchBeginDownload(req *http.R if v.srv.BeginDownload == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDownload not implemented")} } - if v.beginDownload == nil { + beginDownload := v.beginDownload.get(req) + if beginDownload == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/virtualWans/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/vpnConfiguration` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -94,19 +98,21 @@ func (v *VPNSitesConfigurationServerTransport) dispatchBeginDownload(req *http.R if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - v.beginDownload = &respr + beginDownload = &respr + v.beginDownload.add(req, beginDownload) } - resp, err := server.PollerResponderNext(v.beginDownload, req) + resp, err := server.PollerResponderNext(beginDownload, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + v.beginDownload.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(v.beginDownload) { - v.beginDownload = nil + if !server.PollerResponderMore(beginDownload) { + v.beginDownload.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/watchers_server.go b/sdk/resourcemanager/network/armnetwork/fake/watchers_server.go index 796b272866ca..4d869dbe81ef 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/watchers_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/watchers_server.go @@ -97,30 +97,46 @@ type WatchersServer struct { } // NewWatchersServerTransport creates a new instance of WatchersServerTransport with the provided implementation. -// The returned WatchersServerTransport instance is connected to an instance of armnetwork.WatchersClient by way of the -// undefined.Transporter field. +// The returned WatchersServerTransport instance is connected to an instance of armnetwork.WatchersClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewWatchersServerTransport(srv *WatchersServer) *WatchersServerTransport { - return &WatchersServerTransport{srv: srv} + return &WatchersServerTransport{ + srv: srv, + beginCheckConnectivity: newTracker[azfake.PollerResponder[armnetwork.WatchersClientCheckConnectivityResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armnetwork.WatchersClientDeleteResponse]](), + beginGetAzureReachabilityReport: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetAzureReachabilityReportResponse]](), + beginGetFlowLogStatus: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetFlowLogStatusResponse]](), + beginGetNetworkConfigurationDiagnostic: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetNetworkConfigurationDiagnosticResponse]](), + beginGetNextHop: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetNextHopResponse]](), + beginGetTroubleshooting: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResponse]](), + beginGetTroubleshootingResult: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResultResponse]](), + beginGetVMSecurityRules: newTracker[azfake.PollerResponder[armnetwork.WatchersClientGetVMSecurityRulesResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.WatchersClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.WatchersClientListAllResponse]](), + beginListAvailableProviders: newTracker[azfake.PollerResponder[armnetwork.WatchersClientListAvailableProvidersResponse]](), + beginSetFlowLogConfiguration: newTracker[azfake.PollerResponder[armnetwork.WatchersClientSetFlowLogConfigurationResponse]](), + beginVerifyIPFlow: newTracker[azfake.PollerResponder[armnetwork.WatchersClientVerifyIPFlowResponse]](), + } } // WatchersServerTransport connects instances of armnetwork.WatchersClient to instances of WatchersServer. // Don't use this type directly, use NewWatchersServerTransport instead. type WatchersServerTransport struct { srv *WatchersServer - beginCheckConnectivity *azfake.PollerResponder[armnetwork.WatchersClientCheckConnectivityResponse] - beginDelete *azfake.PollerResponder[armnetwork.WatchersClientDeleteResponse] - beginGetAzureReachabilityReport *azfake.PollerResponder[armnetwork.WatchersClientGetAzureReachabilityReportResponse] - beginGetFlowLogStatus *azfake.PollerResponder[armnetwork.WatchersClientGetFlowLogStatusResponse] - beginGetNetworkConfigurationDiagnostic *azfake.PollerResponder[armnetwork.WatchersClientGetNetworkConfigurationDiagnosticResponse] - beginGetNextHop *azfake.PollerResponder[armnetwork.WatchersClientGetNextHopResponse] - beginGetTroubleshooting *azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResponse] - beginGetTroubleshootingResult *azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResultResponse] - beginGetVMSecurityRules *azfake.PollerResponder[armnetwork.WatchersClientGetVMSecurityRulesResponse] - newListPager *azfake.PagerResponder[armnetwork.WatchersClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.WatchersClientListAllResponse] - beginListAvailableProviders *azfake.PollerResponder[armnetwork.WatchersClientListAvailableProvidersResponse] - beginSetFlowLogConfiguration *azfake.PollerResponder[armnetwork.WatchersClientSetFlowLogConfigurationResponse] - beginVerifyIPFlow *azfake.PollerResponder[armnetwork.WatchersClientVerifyIPFlowResponse] + beginCheckConnectivity *tracker[azfake.PollerResponder[armnetwork.WatchersClientCheckConnectivityResponse]] + beginDelete *tracker[azfake.PollerResponder[armnetwork.WatchersClientDeleteResponse]] + beginGetAzureReachabilityReport *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetAzureReachabilityReportResponse]] + beginGetFlowLogStatus *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetFlowLogStatusResponse]] + beginGetNetworkConfigurationDiagnostic *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetNetworkConfigurationDiagnosticResponse]] + beginGetNextHop *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetNextHopResponse]] + beginGetTroubleshooting *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResponse]] + beginGetTroubleshootingResult *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetTroubleshootingResultResponse]] + beginGetVMSecurityRules *tracker[azfake.PollerResponder[armnetwork.WatchersClientGetVMSecurityRulesResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.WatchersClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.WatchersClientListAllResponse]] + beginListAvailableProviders *tracker[azfake.PollerResponder[armnetwork.WatchersClientListAvailableProvidersResponse]] + beginSetFlowLogConfiguration *tracker[azfake.PollerResponder[armnetwork.WatchersClientSetFlowLogConfigurationResponse]] + beginVerifyIPFlow *tracker[azfake.PollerResponder[armnetwork.WatchersClientVerifyIPFlowResponse]] } // Do implements the policy.Transporter interface for WatchersServerTransport. @@ -186,7 +202,8 @@ func (w *WatchersServerTransport) dispatchBeginCheckConnectivity(req *http.Reque if w.srv.BeginCheckConnectivity == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCheckConnectivity not implemented")} } - if w.beginCheckConnectivity == nil { + beginCheckConnectivity := w.beginCheckConnectivity.get(req) + if beginCheckConnectivity == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/connectivityCheck` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -209,19 +226,21 @@ func (w *WatchersServerTransport) dispatchBeginCheckConnectivity(req *http.Reque if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginCheckConnectivity = &respr + beginCheckConnectivity = &respr + w.beginCheckConnectivity.add(req, beginCheckConnectivity) } - resp, err := server.PollerResponderNext(w.beginCheckConnectivity, req) + resp, err := server.PollerResponderNext(beginCheckConnectivity, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginCheckConnectivity.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginCheckConnectivity) { - w.beginCheckConnectivity = nil + if !server.PollerResponderMore(beginCheckConnectivity) { + w.beginCheckConnectivity.remove(req) } return resp, nil @@ -268,7 +287,8 @@ func (w *WatchersServerTransport) dispatchBeginDelete(req *http.Request) (*http. if w.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if w.beginDelete == nil { + beginDelete := w.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -287,19 +307,21 @@ func (w *WatchersServerTransport) dispatchBeginDelete(req *http.Request) (*http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginDelete = &respr + beginDelete = &respr + w.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(w.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + w.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginDelete) { - w.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + w.beginDelete.remove(req) } return resp, nil @@ -342,7 +364,8 @@ func (w *WatchersServerTransport) dispatchBeginGetAzureReachabilityReport(req *h if w.srv.BeginGetAzureReachabilityReport == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetAzureReachabilityReport not implemented")} } - if w.beginGetAzureReachabilityReport == nil { + beginGetAzureReachabilityReport := w.beginGetAzureReachabilityReport.get(req) + if beginGetAzureReachabilityReport == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/azureReachabilityReport` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -365,19 +388,21 @@ func (w *WatchersServerTransport) dispatchBeginGetAzureReachabilityReport(req *h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetAzureReachabilityReport = &respr + beginGetAzureReachabilityReport = &respr + w.beginGetAzureReachabilityReport.add(req, beginGetAzureReachabilityReport) } - resp, err := server.PollerResponderNext(w.beginGetAzureReachabilityReport, req) + resp, err := server.PollerResponderNext(beginGetAzureReachabilityReport, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetAzureReachabilityReport.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetAzureReachabilityReport) { - w.beginGetAzureReachabilityReport = nil + if !server.PollerResponderMore(beginGetAzureReachabilityReport) { + w.beginGetAzureReachabilityReport.remove(req) } return resp, nil @@ -387,7 +412,8 @@ func (w *WatchersServerTransport) dispatchBeginGetFlowLogStatus(req *http.Reques if w.srv.BeginGetFlowLogStatus == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetFlowLogStatus not implemented")} } - if w.beginGetFlowLogStatus == nil { + beginGetFlowLogStatus := w.beginGetFlowLogStatus.get(req) + if beginGetFlowLogStatus == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryFlowLogStatus` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -410,19 +436,21 @@ func (w *WatchersServerTransport) dispatchBeginGetFlowLogStatus(req *http.Reques if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetFlowLogStatus = &respr + beginGetFlowLogStatus = &respr + w.beginGetFlowLogStatus.add(req, beginGetFlowLogStatus) } - resp, err := server.PollerResponderNext(w.beginGetFlowLogStatus, req) + resp, err := server.PollerResponderNext(beginGetFlowLogStatus, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetFlowLogStatus.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetFlowLogStatus) { - w.beginGetFlowLogStatus = nil + if !server.PollerResponderMore(beginGetFlowLogStatus) { + w.beginGetFlowLogStatus.remove(req) } return resp, nil @@ -432,7 +460,8 @@ func (w *WatchersServerTransport) dispatchBeginGetNetworkConfigurationDiagnostic if w.srv.BeginGetNetworkConfigurationDiagnostic == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetNetworkConfigurationDiagnostic not implemented")} } - if w.beginGetNetworkConfigurationDiagnostic == nil { + beginGetNetworkConfigurationDiagnostic := w.beginGetNetworkConfigurationDiagnostic.get(req) + if beginGetNetworkConfigurationDiagnostic == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/networkConfigurationDiagnostic` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -455,19 +484,21 @@ func (w *WatchersServerTransport) dispatchBeginGetNetworkConfigurationDiagnostic if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetNetworkConfigurationDiagnostic = &respr + beginGetNetworkConfigurationDiagnostic = &respr + w.beginGetNetworkConfigurationDiagnostic.add(req, beginGetNetworkConfigurationDiagnostic) } - resp, err := server.PollerResponderNext(w.beginGetNetworkConfigurationDiagnostic, req) + resp, err := server.PollerResponderNext(beginGetNetworkConfigurationDiagnostic, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetNetworkConfigurationDiagnostic.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetNetworkConfigurationDiagnostic) { - w.beginGetNetworkConfigurationDiagnostic = nil + if !server.PollerResponderMore(beginGetNetworkConfigurationDiagnostic) { + w.beginGetNetworkConfigurationDiagnostic.remove(req) } return resp, nil @@ -477,7 +508,8 @@ func (w *WatchersServerTransport) dispatchBeginGetNextHop(req *http.Request) (*h if w.srv.BeginGetNextHop == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetNextHop not implemented")} } - if w.beginGetNextHop == nil { + beginGetNextHop := w.beginGetNextHop.get(req) + if beginGetNextHop == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/nextHop` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -500,19 +532,21 @@ func (w *WatchersServerTransport) dispatchBeginGetNextHop(req *http.Request) (*h if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetNextHop = &respr + beginGetNextHop = &respr + w.beginGetNextHop.add(req, beginGetNextHop) } - resp, err := server.PollerResponderNext(w.beginGetNextHop, req) + resp, err := server.PollerResponderNext(beginGetNextHop, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetNextHop.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetNextHop) { - w.beginGetNextHop = nil + if !server.PollerResponderMore(beginGetNextHop) { + w.beginGetNextHop.remove(req) } return resp, nil @@ -559,7 +593,8 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshooting(req *http.Requ if w.srv.BeginGetTroubleshooting == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetTroubleshooting not implemented")} } - if w.beginGetTroubleshooting == nil { + beginGetTroubleshooting := w.beginGetTroubleshooting.get(req) + if beginGetTroubleshooting == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/troubleshoot` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -582,19 +617,21 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshooting(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetTroubleshooting = &respr + beginGetTroubleshooting = &respr + w.beginGetTroubleshooting.add(req, beginGetTroubleshooting) } - resp, err := server.PollerResponderNext(w.beginGetTroubleshooting, req) + resp, err := server.PollerResponderNext(beginGetTroubleshooting, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetTroubleshooting.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetTroubleshooting) { - w.beginGetTroubleshooting = nil + if !server.PollerResponderMore(beginGetTroubleshooting) { + w.beginGetTroubleshooting.remove(req) } return resp, nil @@ -604,7 +641,8 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshootingResult(req *htt if w.srv.BeginGetTroubleshootingResult == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetTroubleshootingResult not implemented")} } - if w.beginGetTroubleshootingResult == nil { + beginGetTroubleshootingResult := w.beginGetTroubleshootingResult.get(req) + if beginGetTroubleshootingResult == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/queryTroubleshootResult` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -627,19 +665,21 @@ func (w *WatchersServerTransport) dispatchBeginGetTroubleshootingResult(req *htt if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetTroubleshootingResult = &respr + beginGetTroubleshootingResult = &respr + w.beginGetTroubleshootingResult.add(req, beginGetTroubleshootingResult) } - resp, err := server.PollerResponderNext(w.beginGetTroubleshootingResult, req) + resp, err := server.PollerResponderNext(beginGetTroubleshootingResult, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetTroubleshootingResult.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetTroubleshootingResult) { - w.beginGetTroubleshootingResult = nil + if !server.PollerResponderMore(beginGetTroubleshootingResult) { + w.beginGetTroubleshootingResult.remove(req) } return resp, nil @@ -649,7 +689,8 @@ func (w *WatchersServerTransport) dispatchBeginGetVMSecurityRules(req *http.Requ if w.srv.BeginGetVMSecurityRules == nil { return nil, &nonRetriableError{errors.New("fake for method BeginGetVMSecurityRules not implemented")} } - if w.beginGetVMSecurityRules == nil { + beginGetVMSecurityRules := w.beginGetVMSecurityRules.get(req) + if beginGetVMSecurityRules == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/securityGroupView` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -672,19 +713,21 @@ func (w *WatchersServerTransport) dispatchBeginGetVMSecurityRules(req *http.Requ if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginGetVMSecurityRules = &respr + beginGetVMSecurityRules = &respr + w.beginGetVMSecurityRules.add(req, beginGetVMSecurityRules) } - resp, err := server.PollerResponderNext(w.beginGetVMSecurityRules, req) + resp, err := server.PollerResponderNext(beginGetVMSecurityRules, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginGetVMSecurityRules.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginGetVMSecurityRules) { - w.beginGetVMSecurityRules = nil + if !server.PollerResponderMore(beginGetVMSecurityRules) { + w.beginGetVMSecurityRules.remove(req) } return resp, nil @@ -694,7 +737,8 @@ func (w *WatchersServerTransport) dispatchNewListPager(req *http.Request) (*http if w.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if w.newListPager == nil { + newListPager := w.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -706,17 +750,19 @@ func (w *WatchersServerTransport) dispatchNewListPager(req *http.Request) (*http return nil, err } resp := w.srv.NewListPager(resourceGroupNameUnescaped, nil) - w.newListPager = &resp + newListPager = &resp + w.newListPager.add(req, newListPager) } - resp, err := server.PagerResponderNext(w.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(w.newListPager) { - w.newListPager = nil + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) } return resp, nil } @@ -725,7 +771,8 @@ func (w *WatchersServerTransport) dispatchNewListAllPager(req *http.Request) (*h if w.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if w.newListAllPager == nil { + newListAllPager := w.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -733,17 +780,19 @@ func (w *WatchersServerTransport) dispatchNewListAllPager(req *http.Request) (*h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := w.srv.NewListAllPager(nil) - w.newListAllPager = &resp + newListAllPager = &resp + w.newListAllPager.add(req, newListAllPager) } - resp, err := server.PagerResponderNext(w.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(w.newListAllPager) { - w.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + w.newListAllPager.remove(req) } return resp, nil } @@ -752,7 +801,8 @@ func (w *WatchersServerTransport) dispatchBeginListAvailableProviders(req *http. if w.srv.BeginListAvailableProviders == nil { return nil, &nonRetriableError{errors.New("fake for method BeginListAvailableProviders not implemented")} } - if w.beginListAvailableProviders == nil { + beginListAvailableProviders := w.beginListAvailableProviders.get(req) + if beginListAvailableProviders == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/availableProvidersList` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -775,19 +825,21 @@ func (w *WatchersServerTransport) dispatchBeginListAvailableProviders(req *http. if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginListAvailableProviders = &respr + beginListAvailableProviders = &respr + w.beginListAvailableProviders.add(req, beginListAvailableProviders) } - resp, err := server.PollerResponderNext(w.beginListAvailableProviders, req) + resp, err := server.PollerResponderNext(beginListAvailableProviders, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginListAvailableProviders.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginListAvailableProviders) { - w.beginListAvailableProviders = nil + if !server.PollerResponderMore(beginListAvailableProviders) { + w.beginListAvailableProviders.remove(req) } return resp, nil @@ -797,7 +849,8 @@ func (w *WatchersServerTransport) dispatchBeginSetFlowLogConfiguration(req *http if w.srv.BeginSetFlowLogConfiguration == nil { return nil, &nonRetriableError{errors.New("fake for method BeginSetFlowLogConfiguration not implemented")} } - if w.beginSetFlowLogConfiguration == nil { + beginSetFlowLogConfiguration := w.beginSetFlowLogConfiguration.get(req) + if beginSetFlowLogConfiguration == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/configureFlowLog` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -820,19 +873,21 @@ func (w *WatchersServerTransport) dispatchBeginSetFlowLogConfiguration(req *http if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginSetFlowLogConfiguration = &respr + beginSetFlowLogConfiguration = &respr + w.beginSetFlowLogConfiguration.add(req, beginSetFlowLogConfiguration) } - resp, err := server.PollerResponderNext(w.beginSetFlowLogConfiguration, req) + resp, err := server.PollerResponderNext(beginSetFlowLogConfiguration, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginSetFlowLogConfiguration.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginSetFlowLogConfiguration) { - w.beginSetFlowLogConfiguration = nil + if !server.PollerResponderMore(beginSetFlowLogConfiguration) { + w.beginSetFlowLogConfiguration.remove(req) } return resp, nil @@ -879,7 +934,8 @@ func (w *WatchersServerTransport) dispatchBeginVerifyIPFlow(req *http.Request) ( if w.srv.BeginVerifyIPFlow == nil { return nil, &nonRetriableError{errors.New("fake for method BeginVerifyIPFlow not implemented")} } - if w.beginVerifyIPFlow == nil { + beginVerifyIPFlow := w.beginVerifyIPFlow.get(req) + if beginVerifyIPFlow == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/networkWatchers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/ipFlowVerify` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -902,19 +958,21 @@ func (w *WatchersServerTransport) dispatchBeginVerifyIPFlow(req *http.Request) ( if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginVerifyIPFlow = &respr + beginVerifyIPFlow = &respr + w.beginVerifyIPFlow.add(req, beginVerifyIPFlow) } - resp, err := server.PollerResponderNext(w.beginVerifyIPFlow, req) + resp, err := server.PollerResponderNext(beginVerifyIPFlow, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { + w.beginVerifyIPFlow.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginVerifyIPFlow) { - w.beginVerifyIPFlow = nil + if !server.PollerResponderMore(beginVerifyIPFlow) { + w.beginVerifyIPFlow.remove(req) } return resp, nil diff --git a/sdk/resourcemanager/network/armnetwork/fake/webapplicationfirewallpolicies_server.go b/sdk/resourcemanager/network/armnetwork/fake/webapplicationfirewallpolicies_server.go index 6ab4076efbcf..63bbff7f8b96 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/webapplicationfirewallpolicies_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/webapplicationfirewallpolicies_server.go @@ -46,19 +46,24 @@ type WebApplicationFirewallPoliciesServer struct { } // NewWebApplicationFirewallPoliciesServerTransport creates a new instance of WebApplicationFirewallPoliciesServerTransport with the provided implementation. -// The returned WebApplicationFirewallPoliciesServerTransport instance is connected to an instance of armnetwork.WebApplicationFirewallPoliciesClient by way of the -// undefined.Transporter field. +// The returned WebApplicationFirewallPoliciesServerTransport instance is connected to an instance of armnetwork.WebApplicationFirewallPoliciesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewWebApplicationFirewallPoliciesServerTransport(srv *WebApplicationFirewallPoliciesServer) *WebApplicationFirewallPoliciesServerTransport { - return &WebApplicationFirewallPoliciesServerTransport{srv: srv} + return &WebApplicationFirewallPoliciesServerTransport{ + srv: srv, + beginDelete: newTracker[azfake.PollerResponder[armnetwork.WebApplicationFirewallPoliciesClientDeleteResponse]](), + newListPager: newTracker[azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListResponse]](), + newListAllPager: newTracker[azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListAllResponse]](), + } } // WebApplicationFirewallPoliciesServerTransport connects instances of armnetwork.WebApplicationFirewallPoliciesClient to instances of WebApplicationFirewallPoliciesServer. // Don't use this type directly, use NewWebApplicationFirewallPoliciesServerTransport instead. type WebApplicationFirewallPoliciesServerTransport struct { srv *WebApplicationFirewallPoliciesServer - beginDelete *azfake.PollerResponder[armnetwork.WebApplicationFirewallPoliciesClientDeleteResponse] - newListPager *azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListResponse] - newListAllPager *azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListAllResponse] + beginDelete *tracker[azfake.PollerResponder[armnetwork.WebApplicationFirewallPoliciesClientDeleteResponse]] + newListPager *tracker[azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListResponse]] + newListAllPager *tracker[azfake.PagerResponder[armnetwork.WebApplicationFirewallPoliciesClientListAllResponse]] } // Do implements the policy.Transporter interface for WebApplicationFirewallPoliciesServerTransport. @@ -135,7 +140,8 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchBeginDelete(req if w.srv.BeginDelete == nil { return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} } - if w.beginDelete == nil { + beginDelete := w.beginDelete.get(req) + if beginDelete == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -154,19 +160,21 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchBeginDelete(req if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } - w.beginDelete = &respr + beginDelete = &respr + w.beginDelete.add(req, beginDelete) } - resp, err := server.PollerResponderNext(w.beginDelete, req) + resp, err := server.PollerResponderNext(beginDelete, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + w.beginDelete.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } - if !server.PollerResponderMore(w.beginDelete) { - w.beginDelete = nil + if !server.PollerResponderMore(beginDelete) { + w.beginDelete.remove(req) } return resp, nil @@ -209,7 +217,8 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListPager(req if w.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if w.newListPager == nil { + newListPager := w.newListPager.get(req) + if newListPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -221,20 +230,22 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListPager(req return nil, err } resp := w.srv.NewListPager(resourceGroupNameUnescaped, nil) - w.newListPager = &resp - server.PagerResponderInjectNextLinks(w.newListPager, req, func(page *armnetwork.WebApplicationFirewallPoliciesClientListResponse, createLink func() string) { + newListPager = &resp + w.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armnetwork.WebApplicationFirewallPoliciesClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(w.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(w.newListPager) { - w.newListPager = nil + if !server.PagerResponderMore(newListPager) { + w.newListPager.remove(req) } return resp, nil } @@ -243,7 +254,8 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListAllPager( if w.srv.NewListAllPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListAllPager not implemented")} } - if w.newListAllPager == nil { + newListAllPager := w.newListAllPager.get(req) + if newListAllPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -251,20 +263,22 @@ func (w *WebApplicationFirewallPoliciesServerTransport) dispatchNewListAllPager( return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := w.srv.NewListAllPager(nil) - w.newListAllPager = &resp - server.PagerResponderInjectNextLinks(w.newListAllPager, req, func(page *armnetwork.WebApplicationFirewallPoliciesClientListAllResponse, createLink func() string) { + newListAllPager = &resp + w.newListAllPager.add(req, newListAllPager) + server.PagerResponderInjectNextLinks(newListAllPager, req, func(page *armnetwork.WebApplicationFirewallPoliciesClientListAllResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(w.newListAllPager, req) + resp, err := server.PagerResponderNext(newListAllPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListAllPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(w.newListAllPager) { - w.newListAllPager = nil + if !server.PagerResponderMore(newListAllPager) { + w.newListAllPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/fake/webcategories_server.go b/sdk/resourcemanager/network/armnetwork/fake/webcategories_server.go index 676b2fdd05c8..41e45d1c0a7e 100644 --- a/sdk/resourcemanager/network/armnetwork/fake/webcategories_server.go +++ b/sdk/resourcemanager/network/armnetwork/fake/webcategories_server.go @@ -34,17 +34,20 @@ type WebCategoriesServer struct { } // NewWebCategoriesServerTransport creates a new instance of WebCategoriesServerTransport with the provided implementation. -// The returned WebCategoriesServerTransport instance is connected to an instance of armnetwork.WebCategoriesClient by way of the -// undefined.Transporter field. +// The returned WebCategoriesServerTransport instance is connected to an instance of armnetwork.WebCategoriesClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewWebCategoriesServerTransport(srv *WebCategoriesServer) *WebCategoriesServerTransport { - return &WebCategoriesServerTransport{srv: srv} + return &WebCategoriesServerTransport{ + srv: srv, + newListBySubscriptionPager: newTracker[azfake.PagerResponder[armnetwork.WebCategoriesClientListBySubscriptionResponse]](), + } } // WebCategoriesServerTransport connects instances of armnetwork.WebCategoriesClient to instances of WebCategoriesServer. // Don't use this type directly, use NewWebCategoriesServerTransport instead. type WebCategoriesServerTransport struct { srv *WebCategoriesServer - newListBySubscriptionPager *azfake.PagerResponder[armnetwork.WebCategoriesClientListBySubscriptionResponse] + newListBySubscriptionPager *tracker[azfake.PagerResponder[armnetwork.WebCategoriesClientListBySubscriptionResponse]] } // Do implements the policy.Transporter interface for WebCategoriesServerTransport. @@ -119,7 +122,8 @@ func (w *WebCategoriesServerTransport) dispatchNewListBySubscriptionPager(req *h if w.srv.NewListBySubscriptionPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListBySubscriptionPager not implemented")} } - if w.newListBySubscriptionPager == nil { + newListBySubscriptionPager := w.newListBySubscriptionPager.get(req) + if newListBySubscriptionPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft.Network/azureWebCategories` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -127,20 +131,22 @@ func (w *WebCategoriesServerTransport) dispatchNewListBySubscriptionPager(req *h return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } resp := w.srv.NewListBySubscriptionPager(nil) - w.newListBySubscriptionPager = &resp - server.PagerResponderInjectNextLinks(w.newListBySubscriptionPager, req, func(page *armnetwork.WebCategoriesClientListBySubscriptionResponse, createLink func() string) { + newListBySubscriptionPager = &resp + w.newListBySubscriptionPager.add(req, newListBySubscriptionPager) + server.PagerResponderInjectNextLinks(newListBySubscriptionPager, req, func(page *armnetwork.WebCategoriesClientListBySubscriptionResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(w.newListBySubscriptionPager, req) + resp, err := server.PagerResponderNext(newListBySubscriptionPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + w.newListBySubscriptionPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(w.newListBySubscriptionPager) { - w.newListBySubscriptionPager = nil + if !server.PagerResponderMore(newListBySubscriptionPager) { + w.newListBySubscriptionPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/network/armnetwork/go.mod b/sdk/resourcemanager/network/armnetwork/go.mod index d92a79e85611..4d42521eb992 100644 --- a/sdk/resourcemanager/network/armnetwork/go.mod +++ b/sdk/resourcemanager/network/armnetwork/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/ go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.8.2 diff --git a/sdk/resourcemanager/network/armnetwork/go.sum b/sdk/resourcemanager/network/armnetwork/go.sum index 7cbb704590fa..a114460768a2 100644 --- a/sdk/resourcemanager/network/armnetwork/go.sum +++ b/sdk/resourcemanager/network/armnetwork/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 h1:C3zKsGguxcLd8a2uEytB8+TFtBGd75bXRxEs0QBwsv0= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 h1:8t6ZZtkOCl+rx7uBn40Nj62ABVGkXK69U/En44wJIlE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 h1:uqM+VoHjVH6zdlkLF2b6O0ZANcHoj3rO0PoQ3jglUJA= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2/go.mod h1:twTKAa1E6hLmSDjLhaCkbTMQKc7p/rNLU40rLxGEOCI= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= diff --git a/sdk/resourcemanager/network/armnetwork/interfaces.go b/sdk/resourcemanager/network/armnetwork/interfaces.go new file mode 100644 index 000000000000..a153dd5768ce --- /dev/null +++ b/sdk/resourcemanager/network/armnetwork/interfaces.go @@ -0,0 +1,54 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +// ActiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetActiveBaseSecurityAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ActiveBaseSecurityAdminRule, *ActiveDefaultSecurityAdminRule, *ActiveSecurityAdminRule +type ActiveBaseSecurityAdminRuleClassification interface { + // GetActiveBaseSecurityAdminRule returns the ActiveBaseSecurityAdminRule content of the underlying type. + GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule +} + +// BaseAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetBaseAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *AdminRule, *BaseAdminRule, *DefaultAdminRule +type BaseAdminRuleClassification interface { + // GetBaseAdminRule returns the BaseAdminRule content of the underlying type. + GetBaseAdminRule() *BaseAdminRule +} + +// EffectiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. +// Call the interface's GetEffectiveBaseSecurityAdminRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *EffectiveBaseSecurityAdminRule, *EffectiveDefaultSecurityAdminRule, *EffectiveSecurityAdminRule +type EffectiveBaseSecurityAdminRuleClassification interface { + // GetEffectiveBaseSecurityAdminRule returns the EffectiveBaseSecurityAdminRule content of the underlying type. + GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule +} + +// FirewallPolicyRuleClassification provides polymorphic access to related types. +// Call the interface's GetFirewallPolicyRule() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *ApplicationRule, *FirewallPolicyRule, *NatRule, *Rule +type FirewallPolicyRuleClassification interface { + // GetFirewallPolicyRule returns the FirewallPolicyRule content of the underlying type. + GetFirewallPolicyRule() *FirewallPolicyRule +} + +// FirewallPolicyRuleCollectionClassification provides polymorphic access to related types. +// Call the interface's GetFirewallPolicyRuleCollection() method to access the common type. +// Use a type switch to determine the concrete type. The possible types are: +// - *FirewallPolicyFilterRuleCollection, *FirewallPolicyNatRuleCollection, *FirewallPolicyRuleCollection +type FirewallPolicyRuleCollectionClassification interface { + // GetFirewallPolicyRuleCollection returns the FirewallPolicyRuleCollection content of the underlying type. + GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection +} diff --git a/sdk/resourcemanager/network/armnetwork/models.go b/sdk/resourcemanager/network/armnetwork/models.go index 1e17d40ca332..95d915b1f461 100644 --- a/sdk/resourcemanager/network/armnetwork/models.go +++ b/sdk/resourcemanager/network/armnetwork/models.go @@ -32,15 +32,6 @@ type Action struct { Type *RouteMapActionType } -// ActiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetActiveBaseSecurityAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ActiveBaseSecurityAdminRule, *ActiveDefaultSecurityAdminRule, *ActiveSecurityAdminRule -type ActiveBaseSecurityAdminRuleClassification interface { - // GetActiveBaseSecurityAdminRule returns the ActiveBaseSecurityAdminRule content of the underlying type. - GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule -} - // ActiveBaseSecurityAdminRule - Network base admin rule. type ActiveBaseSecurityAdminRule struct { // REQUIRED; Whether the rule is custom or default. @@ -145,14 +136,14 @@ type ActiveDefaultSecurityAdminRule struct { // GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveDefaultSecurityAdminRule. func (a *ActiveDefaultSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { return &ActiveBaseSecurityAdminRule{ - ID: a.ID, CommitTime: a.CommitTime, - Region: a.Region, ConfigurationDescription: a.ConfigurationDescription, - RuleCollectionDescription: a.RuleCollectionDescription, + ID: a.ID, + Kind: a.Kind, + Region: a.Region, RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, + RuleCollectionDescription: a.RuleCollectionDescription, RuleGroups: a.RuleGroups, - Kind: a.Kind, } } @@ -189,14 +180,14 @@ type ActiveSecurityAdminRule struct { // GetActiveBaseSecurityAdminRule implements the ActiveBaseSecurityAdminRuleClassification interface for type ActiveSecurityAdminRule. func (a *ActiveSecurityAdminRule) GetActiveBaseSecurityAdminRule() *ActiveBaseSecurityAdminRule { return &ActiveBaseSecurityAdminRule{ - ID: a.ID, CommitTime: a.CommitTime, - Region: a.Region, ConfigurationDescription: a.ConfigurationDescription, - RuleCollectionDescription: a.RuleCollectionDescription, + ID: a.ID, + Kind: a.Kind, + Region: a.Region, RuleCollectionAppliesToGroups: a.RuleCollectionAppliesToGroups, + RuleCollectionDescription: a.RuleCollectionDescription, RuleGroups: a.RuleGroups, - Kind: a.Kind, } } @@ -287,12 +278,12 @@ type AdminRule struct { // GetBaseAdminRule implements the BaseAdminRuleClassification interface for type AdminRule. func (a *AdminRule) GetBaseAdminRule() *BaseAdminRule { return &BaseAdminRule{ - Kind: a.Kind, - SystemData: a.SystemData, + Etag: a.Etag, ID: a.ID, + Kind: a.Kind, Name: a.Name, + SystemData: a.SystemData, Type: a.Type, - Etag: a.Etag, } } @@ -338,38 +329,6 @@ type AdminRuleCollectionPropertiesFormat struct { ProvisioningState *ProvisioningState } -// AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete -// method. -type AdminRuleCollectionsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate -// method. -type AdminRuleCollectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get method. -type AdminRuleCollectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager -// method. -type AdminRuleCollectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // AdminRuleListResult - security configuration admin rule list result. type AdminRuleListResult struct { // The URL to get the next set of results. @@ -379,35 +338,6 @@ type AdminRuleListResult struct { Value []BaseAdminRuleClassification } -// AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. -type AdminRulesClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate method. -type AdminRulesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. -type AdminRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. -type AdminRulesClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // ApplicationGateway - Application gateway resource. type ApplicationGateway struct { // Resource ID. @@ -1247,32 +1177,6 @@ type ApplicationGatewayPrivateEndpointConnectionProperties struct { ProvisioningState *ProvisioningState } -// ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager -// method. -type ApplicationGatewayPrivateEndpointConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // ApplicationGatewayPrivateLinkConfiguration - Private Link Configuration on an application gateway. type ApplicationGatewayPrivateLinkConfiguration struct { // Resource ID. @@ -1376,12 +1280,6 @@ type ApplicationGatewayPrivateLinkResourceProperties struct { RequiredMembers []*string } -// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager -// method. -type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { - // placeholder for future optional parameters -} - // ApplicationGatewayProbe - Probe of the application gateway. type ApplicationGatewayProbe struct { // Resource ID. @@ -2042,18 +1940,6 @@ type ApplicationGatewayWafDynamicManifestResultList struct { Value []*ApplicationGatewayWafDynamicManifestResult } -// ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager -// method. -type ApplicationGatewayWafDynamicManifestsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get -// method. -type ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions struct { - // placeholder for future optional parameters -} - // ApplicationGatewayWebApplicationFirewallConfiguration - Application gateway web application firewall configuration. type ApplicationGatewayWebApplicationFirewallConfiguration struct { // REQUIRED; Whether the web application firewall is enabled or not. @@ -2087,116 +1973,6 @@ type ApplicationGatewayWebApplicationFirewallConfiguration struct { RequestBodyCheck *bool } -// ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand -// method. -type ApplicationGatewaysClientBeginBackendHealthOnDemandOptions struct { - // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - Expand *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth -// method. -type ApplicationGatewaysClientBeginBackendHealthOptions struct { - // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - Expand *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate -// method. -type ApplicationGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete -// method. -type ApplicationGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart -// method. -type ApplicationGatewaysClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop -// method. -type ApplicationGatewaysClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. -type ApplicationGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy -// method. -type ApplicationGatewaysClientGetSSLPredefinedPolicyOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager -// method. -type ApplicationGatewaysClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders -// method. -type ApplicationGatewaysClientListAvailableRequestHeadersOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders -// method. -type ApplicationGatewaysClientListAvailableResponseHeadersOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions -// method. -type ApplicationGatewaysClientListAvailableSSLOptionsOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager -// method. -type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables -// method. -type ApplicationGatewaysClientListAvailableServerVariablesOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets -// method. -type ApplicationGatewaysClientListAvailableWafRuleSetsOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager method. -type ApplicationGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags -// method. -type ApplicationGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ApplicationRule - Rule of type application. type ApplicationRule struct { // REQUIRED; Rule Type. @@ -2242,8 +2018,8 @@ type ApplicationRule struct { // GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type ApplicationRule. func (a *ApplicationRule) GetFirewallPolicyRule() *FirewallPolicyRule { return &FirewallPolicyRule{ - Name: a.Name, Description: a.Description, + Name: a.Name, RuleType: a.RuleType, } } @@ -2292,44 +2068,6 @@ type ApplicationSecurityGroupPropertiesFormat struct { ResourceGUID *string } -// ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate -// method. -type ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete -// method. -type ApplicationSecurityGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get -// method. -type ApplicationSecurityGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager -// method. -type ApplicationSecurityGroupsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager -// method. -type ApplicationSecurityGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags -// method. -type ApplicationSecurityGroupsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // AuthorizationListResult - Response for ListAuthorizations API service call retrieves all authorizations that belongs to // an ExpressRouteCircuit. type AuthorizationListResult struct { @@ -2398,12 +2136,6 @@ type AvailableDelegation struct { Type *string } -// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager -// method. -type AvailableDelegationsClientListOptions struct { - // placeholder for future optional parameters -} - // AvailableDelegationsResult - An array of available delegations. type AvailableDelegationsResult struct { // An array of available delegations. @@ -2413,12 +2145,6 @@ type AvailableDelegationsResult struct { NextLink *string } -// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager -// method. -type AvailableEndpointServicesClientListOptions struct { - // placeholder for future optional parameters -} - // AvailablePrivateEndpointType - The information of an AvailablePrivateEndpointType. type AvailablePrivateEndpointType struct { // Display name of the resource. @@ -2437,18 +2163,6 @@ type AvailablePrivateEndpointType struct { Type *string } -// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager -// method. -type AvailablePrivateEndpointTypesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager -// method. -type AvailablePrivateEndpointTypesClientListOptions struct { - // placeholder for future optional parameters -} - // AvailablePrivateEndpointTypesResult - An array of available PrivateEndpoint types. type AvailablePrivateEndpointTypesResult struct { // An array of available privateEndpoint type. @@ -2512,12 +2226,6 @@ type AvailableProvidersListState struct { StateName *string } -// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager -// method. -type AvailableResourceGroupDelegationsClientListOptions struct { - // placeholder for future optional parameters -} - // AvailableServiceAlias - The available service alias. type AvailableServiceAlias struct { // The ID of the service alias. @@ -2533,18 +2241,6 @@ type AvailableServiceAlias struct { Type *string } -// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager -// method. -type AvailableServiceAliasesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager -// method. -type AvailableServiceAliasesClientListOptions struct { - // placeholder for future optional parameters -} - // AvailableServiceAliasesResult - An array of available service aliases. type AvailableServiceAliasesResult struct { // An array of available service aliases. @@ -2700,12 +2396,6 @@ type AzureFirewallFqdnTagPropertiesFormat struct { ProvisioningState *ProvisioningState } -// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager -// method. -type AzureFirewallFqdnTagsClientListAllOptions struct { - // placeholder for future optional parameters -} - // AzureFirewallIPConfiguration - IP configuration of an Azure Firewall. type AzureFirewallIPConfiguration struct { // Resource ID. @@ -2967,55 +2657,6 @@ type AzureFirewallSKU struct { Tier *AzureFirewallSKUTier } -// AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate -// method. -type AzureFirewallsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete method. -type AzureFirewallsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes -// method. -type AzureFirewallsClientBeginListLearnedPrefixesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginPacketCaptureOptions contains the optional parameters for the AzureFirewallsClient.BeginPacketCapture -// method. -type AzureFirewallsClientBeginPacketCaptureOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags -// method. -type AzureFirewallsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. -type AzureFirewallsClientGetOptions struct { - // placeholder for future optional parameters -} - -// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager method. -type AzureFirewallsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. -type AzureFirewallsClientListOptions struct { - // placeholder for future optional parameters -} - // AzureReachabilityReport - Azure reachability report details. type AzureReachabilityReport struct { // REQUIRED; The aggregation level of Azure reachability report. Can be Country, State or City. @@ -3194,15 +2835,6 @@ type BackendAddressPoolPropertiesFormat struct { ProvisioningState *ProvisioningState } -// BaseAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetBaseAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *AdminRule, *BaseAdminRule, *DefaultAdminRule -type BaseAdminRuleClassification interface { - // GetBaseAdminRule returns the BaseAdminRule content of the underlying type. - GetBaseAdminRule() *BaseAdminRule -} - // BaseAdminRule - Network base admin rule. type BaseAdminRule struct { // REQUIRED; Whether the rule is custom or default. @@ -3374,41 +3006,6 @@ type BastionHostPropertiesFormat struct { ProvisioningState *ProvisioningState } -// BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate -// method. -type BastionHostsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete method. -type BastionHostsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags method. -type BastionHostsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. -type BastionHostsClientGetOptions struct { - // placeholder for future optional parameters -} - -// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager -// method. -type BastionHostsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. -type BastionHostsClientListOptions struct { - // placeholder for future optional parameters -} - // BastionSessionDeleteResult - Response for DisconnectActiveSessions. type BastionSessionDeleteResult struct { // The URL to get the next set of results. @@ -3529,12 +3126,6 @@ type BgpPeerStatusListResult struct { Value []*BgpPeerStatus } -// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager -// method. -type BgpServiceCommunitiesClientListOptions struct { - // placeholder for future optional parameters -} - // BgpServiceCommunity - Service Community Properties. type BgpServiceCommunity struct { // Resource ID. @@ -3685,32 +3276,6 @@ type ConfigurationGroup struct { Properties *GroupProperties } -// ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate -// method. -type ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete -// method. -type ConfigurationPolicyGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get -// method. -type ConfigurationPolicyGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager -// method. -type ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions struct { - // placeholder for future optional parameters -} - // ConnectionMonitor - Parameters that define the operation to create a connection monitor. type ConnectionMonitor struct { // REQUIRED; Properties of the connection monitor. @@ -4021,58 +3586,6 @@ type ConnectionMonitorWorkspaceSettings struct { WorkspaceResourceID *string } -// ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate -// method. -type ConnectionMonitorsClientBeginCreateOrUpdateOptions struct { - // Value indicating whether connection monitor V1 should be migrated to V2 format. - Migrate *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete -// method. -type ConnectionMonitorsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery -// method. -type ConnectionMonitorsClientBeginQueryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart -// method. -type ConnectionMonitorsClientBeginStartOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop method. -type ConnectionMonitorsClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. -type ConnectionMonitorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager method. -type ConnectionMonitorsClientListOptions struct { - // placeholder for future optional parameters -} - -// ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags -// method. -type ConnectionMonitorsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ConnectionResetSharedKey - The virtual network connection reset shared key. type ConnectionResetSharedKey struct { // REQUIRED; The virtual network connection reset shared key length, should between 1 and 128. @@ -4176,39 +3689,6 @@ type ConnectivityConfigurationProperties struct { ProvisioningState *ProvisioningState } -// ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete -// method. -type ConnectivityConfigurationsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate -// method. -type ConnectivityConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get -// method. -type ConnectivityConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager -// method. -type ConnectivityConfigurationsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // ConnectivityDestination - Parameters that define destination of connection. type ConnectivityDestination struct { // The IP address or URI the resource to which a connection attempt will be made. @@ -4545,40 +4025,6 @@ type CustomIPPrefixPropertiesFormat struct { ResourceGUID *string } -// CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate -// method. -type CustomIPPrefixesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete method. -type CustomIPPrefixesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. -type CustomIPPrefixesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager method. -type CustomIPPrefixesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager method. -type CustomIPPrefixesClientListOptions struct { - // placeholder for future optional parameters -} - -// CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags method. -type CustomIPPrefixesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // DNSNameAvailabilityResult - Response for the CheckDnsNameAvailability API service call. type DNSNameAvailabilityResult struct { // Domain availability (True/False). @@ -4597,31 +4043,6 @@ type DNSSettings struct { Servers []*string } -// DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate -// method. -type DdosCustomPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete -// method. -type DdosCustomPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. -type DdosCustomPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags -// method. -type DdosCustomPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // DdosCustomPolicy - A DDoS custom policy in a resource group. type DdosCustomPolicy struct { // Resource ID. @@ -4705,42 +4126,6 @@ type DdosProtectionPlanPropertiesFormat struct { VirtualNetworks []*SubResource } -// DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate -// method. -type DdosProtectionPlansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete -// method. -type DdosProtectionPlansClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. -type DdosProtectionPlansClientGetOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager -// method. -type DdosProtectionPlansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager method. -type DdosProtectionPlansClientListOptions struct { - // placeholder for future optional parameters -} - -// DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags -// method. -type DdosProtectionPlansClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // DdosSettings - Contains the DDoS protection settings of the public IP. type DdosSettings struct { // The DDoS protection plan associated with the public IP. Can only be set if ProtectionMode is Enabled @@ -4814,12 +4199,12 @@ type DefaultAdminRule struct { // GetBaseAdminRule implements the BaseAdminRuleClassification interface for type DefaultAdminRule. func (d *DefaultAdminRule) GetBaseAdminRule() *BaseAdminRule { return &BaseAdminRule{ - Kind: d.Kind, - SystemData: d.SystemData, + Etag: d.Etag, ID: d.ID, + Kind: d.Kind, Name: d.Name, + SystemData: d.SystemData, Type: d.Type, - Etag: d.Etag, } } @@ -4832,17 +4217,6 @@ type DefaultRuleSetPropertyFormat struct { RuleSetVersion *string } -// DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get method. -type DefaultSecurityRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager -// method. -type DefaultSecurityRulesClientListOptions struct { - // placeholder for future optional parameters -} - // Delegation - Details the service to which the subnet is delegated. type Delegation struct { // Resource ID. @@ -4925,36 +4299,6 @@ type DscpConfiguration struct { Type *string } -// DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate -// method. -type DscpConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete -// method. -type DscpConfigurationClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. -type DscpConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager -// method. -type DscpConfigurationClientListAllOptions struct { - // placeholder for future optional parameters -} - -// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager method. -type DscpConfigurationClientListOptions struct { - // placeholder for future optional parameters -} - // DscpConfigurationListResult - Response for the DscpConfigurationList API service call. type DscpConfigurationListResult struct { // A list of dscp configurations in a resource group. @@ -5000,15 +4344,6 @@ type DscpConfigurationPropertiesFormat struct { ResourceGUID *string } -// EffectiveBaseSecurityAdminRuleClassification provides polymorphic access to related types. -// Call the interface's GetEffectiveBaseSecurityAdminRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *EffectiveBaseSecurityAdminRule, *EffectiveDefaultSecurityAdminRule, *EffectiveSecurityAdminRule -type EffectiveBaseSecurityAdminRuleClassification interface { - // GetEffectiveBaseSecurityAdminRule returns the EffectiveBaseSecurityAdminRule content of the underlying type. - GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule -} - // EffectiveBaseSecurityAdminRule - Network base admin rule. type EffectiveBaseSecurityAdminRule struct { // REQUIRED; Whether the rule is custom or default. @@ -5074,12 +4409,12 @@ type EffectiveDefaultSecurityAdminRule struct { // GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveDefaultSecurityAdminRule. func (e *EffectiveDefaultSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { return &EffectiveBaseSecurityAdminRule{ - ID: e.ID, ConfigurationDescription: e.ConfigurationDescription, - RuleCollectionDescription: e.RuleCollectionDescription, + ID: e.ID, + Kind: e.Kind, RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, + RuleCollectionDescription: e.RuleCollectionDescription, RuleGroups: e.RuleGroups, - Kind: e.Kind, } } @@ -5259,12 +4594,12 @@ type EffectiveSecurityAdminRule struct { // GetEffectiveBaseSecurityAdminRule implements the EffectiveBaseSecurityAdminRuleClassification interface for type EffectiveSecurityAdminRule. func (e *EffectiveSecurityAdminRule) GetEffectiveBaseSecurityAdminRule() *EffectiveBaseSecurityAdminRule { return &EffectiveBaseSecurityAdminRule{ - ID: e.ID, ConfigurationDescription: e.ConfigurationDescription, - RuleCollectionDescription: e.RuleCollectionDescription, + ID: e.ID, + Kind: e.Kind, RuleCollectionAppliesToGroups: e.RuleCollectionAppliesToGroups, + RuleCollectionDescription: e.RuleCollectionDescription, RuleGroups: e.RuleGroups, - Kind: e.Kind, } } @@ -5448,36 +4783,10 @@ type ExpressRouteCircuitAuthorization struct { Type *string } -// ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete -// method. -type ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get -// method. -type ExpressRouteCircuitAuthorizationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager -// method. -type ExpressRouteCircuitAuthorizationsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitConnection - Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. -type ExpressRouteCircuitConnection struct { - // Resource ID. - ID *string +// ExpressRouteCircuitConnection - Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. +type ExpressRouteCircuitConnection struct { + // Resource ID. + ID *string // The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string @@ -5526,32 +4835,6 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete -// method. -type ExpressRouteCircuitConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get -// method. -type ExpressRouteCircuitConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager -// method. -type ExpressRouteCircuitConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCircuitListResult - Response for ListExpressRouteCircuit API service call. type ExpressRouteCircuitListResult struct { // The URL to get the next set of results. @@ -5679,32 +4962,6 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete -// method. -type ExpressRouteCircuitPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get -// method. -type ExpressRouteCircuitPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager -// method. -type ExpressRouteCircuitPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCircuitPropertiesFormat - Properties of ExpressRouteCircuit. type ExpressRouteCircuitPropertiesFormat struct { // Allow classic operations. @@ -5847,76 +5104,6 @@ type ExpressRouteCircuitsArpTableListResult struct { Value []*ExpressRouteCircuitArpTable } -// ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCircuitsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete -// method. -type ExpressRouteCircuitsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable -// method. -type ExpressRouteCircuitsClientBeginListArpTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable -// method. -type ExpressRouteCircuitsClientBeginListRoutesTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary -// method. -type ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get method. -type ExpressRouteCircuitsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats -// method. -type ExpressRouteCircuitsClientGetPeeringStatsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats -// method. -type ExpressRouteCircuitsClientGetStatsOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager -// method. -type ExpressRouteCircuitsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager -// method. -type ExpressRouteCircuitsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags -// method. -type ExpressRouteCircuitsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCircuitsRoutesTableListResult - Response for ListRoutesTable associated with the Express Route Circuits API. type ExpressRouteCircuitsRoutesTableListResult struct { // The URL to get the next set of results. @@ -5988,30 +5175,6 @@ type ExpressRouteConnectionProperties struct { ProvisioningState *ProvisioningState } -// ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete -// method. -type ExpressRouteConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get method. -type ExpressRouteConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List method. -type ExpressRouteConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCrossConnection resource. type ExpressRouteCrossConnection struct { // Resource ID. @@ -6118,32 +5281,6 @@ type ExpressRouteCrossConnectionPeeringProperties struct { SecondaryAzurePort *string } -// ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete -// method. -type ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get -// method. -type ExpressRouteCrossConnectionPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager -// method. -type ExpressRouteCrossConnectionPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCrossConnectionProperties - Properties of ExpressRouteCrossConnection. type ExpressRouteCrossConnectionProperties struct { // The ExpressRouteCircuit. @@ -6193,58 +5330,6 @@ type ExpressRouteCrossConnectionRoutesTableSummary struct { UpDown *string } -// ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate -// method. -type ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable -// method. -type ExpressRouteCrossConnectionsClientBeginListArpTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable -// method. -type ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary -// method. -type ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get -// method. -type ExpressRouteCrossConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager -// method. -type ExpressRouteCrossConnectionsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager -// method. -type ExpressRouteCrossConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags -// method. -type ExpressRouteCrossConnectionsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteCrossConnectionsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route // Cross Connections. type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { @@ -6318,44 +5403,6 @@ type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { Min *int32 } -// ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate -// method. -type ExpressRouteGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete -// method. -type ExpressRouteGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags -// method. -type ExpressRouteGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get method. -type ExpressRouteGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup -// method. -type ExpressRouteGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription -// method. -type ExpressRouteGatewaysClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteLink child resource definition. type ExpressRouteLink struct { // Resource ID. @@ -6425,16 +5472,6 @@ type ExpressRouteLinkPropertiesFormat struct { RouterName *string } -// ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. -type ExpressRouteLinksClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager method. -type ExpressRouteLinksClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRoutePort resource definition. type ExpressRoutePort struct { // Resource ID. @@ -6504,32 +5541,6 @@ type ExpressRoutePortAuthorizationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate -// method. -type ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete -// method. -type ExpressRoutePortAuthorizationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get -// method. -type ExpressRoutePortAuthorizationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager -// method. -type ExpressRoutePortAuthorizationsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRoutePortListResult - Response for ListExpressRoutePorts API service call. type ExpressRoutePortListResult struct { // The URL to get the next set of results. @@ -6578,47 +5589,6 @@ type ExpressRoutePortPropertiesFormat struct { ResourceGUID *string } -// ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate -// method. -type ExpressRoutePortsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete -// method. -type ExpressRoutePortsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA -// method. -type ExpressRoutePortsClientGenerateLOAOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. -type ExpressRoutePortsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager -// method. -type ExpressRoutePortsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager method. -type ExpressRoutePortsClientListOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags method. -type ExpressRoutePortsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ExpressRoutePortsLocation - Definition of the ExpressRoutePorts peering location resource. type ExpressRoutePortsLocation struct { // Resource ID. @@ -6673,18 +5643,6 @@ type ExpressRoutePortsLocationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get -// method. -type ExpressRoutePortsLocationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager -// method. -type ExpressRoutePortsLocationsClientListOptions struct { - // placeholder for future optional parameters -} - // ExpressRouteProviderPort resource. type ExpressRouteProviderPort struct { // Resource ID. @@ -6745,13 +5703,6 @@ type ExpressRouteProviderPortProperties struct { SecondaryAzurePort *string } -// ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List -// method. -type ExpressRouteProviderPortsLocationClientListOptions struct { - // The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. - Filter *string -} - // ExpressRouteServiceProvider - A ExpressRouteResourceProvider object. type ExpressRouteServiceProvider struct { // Resource ID. @@ -6803,12 +5754,6 @@ type ExpressRouteServiceProviderPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager -// method. -type ExpressRouteServiceProvidersClientListOptions struct { - // placeholder for future optional parameters -} - // ExtendedLocation complex type. type ExtendedLocation struct { // The name of the extended location. @@ -6860,40 +5805,6 @@ type FirewallPacketCaptureParametersFormat struct { SasURL *string } -// FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate -// method. -type FirewallPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete method. -type FirewallPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. -type FirewallPoliciesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager method. -type FirewallPoliciesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager method. -type FirewallPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags method. -type FirewallPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // FirewallPolicy Resource. type FirewallPolicy struct { // Resource ID. @@ -6951,9 +5862,9 @@ type FirewallPolicyFilterRuleCollection struct { // GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyFilterRuleCollection. func (f *FirewallPolicyFilterRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, Name: f.Name, Priority: f.Priority, + RuleCollectionType: f.RuleCollectionType, } } @@ -6972,42 +5883,6 @@ type FirewallPolicyHTTPHeaderToInsert struct { HeaderValue *string } -// FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List -// method. -type FirewallPolicyIdpsSignaturesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List -// method. -type FirewallPolicyIdpsSignaturesFilterValuesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get -// method. -type FirewallPolicyIdpsSignaturesOverridesClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List -// method. -type FirewallPolicyIdpsSignaturesOverridesClientListOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch -// method. -type FirewallPolicyIdpsSignaturesOverridesClientPatchOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put -// method. -type FirewallPolicyIdpsSignaturesOverridesClientPutOptions struct { - // placeholder for future optional parameters -} - // FirewallPolicyInsights - Firewall Policy Insights. type FirewallPolicyInsights struct { // A flag to indicate if the insights are enabled on the policy. @@ -7127,9 +6002,9 @@ type FirewallPolicyNatRuleCollection struct { // GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyNatRuleCollection. func (f *FirewallPolicyNatRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, Name: f.Name, Priority: f.Priority, + RuleCollectionType: f.RuleCollectionType, } } @@ -7187,15 +6062,6 @@ type FirewallPolicyPropertiesFormat struct { RuleCollectionGroups []*SubResource } -// FirewallPolicyRuleClassification provides polymorphic access to related types. -// Call the interface's GetFirewallPolicyRule() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *ApplicationRule, *FirewallPolicyRule, *NatRule, *Rule -type FirewallPolicyRuleClassification interface { - // GetFirewallPolicyRule returns the FirewallPolicyRule content of the underlying type. - GetFirewallPolicyRule() *FirewallPolicyRule -} - // FirewallPolicyRule - Properties of a rule. type FirewallPolicyRule struct { // REQUIRED; Rule Type. @@ -7220,15 +6086,6 @@ type FirewallPolicyRuleApplicationProtocol struct { ProtocolType *FirewallPolicyRuleApplicationProtocolType } -// FirewallPolicyRuleCollectionClassification provides polymorphic access to related types. -// Call the interface's GetFirewallPolicyRuleCollection() method to access the common type. -// Use a type switch to determine the concrete type. The possible types are: -// - *FirewallPolicyFilterRuleCollection, *FirewallPolicyNatRuleCollection, *FirewallPolicyRuleCollection -type FirewallPolicyRuleCollectionClassification interface { - // GetFirewallPolicyRuleCollection returns the FirewallPolicyRuleCollection content of the underlying type. - GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection -} - // FirewallPolicyRuleCollection - Properties of the rule collection. type FirewallPolicyRuleCollection struct { // REQUIRED; The type of the rule collection. @@ -7285,32 +6142,6 @@ type FirewallPolicyRuleCollectionGroupProperties struct { ProvisioningState *ProvisioningState } -// FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate -// method. -type FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete -// method. -type FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get -// method. -type FirewallPolicyRuleCollectionGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager -// method. -type FirewallPolicyRuleCollectionGroupsClientListOptions struct { - // placeholder for future optional parameters -} - // FirewallPolicySKU - SKU of Firewall policy. type FirewallPolicySKU struct { // Tier of Firewall Policy. @@ -7449,33 +6280,6 @@ type FlowLogStatusParameters struct { TargetResourceID *string } -// FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate method. -type FlowLogsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. -type FlowLogsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. -type FlowLogsClientGetOptions struct { - // placeholder for future optional parameters -} - -// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. -type FlowLogsClientListOptions struct { - // placeholder for future optional parameters -} - -// FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. -type FlowLogsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // FrontendIPConfiguration - Frontend IP address of the load balancer. type FrontendIPConfiguration struct { // Resource ID. @@ -7684,37 +6488,6 @@ type GroupProperties struct { ProvisioningState *ProvisioningState } -// GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. -type GroupsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. -type GroupsClientCreateOrUpdateOptions struct { - // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value - // to prevent accidentally overwriting concurrent changes. - IfMatch *string -} - -// GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. -type GroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. -type GroupsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // HTTPConfiguration - HTTP configuration of the connectivity check. type HTTPConfiguration struct { // List of HTTP headers. @@ -7886,29 +6659,6 @@ type HubRouteTableProperties struct { ProvisioningState *ProvisioningState } -// HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate -// method. -type HubRouteTablesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete method. -type HubRouteTablesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. -type HubRouteTablesClientGetOptions struct { - // placeholder for future optional parameters -} - -// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. -type HubRouteTablesClientListOptions struct { - // placeholder for future optional parameters -} - // HubVirtualNetworkConnection Resource. type HubVirtualNetworkConnection struct { // Resource ID. @@ -7945,32 +6695,6 @@ type HubVirtualNetworkConnectionProperties struct { ProvisioningState *ProvisioningState } -// HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate -// method. -type HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete -// method. -type HubVirtualNetworkConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get -// method. -type HubVirtualNetworkConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager -// method. -type HubVirtualNetworkConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // IDPSQueryObject - Will describe the query to run against the IDPS signatures DB type IDPSQueryObject struct { // Contain all filters names and values @@ -8061,41 +6785,6 @@ type IPAllocationPropertiesFormat struct { VirtualNetwork *SubResource } -// IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate -// method. -type IPAllocationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete method. -type IPAllocationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. -type IPAllocationsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager -// method. -type IPAllocationsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. -type IPAllocationsClientListOptions struct { - // placeholder for future optional parameters -} - -// IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags method. -type IPAllocationsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // IPConfiguration - IP configuration. type IPConfiguration struct { // Resource ID. @@ -8219,40 +6908,6 @@ type IPGroupPropertiesFormat struct { ProvisioningState *ProvisioningState } -// IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate method. -type IPGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. -type IPGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. -type IPGroupsClientGetOptions struct { - // Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. - Expand *string -} - -// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager -// method. -type IPGroupsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. -type IPGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. -type IPGroupsClientUpdateGroupsOptions struct { - // placeholder for future optional parameters -} - // IPPrefixesList - List of SNAT IP Prefixes learnt by firewall to not SNAT type IPPrefixesList struct { // IP Prefix value. @@ -8471,30 +7126,6 @@ type InboundNatRulePropertiesFormat struct { ProvisioningState *ProvisioningState } -// InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate -// method. -type InboundNatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete method. -type InboundNatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. -type InboundNatRulesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager method. -type InboundNatRulesClientListOptions struct { - // placeholder for future optional parameters -} - // InboundSecurityRule - NVA Inbound Security Rule resource. type InboundSecurityRule struct { // Resource ID. @@ -8513,13 +7144,6 @@ type InboundSecurityRule struct { Type *string } -// InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate -// method. -type InboundSecurityRuleClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // InboundSecurityRuleProperties - Properties of the Inbound Security Rules resource. type InboundSecurityRuleProperties struct { // List of allowed rules. @@ -8715,18 +7339,6 @@ type InterfaceIPConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get -// method. -type InterfaceIPConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager -// method. -type InterfaceIPConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - // InterfaceListResult - Response for the ListNetworkInterface API service call. type InterfaceListResult struct { // A list of network interfaces in a resource group. @@ -8745,12 +7357,6 @@ type InterfaceLoadBalancerListResult struct { NextLink *string } -// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager -// method. -type InterfaceLoadBalancersClientListOptions struct { - // placeholder for future optional parameters -} - // InterfacePropertiesFormat - NetworkInterface properties. type InterfacePropertiesFormat struct { // Auxiliary mode of Network Interface resource. @@ -8857,146 +7463,20 @@ type InterfaceTapConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate -// method. -type InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// ListHubRouteTablesResult - List of RouteTables and a URL nextLink to get the next set of results. +type ListHubRouteTablesResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string -// InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete -// method. -type InterfaceTapConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // List of RouteTables. + Value []*HubRouteTable } -// InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get -// method. -type InterfaceTapConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager -// method. -type InterfaceTapConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate -// method. -type InterfacesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. -type InterfacesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable -// method. -type InterfacesClientBeginGetEffectiveRouteTableOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups -// method. -type InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface -// method. -type InterfacesClientGetCloudServiceNetworkInterfaceOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. -type InterfacesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration -// method. -type InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface -// method. -type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. -type InterfacesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager -// method. -type InterfacesClientListCloudServiceNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager -// method. -type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. -type InterfacesClientListOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager -// method. -type InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions struct { - // Expands referenced resources. - Expand *string -} - -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager -// method. -type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager -// method. -type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions struct { - // placeholder for future optional parameters -} - -// InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. -type InterfacesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// ListHubRouteTablesResult - List of RouteTables and a URL nextLink to get the next set of results. -type ListHubRouteTablesResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string - - // List of RouteTables. - Value []*HubRouteTable -} - -// ListHubVirtualNetworkConnectionsResult - List of HubVirtualNetworkConnections and a URL nextLink to get the next set of -// results. -type ListHubVirtualNetworkConnectionsResult struct { - // URL to get the next set of operation list results if there are any. - NextLink *string +// ListHubVirtualNetworkConnectionsResult - List of HubVirtualNetworkConnections and a URL nextLink to get the next set of +// results. +type ListHubVirtualNetworkConnectionsResult struct { + // URL to get the next set of operation list results if there are any. + NextLink *string // List of HubVirtualNetworkConnections. Value []*HubVirtualNetworkConnection @@ -9215,32 +7695,6 @@ type LoadBalancerBackendAddressPoolListResult struct { NextLink *string } -// LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate -// method. -type LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete -// method. -type LoadBalancerBackendAddressPoolsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get -// method. -type LoadBalancerBackendAddressPoolsClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager -// method. -type LoadBalancerBackendAddressPoolsClientListOptions struct { - // placeholder for future optional parameters -} - // LoadBalancerBackendAddressPropertiesFormat - Properties of the load balancer backend addresses. type LoadBalancerBackendAddressPropertiesFormat struct { // A list of administrative states which once set can override health probe so that Load Balancer will always forward new @@ -9275,18 +7729,6 @@ type LoadBalancerFrontendIPConfigurationListResult struct { NextLink *string } -// LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get -// method. -type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager -// method. -type LoadBalancerFrontendIPConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - // LoadBalancerListResult - Response for ListLoadBalancers API service call. type LoadBalancerListResult struct { // A list of load balancers in a resource group. @@ -9305,24 +7747,6 @@ type LoadBalancerLoadBalancingRuleListResult struct { NextLink *string } -// LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get -// method. -type LoadBalancerLoadBalancingRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager -// method. -type LoadBalancerLoadBalancingRulesClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager -// method. -type LoadBalancerNetworkInterfacesClientListOptions struct { - // placeholder for future optional parameters -} - // LoadBalancerOutboundRuleListResult - Response for ListOutboundRule API service call. type LoadBalancerOutboundRuleListResult struct { // A list of outbound rules in a load balancer. @@ -9332,18 +7756,6 @@ type LoadBalancerOutboundRuleListResult struct { NextLink *string } -// LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get -// method. -type LoadBalancerOutboundRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager -// method. -type LoadBalancerOutboundRulesClientListOptions struct { - // placeholder for future optional parameters -} - // LoadBalancerProbeListResult - Response for ListProbe API service call. type LoadBalancerProbeListResult struct { // A list of probes in a load balancer. @@ -9353,16 +7765,6 @@ type LoadBalancerProbeListResult struct { NextLink *string } -// LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. -type LoadBalancerProbesClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager method. -type LoadBalancerProbesClientListOptions struct { - // placeholder for future optional parameters -} - // LoadBalancerPropertiesFormat - Properties of the load balancer. type LoadBalancerPropertiesFormat struct { // Collection of backend address pools used by a load balancer. @@ -9432,54 +7834,6 @@ type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { PublicIPAddress *SubResource } -// LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate -// method. -type LoadBalancersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. -type LoadBalancersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings -// method. -type LoadBalancersClientBeginListInboundNatRulePortMappingsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses -// method. -type LoadBalancersClientBeginSwapPublicIPAddressesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -type LoadBalancersClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager method. -type LoadBalancersClientListAllOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. -type LoadBalancersClientListOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags method. -type LoadBalancersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // LoadBalancingRule - A load balancing rule for a load balancer. type LoadBalancingRule struct { // Resource ID. @@ -9602,37 +7956,6 @@ type LocalNetworkGatewayPropertiesFormat struct { ResourceGUID *string } -// LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate -// method. -type LocalNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete -// method. -type LocalNetworkGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get method. -type LocalNetworkGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager -// method. -type LocalNetworkGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags -// method. -type LocalNetworkGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // LogSpecification - Description of logging specification. type LogSpecification struct { // Duration of the blob. @@ -9707,121 +8030,6 @@ type ManagedServiceIdentity struct { TenantID *string } -// ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink -// method. -type ManagementClientBeginDeleteBastionShareableLinkOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters for the -// ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. -type ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions -// method. -type ManagementClientBeginGetActiveSessionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink -// method. -type ManagementClientBeginPutBastionShareableLinkOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability -// method. -type ManagementClientCheckDNSNameAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager -// method. -type ManagementClientDisconnectActiveSessionsOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort -// method. -type ManagementClientExpressRouteProviderPortOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager -// method. -type ManagementClientGetBastionShareableLinkOptions struct { - // placeholder for future optional parameters -} - -// ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations -// method. -type ManagementClientListActiveConnectivityConfigurationsOptions struct { - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules -// method. -type ManagementClientListActiveSecurityAdminRulesOptions struct { - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations -// method. -type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions struct { - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules -// method. -type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions struct { - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders -// method. -type ManagementClientSupportedSecurityProvidersOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate -// method. -type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete -// method. -type ManagementGroupNetworkManagerConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get -// method. -type ManagementGroupNetworkManagerConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager -// method. -type ManagementGroupNetworkManagerConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // Manager - The Managed Network resource type Manager struct { // Resource ID. @@ -9864,12 +8072,6 @@ type ManagerCommit struct { CommitID *string } -// ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost method. -type ManagerCommitsClientBeginPostOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // ManagerConnection - The Network Manager Connection resource type ManagerConnection struct { // The scope connection properties @@ -9933,12 +8135,6 @@ type ManagerDeploymentStatus struct { Region *string } -// ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List method. -type ManagerDeploymentStatusClientListOptions struct { - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // ManagerDeploymentStatusListResult - A list of Network Manager Deployment Status type ManagerDeploymentStatusListResult struct { // When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current @@ -10026,51 +8222,6 @@ type ManagerSecurityGroupItem struct { NetworkGroupID *string } -// ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. -type ManagersClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. -type ManagersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. -type ManagersClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager -// method. -type ManagersClientListBySubscriptionOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. -type ManagersClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - -// ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. -type ManagersClientPatchOptions struct { - // placeholder for future optional parameters -} - // MatchCondition - Define match conditions. type MatchCondition struct { // REQUIRED; Match value. @@ -10218,40 +8369,6 @@ type NatGatewaySKU struct { Name *NatGatewaySKUName } -// NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate -// method. -type NatGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. -type NatGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. -type NatGatewaysClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. -type NatGatewaysClientListAllOptions struct { - // placeholder for future optional parameters -} - -// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. -type NatGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. -type NatGatewaysClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // NatRule - Rule of type nat. type NatRule struct { // REQUIRED; Rule Type. @@ -10291,8 +8408,8 @@ type NatRule struct { // GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type NatRule. func (n *NatRule) GetFirewallPolicyRule() *FirewallPolicyRule { return &FirewallPolicyRule{ - Name: n.Name, Description: n.Description, + Name: n.Name, RuleType: n.RuleType, } } @@ -10309,29 +8426,6 @@ type NatRulePortMapping struct { InboundNatRuleName *string } -// NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate method. -type NatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. -type NatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. -type NatRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager -// method. -type NatRulesClientListByVPNGatewayOptions struct { - // placeholder for future optional parameters -} - // NextHopParameters - Parameters that define the source and destination endpoint. type NextHopParameters struct { // REQUIRED; The destination IP address. @@ -10441,11 +8535,6 @@ type OperationPropertiesFormatServiceSpecification struct { MetricSpecifications []*MetricSpecification } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // OrderBy - Describes a column to sort type OrderBy struct { // Describes the actual column name to sort by @@ -10624,76 +8713,6 @@ type P2SVPNGatewayProperties struct { VPNClientConnectionHealth *VPNClientConnectionHealth } -// P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate -// method. -type P2SVPNGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete method. -type P2SVPNGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections -// method. -type P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile -// method. -type P2SVPNGatewaysClientBeginGenerateVPNProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed -// method. -type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth -// method. -type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset method. -type P2SVPNGatewaysClientBeginResetOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags -// method. -type P2SVPNGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. -type P2SVPNGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager -// method. -type P2SVPNGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. -type P2SVPNGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - // P2SVPNProfileParameters - Vpn Client Parameters for package generation. type P2SVPNProfileParameters struct { // VPN client authentication method. @@ -10858,41 +8877,6 @@ type PacketCaptureStorageLocation struct { StoragePath *string } -// PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate method. -type PacketCapturesClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete method. -type PacketCapturesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus -// method. -type PacketCapturesClientBeginGetStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop method. -type PacketCapturesClientBeginStopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. -type PacketCapturesClientGetOptions struct { - // placeholder for future optional parameters -} - -// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. -type PacketCapturesClientListOptions struct { - // placeholder for future optional parameters -} - // Parameters for an Action. type Parameter struct { // List of AS paths. @@ -11011,18 +8995,6 @@ type PeerExpressRouteCircuitConnectionPropertiesFormat struct { ProvisioningState *ProvisioningState } -// PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get -// method. -type PeerExpressRouteCircuitConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager -// method. -type PeerExpressRouteCircuitConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // PeerRoute - Peer routing details. type PeerRoute struct { // READ-ONLY; The route's AS path sequence. @@ -11143,31 +9115,6 @@ type PrivateDNSZoneGroupPropertiesFormat struct { ProvisioningState *ProvisioningState } -// PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate -// method. -type PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete -// method. -type PrivateDNSZoneGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get method. -type PrivateDNSZoneGroupsClientGetOptions struct { - // placeholder for future optional parameters -} - -// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager -// method. -type PrivateDNSZoneGroupsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateDNSZonePropertiesFormat - Properties of the private dns zone configuration resource. type PrivateDNSZonePropertiesFormat struct { // The resource id of the private dns zone. @@ -11316,36 +9263,6 @@ type PrivateEndpointProperties struct { ProvisioningState *ProvisioningState } -// PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate -// method. -type PrivateEndpointsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. -type PrivateEndpointsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. -type PrivateEndpointsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager -// method. -type PrivateEndpointsClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager method. -type PrivateEndpointsClientListOptions struct { - // placeholder for future optional parameters -} - // PrivateLinkService - Private link service resource. type PrivateLinkService struct { // The extended location of the load balancer. @@ -11521,112 +9438,29 @@ type PrivateLinkServiceVisibility struct { Visible *bool } -// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters -// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. -type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} +// Probe - A load balancer probe. +type Probe struct { + // Resource ID. + ID *string -// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility -// method. -type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access + // the resource. + Name *string -// PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate -// method. -type PrivateLinkServicesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // Properties of load balancer probe. + Properties *ProbePropertiesFormat -// PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete -// method. -type PrivateLinkServicesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} + // READ-ONLY; A unique read-only string that changes whenever the resource is updated. + Etag *string -// PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection -// method. -type PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string + // READ-ONLY; Type of the resource. + Type *string } -// PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. -type PrivateLinkServicesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection -// method. -type PrivateLinkServicesClientGetPrivateEndpointConnectionOptions struct { - // Expands referenced resources. - Expand *string -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters for -// the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager -// method. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager -// method. -type PrivateLinkServicesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager method. -type PrivateLinkServicesClientListOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager -// method. -type PrivateLinkServicesClientListPrivateEndpointConnectionsOptions struct { - // placeholder for future optional parameters -} - -// PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection -// method. -type PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters -} - -// Probe - A load balancer probe. -type Probe struct { - // Resource ID. - ID *string - - // The name of the resource that is unique within the set of probes used by the load balancer. This name can be used to access - // the resource. - Name *string - - // Properties of load balancer probe. - Properties *ProbePropertiesFormat - - // READ-ONLY; A unique read-only string that changes whenever the resource is updated. - Etag *string - - // READ-ONLY; Type of the resource. - Type *string -} - -// ProbePropertiesFormat - Load balancer probe resource. -type ProbePropertiesFormat struct { - // REQUIRED; The port for communicating the probe. Possible values range from 1 to 65535, inclusive. - Port *int32 +// ProbePropertiesFormat - Load balancer probe resource. +type ProbePropertiesFormat struct { + // REQUIRED; The port for communicating the probe. Possible values range from 1 to 65535, inclusive. + Port *int32 // REQUIRED; The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe to be successful. // If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI is required @@ -11708,38 +9542,6 @@ type ProfilePropertiesFormat struct { ResourceGUID *string } -// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -type ProfilesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. -type ProfilesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. -type ProfilesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. -type ProfilesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. -type ProfilesClientListOptions struct { - // placeholder for future optional parameters -} - -// ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. -type ProfilesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // PropagatedRouteTable - The list of RouteTables to advertise the routes to. type PropagatedRouteTable struct { // The list of resource ids of all the RouteTables. @@ -11888,87 +9690,6 @@ type PublicIPAddressSKU struct { Tier *PublicIPAddressSKUTier } -// PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate -// method. -type PublicIPAddressesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus -// method. -type PublicIPAddressesClientBeginDdosProtectionStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete -// method. -type PublicIPAddressesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress -// method. -type PublicIPAddressesClientGetCloudServicePublicIPAddressOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. -type PublicIPAddressesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress -// method. -type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager -// method. -type PublicIPAddressesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager -// method. -type PublicIPAddressesClientListCloudServicePublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager -// method. -type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager method. -type PublicIPAddressesClientListOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager -// method. -type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager -// method. -type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions struct { - // placeholder for future optional parameters -} - -// PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags method. -type PublicIPAddressesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // PublicIPDdosProtectionStatusResult - Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. type PublicIPDdosProtectionStatusResult struct { // DDoS protection plan Resource Id of a if IP address is protected through a plan. @@ -12068,40 +9789,6 @@ type PublicIPPrefixSKU struct { Tier *PublicIPPrefixSKUTier } -// PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate -// method. -type PublicIPPrefixesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete method. -type PublicIPPrefixesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. -type PublicIPPrefixesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager method. -type PublicIPPrefixesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager method. -type PublicIPPrefixesClientListOptions struct { - // placeholder for future optional parameters -} - -// PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags method. -type PublicIPPrefixesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // QosDefinition - Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. type QosDefinition struct { // Destination IP ranges. @@ -12260,11 +9947,6 @@ type ResourceNavigationLinkFormat struct { ProvisioningState *ProvisioningState } -// ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List method. -type ResourceNavigationLinksClientListOptions struct { - // placeholder for future optional parameters -} - // ResourceNavigationLinksListResult - Response for ResourceNavigationLinks_List operation. type ResourceNavigationLinksListResult struct { // The resource navigation links in a subnet. @@ -12397,65 +10079,6 @@ type RouteFilterRulePropertiesFormat struct { ProvisioningState *ProvisioningState } -// RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate -// method. -type RouteFilterRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete method. -type RouteFilterRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. -type RouteFilterRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager -// method. -type RouteFilterRulesClientListByRouteFilterOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate -// method. -type RouteFiltersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete method. -type RouteFiltersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. -type RouteFiltersClientGetOptions struct { - // Expands referenced express route bgp peering resources. - Expand *string -} - -// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager -// method. -type RouteFiltersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. -type RouteFiltersClientListOptions struct { - // placeholder for future optional parameters -} - -// RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. -type RouteFiltersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // RouteListResult - Response for the ListRoute API service call. type RouteListResult struct { // The URL to get the next set of results. @@ -12513,29 +10136,6 @@ type RouteMapRule struct { NextStepIfMatched *NextStep } -// RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate -// method. -type RouteMapsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. -type RouteMapsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. -type RouteMapsClientGetOptions struct { - // placeholder for future optional parameters -} - -// RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. -type RouteMapsClientListOptions struct { - // placeholder for future optional parameters -} - // RoutePropertiesFormat - Route resource. type RoutePropertiesFormat struct { // REQUIRED; The type of Azure hop the packet should be sent to. @@ -12605,62 +10205,6 @@ type RouteTablePropertiesFormat struct { Subnets []*Subnet } -// RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate -// method. -type RouteTablesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. -type RouteTablesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. -type RouteTablesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. -type RouteTablesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. -type RouteTablesClientListOptions struct { - // placeholder for future optional parameters -} - -// RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. -type RouteTablesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate method. -type RoutesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -type RoutesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. -type RoutesClientGetOptions struct { - // placeholder for future optional parameters -} - -// RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. -type RoutesClientListOptions struct { - // placeholder for future optional parameters -} - // RoutingConfiguration - Routing Configuration indicating the associated and propagated route tables for this connection. type RoutingConfiguration struct { // The resource id RouteTable associated with this RoutingConfiguration. @@ -12719,29 +10263,6 @@ type RoutingIntent struct { Type *string } -// RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate -// method. -type RoutingIntentClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete method. -type RoutingIntentClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. -type RoutingIntentClientGetOptions struct { - // placeholder for future optional parameters -} - -// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. -type RoutingIntentClientListOptions struct { - // placeholder for future optional parameters -} - // RoutingIntentProperties - The properties of a RoutingIntent resource. type RoutingIntentProperties struct { // List of routing policies. @@ -12799,8 +10320,8 @@ type Rule struct { // GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type Rule. func (r *Rule) GetFirewallPolicyRule() *FirewallPolicyRule { return &FirewallPolicyRule{ - Name: r.Name, Description: r.Description, + Name: r.Name, RuleType: r.RuleType, } } @@ -12856,32 +10377,6 @@ type ScopeConnectionProperties struct { ConnectionState *ScopeConnectionState } -// ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate -// method. -type ScopeConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. -type ScopeConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. -type ScopeConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager method. -type ScopeConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // SecurityAdminConfiguration - Defines the security admin configuration type SecurityAdminConfiguration struct { // Indicates the properties for the network manager security admin configuration. @@ -12924,39 +10419,6 @@ type SecurityAdminConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete -// method. -type SecurityAdminConfigurationsClientBeginDeleteOptions struct { - // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service - // will do a cleanup deployment in the background, prior to the delete. - Force *bool - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate -// method. -type SecurityAdminConfigurationsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get -// method. -type SecurityAdminConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager -// method. -type SecurityAdminConfigurationsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // SecurityGroup - NetworkSecurityGroup resource. type SecurityGroup struct { // Resource ID. @@ -13048,40 +10510,6 @@ type SecurityGroupViewResult struct { NetworkInterfaces []*SecurityGroupNetworkInterface } -// SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate -// method. -type SecurityGroupsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete method. -type SecurityGroupsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. -type SecurityGroupsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager method. -type SecurityGroupsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. -type SecurityGroupsClientListOptions struct { - // placeholder for future optional parameters -} - -// SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags method. -type SecurityGroupsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // SecurityPartnerProvider - Security Partner Provider resource. type SecurityPartnerProvider struct { // Resource ID. @@ -13130,43 +10558,6 @@ type SecurityPartnerProviderPropertiesFormat struct { ProvisioningState *ProvisioningState } -// SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate -// method. -type SecurityPartnerProvidersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete -// method. -type SecurityPartnerProvidersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get method. -type SecurityPartnerProvidersClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager -// method. -type SecurityPartnerProvidersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager -// method. -type SecurityPartnerProvidersClientListOptions struct { - // placeholder for future optional parameters -} - -// SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags -// method. -type SecurityPartnerProvidersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // SecurityRule - Network security rule. type SecurityRule struct { // Resource ID. @@ -13266,29 +10657,6 @@ type SecurityRulePropertiesFormat struct { ProvisioningState *ProvisioningState } -// SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate -// method. -type SecurityRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete method. -type SecurityRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. -type SecurityRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. -type SecurityRulesClientListOptions struct { - // placeholder for future optional parameters -} - // SecurityRulesEvaluationResult - Network security rules evaluation result. type SecurityRulesEvaluationResult struct { // Value indicating whether destination is matched. @@ -13346,11 +10714,6 @@ type ServiceAssociationLinkPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List method. -type ServiceAssociationLinksClientListOptions struct { - // placeholder for future optional parameters -} - // ServiceAssociationLinksListResult - Response for ServiceAssociationLinks_List operation. type ServiceAssociationLinksListResult struct { // The service association links in a subnet. @@ -13372,44 +10735,6 @@ type ServiceDelegationPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate -// method. -type ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete -// method. -type ServiceEndpointPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get method. -type ServiceEndpointPoliciesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager -// method. -type ServiceEndpointPoliciesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager -// method. -type ServiceEndpointPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags -// method. -type ServiceEndpointPoliciesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ServiceEndpointPolicy - Service End point policy resource. type ServiceEndpointPolicy struct { // Resource ID. @@ -13480,32 +10805,6 @@ type ServiceEndpointPolicyDefinitionPropertiesFormat struct { ProvisioningState *ProvisioningState } -// ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate -// method. -type ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete -// method. -type ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get -// method. -type ServiceEndpointPolicyDefinitionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager -// method. -type ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - // ServiceEndpointPolicyListResult - Response for ListServiceEndpointPolicies API service call. type ServiceEndpointPolicyListResult struct { // A list of ServiceEndpointPolicy resources. @@ -13563,15 +10862,6 @@ type ServiceTagInformation struct { ServiceTagChangeNumber *string } -// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager -// method. -type ServiceTagInformationClientListOptions struct { - // Do not return address prefixes for the tag(s). - NoAddressPrefixes *bool - // Return tag information for a particular tag. - TagName *string -} - // ServiceTagInformationListResult - Response for Get ServiceTagInformation API service call. Retrieves the list of service // tag information resources. type ServiceTagInformationListResult struct { @@ -13600,11 +10890,6 @@ type ServiceTagInformationPropertiesFormat struct { SystemService *string } -// ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. -type ServiceTagsClientListOptions struct { - // placeholder for future optional parameters -} - // ServiceTagsListResult - Response for the ListServiceTags API service call. type ServiceTagsListResult struct { // READ-ONLY; The iteration number. @@ -13752,31 +11037,6 @@ type StaticMemberProperties struct { Region *string } -// StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate method. -type StaticMembersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. -type StaticMembersClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. -type StaticMembersClientGetOptions struct { - // placeholder for future optional parameters -} - -// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. -type StaticMembersClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // StaticRoute - List of all Static Routes. type StaticRoute struct { // List of all address prefixes. @@ -13902,72 +11162,6 @@ type SubnetPropertiesFormat struct { ServiceAssociationLinks []*ServiceAssociationLink } -// SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate method. -type SubnetsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. -type SubnetsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies -// method. -type SubnetsClientBeginPrepareNetworkPoliciesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies -// method. -type SubnetsClientBeginUnprepareNetworkPoliciesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. -type SubnetsClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. -type SubnetsClientListOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate -// method. -type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete -// method. -type SubscriptionNetworkManagerConnectionsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get -// method. -type SubscriptionNetworkManagerConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager -// method. -type SubscriptionNetworkManagerConnectionsClientListOptions struct { - // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, - // the value of the nextLink element will include a skipToken parameter that - // specifies a starting point to use for subsequent calls. - SkipToken *string - // An optional query parameter which specifies the maximum number of records to be returned by the server. - Top *int32 -} - // SwapResource to represent slot type on the specified cloud service. type SwapResource struct { // Swap resource properties @@ -14225,11 +11419,6 @@ type UsageName struct { Value *string } -// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. -type UsagesClientListOptions struct { - // placeholder for future optional parameters -} - // UsagesListResult - The list usages operation response. type UsagesListResult struct { // URL to get the next set of results. @@ -14547,48 +11736,6 @@ type VPNConnectionProperties struct { ProvisioningState *ProvisioningState } -// VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate -// method. -type VPNConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete method. -type VPNConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture -// method. -type VPNConnectionsClientBeginStartPacketCaptureOptions struct { - // Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. - Parameters *VPNConnectionPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture -// method. -type VPNConnectionsClientBeginStopPacketCaptureOptions struct { - // Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. - Parameters *VPNConnectionPacketCaptureStopParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. -type VPNConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager -// method. -type VPNConnectionsClientListByVPNGatewayOptions struct { - // placeholder for future optional parameters -} - // VPNDeviceScriptParameters - Vpn device configuration script generation parameters. type VPNDeviceScriptParameters struct { // The device family for the vpn device. @@ -14724,67 +11871,6 @@ type VPNGatewayProperties struct { ProvisioningState *ProvisioningState } -// VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate -// method. -type VPNGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. -type VPNGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. -type VPNGatewaysClientBeginResetOptions struct { - // VpnGateway ipConfigurationId to specify the gateway instance. - IPConfigurationID *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture -// method. -type VPNGatewaysClientBeginStartPacketCaptureOptions struct { - // Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. - Parameters *VPNGatewayPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture -// method. -type VPNGatewaysClientBeginStopPacketCaptureOptions struct { - // Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. - Parameters *VPNGatewayPacketCaptureStopParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags method. -type VPNGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. -type VPNGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager -// method. -type VPNGatewaysClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. -type VPNGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - // VPNLinkBgpSettings - BGP settings details for a link. type VPNLinkBgpSettings struct { // The BGP speaker's ASN. @@ -14794,26 +11880,6 @@ type VPNLinkBgpSettings struct { BgpPeeringAddress *string } -// VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas -// method. -type VPNLinkConnectionsClientBeginGetIkeSasOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection -// method. -type VPNLinkConnectionsClientBeginResetConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager -// method. -type VPNLinkConnectionsClientListByVPNConnectionOptions struct { - // placeholder for future optional parameters -} - // VPNLinkProviderProperties - List of properties of a link provider. type VPNLinkProviderProperties struct { // Name of the link provider. @@ -15010,50 +12076,6 @@ type VPNServerConfigurationProperties struct { ProvisioningState *string } -// VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList -// method. -type VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate -// method. -type VPNServerConfigurationsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete -// method. -type VPNServerConfigurationsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get method. -type VPNServerConfigurationsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager -// method. -type VPNServerConfigurationsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager -// method. -type VPNServerConfigurationsClientListOptions struct { - // placeholder for future optional parameters -} - -// VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags -// method. -type VPNServerConfigurationsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VPNServerConfigurationsResponse - VpnServerConfigurations list associated with VirtualWan Response. type VPNServerConfigurationsResponse struct { // List of VpnServerConfigurations associated with VirtualWan. @@ -15183,11 +12205,6 @@ type VPNSiteLinkConnectionProperties struct { ProvisioningState *ProvisioningState } -// VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get method. -type VPNSiteLinkConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - // VPNSiteLinkProperties - Parameters for VpnSite. type VPNSiteLinkProperties struct { // The set of bgp properties. @@ -15206,17 +12223,6 @@ type VPNSiteLinkProperties struct { ProvisioningState *ProvisioningState } -// VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. -type VPNSiteLinksClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager -// method. -type VPNSiteLinksClientListByVPNSiteOptions struct { - // placeholder for future optional parameters -} - // VPNSiteProperties - Parameters for VpnSite. type VPNSiteProperties struct { // The AddressSpace that contains an array of IP address ranges. @@ -15250,46 +12256,6 @@ type VPNSiteProperties struct { ProvisioningState *ProvisioningState } -// VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate method. -type VPNSitesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. -type VPNSitesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. -type VPNSitesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager -// method. -type VPNSitesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. -type VPNSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. -type VPNSitesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - -// VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload -// method. -type VPNSitesConfigurationClientBeginDownloadOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // VerificationIPFlowParameters - Parameters that define the IP flow to be verified. type VerificationIPFlowParameters struct { // REQUIRED; The direction of the packet represented as a 5-tuple. @@ -15329,22 +12295,6 @@ type VerificationIPFlowResult struct { RuleName *string } -// VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. -type VipSwapClientBeginCreateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. -type VipSwapClientGetOptions struct { - // placeholder for future optional parameters -} - -// VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. -type VipSwapClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualAppliance - NetworkVirtualAppliance Resource. type VirtualAppliance struct { // Resource ID. @@ -15426,32 +12376,6 @@ type VirtualApplianceConnectionProperties struct { ProvisioningState *ProvisioningState } -// VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginCreateOrUpdate -// method. -type VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginDelete -// method. -type VirtualApplianceConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceConnectionsClientGetOptions contains the optional parameters for the VirtualApplianceConnectionsClient.Get -// method. -type VirtualApplianceConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceConnectionsClientListOptions contains the optional parameters for the VirtualApplianceConnectionsClient.NewListPager -// method. -type VirtualApplianceConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualApplianceListResult - Response for ListNetworkVirtualAppliances API service call. type VirtualApplianceListResult struct { // URL to get the next set of results. @@ -15596,17 +12520,6 @@ type VirtualApplianceSKUPropertiesFormat struct { Vendor *string } -// VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get method. -type VirtualApplianceSKUsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager -// method. -type VirtualApplianceSKUsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualApplianceSite - Virtual Appliance Site resource. type VirtualApplianceSite struct { // Resource ID. @@ -15646,67 +12559,6 @@ type VirtualApplianceSiteProperties struct { ProvisioningState *ProvisioningState } -// VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate -// method. -type VirtualApplianceSitesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete -// method. -type VirtualApplianceSitesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get method. -type VirtualApplianceSitesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager -// method. -type VirtualApplianceSitesClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate -// method. -type VirtualAppliancesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete -// method. -type VirtualAppliancesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. -type VirtualAppliancesClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager -// method. -type VirtualAppliancesClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager method. -type VirtualAppliancesClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags method. -type VirtualAppliancesClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VirtualHub Resource. type VirtualHub struct { // Resource ID. @@ -15734,45 +12586,6 @@ type VirtualHub struct { Type *string } -// VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate -// method. -type VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete -// method. -type VirtualHubBgpConnectionClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get method. -type VirtualHubBgpConnectionClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes -// method. -type VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes -// method. -type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager -// method. -type VirtualHubBgpConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualHubEffectiveRoute - The effective route configured on the virtual hub or specified resource. type VirtualHubEffectiveRoute struct { // The list of address prefixes. @@ -15804,32 +12617,6 @@ type VirtualHubID struct { ID *string } -// VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate -// method. -type VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete -// method. -type VirtualHubIPConfigurationClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get -// method. -type VirtualHubIPConfigurationClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager -// method. -type VirtualHubIPConfigurationClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualHubProperties - Parameters for VirtualHub. type VirtualHubProperties struct { // Address-prefix for this VirtualHub. @@ -15941,31 +12728,6 @@ type VirtualHubRouteTableV2Properties struct { ProvisioningState *ProvisioningState } -// VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate -// method. -type VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete -// method. -type VirtualHubRouteTableV2SClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get method. -type VirtualHubRouteTableV2SClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager -// method. -type VirtualHubRouteTableV2SClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualHubRouteV2 - VirtualHubRouteTableV2 route. type VirtualHubRouteV2 struct { // The type of destinations. @@ -15981,63 +12743,6 @@ type VirtualHubRouteV2 struct { NextHops []*string } -// VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate -// method. -type VirtualHubsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. -type VirtualHubsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes -// method. -type VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions struct { - // Parameters supplied to get the effective routes for a specific resource. - EffectiveRoutesParameters *EffectiveRoutesParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes -// method. -type VirtualHubsClientBeginGetInboundRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes -// method. -type VirtualHubsClientBeginGetOutboundRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. -type VirtualHubsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager -// method. -type VirtualHubsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. -type VirtualHubsClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. -type VirtualHubsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VirtualNetwork - Virtual Network resource. type VirtualNetwork struct { // The extended location of the virtual network. @@ -16342,89 +13047,6 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { TunnelConnectionStatus []*TunnelConnectionHealth } -// VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete -// method. -type VirtualNetworkGatewayConnectionsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas -// method. -type VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection -// method. -type VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture -// method. -type VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions struct { - // Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. - Parameters *VPNPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture -// method. -type VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags -// method. -type VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get -// method. -type VirtualNetworkGatewayConnectionsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey -// method. -type VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager -// method. -type VirtualNetworkGatewayConnectionsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkGatewayIPConfiguration - IP configuration for virtual network gateway. type VirtualNetworkGatewayIPConfiguration struct { // Resource ID. @@ -16515,32 +13137,6 @@ type VirtualNetworkGatewayNatRuleProperties struct { ProvisioningState *ProvisioningState } -// VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete -// method. -type VirtualNetworkGatewayNatRulesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get -// method. -type VirtualNetworkGatewayNatRulesClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager -// method. -type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkGatewayPolicyGroup - Parameters for VirtualNetworkGatewayPolicyGroup. type VirtualNetworkGatewayPolicyGroup struct { // Resource ID. @@ -16674,160 +13270,6 @@ type VirtualNetworkGatewaySKU struct { Capacity *int32 } -// VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate -// method. -type VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete -// method. -type VirtualNetworkGatewaysClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters -// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. -type VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile -// method. -type VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage -// method. -type VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes -// method. -type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus -// method. -type VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions struct { - // The IP address of the peer to retrieve the status of. - Peer *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes -// method. -type VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL -// method. -type VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth -// method. -type VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters -// method. -type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset -// method. -type VirtualNetworkGatewaysClientBeginResetOptions struct { - // Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - GatewayVip *string - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey -// method. -type VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters -// method. -type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture -// method. -type VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions struct { - // Virtual network gateway packet capture parameters supplied to start packet capture on gateway. - Parameters *VPNPacketCaptureStartParameters - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture -// method. -type VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags -// method. -type VirtualNetworkGatewaysClientBeginUpdateTagsOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get method. -type VirtualNetworkGatewaysClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager -// method. -type VirtualNetworkGatewaysClientListConnectionsOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager -// method. -type VirtualNetworkGatewaysClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices -// method. -type VirtualNetworkGatewaysClientSupportedVPNDevicesOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript -// method. -type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkListResult - Response for the ListVirtualNetworks API service call. type VirtualNetworkListResult struct { // The URL to get the next set of results. @@ -16924,33 +13366,6 @@ type VirtualNetworkPeeringPropertiesFormat struct { ResourceGUID *string } -// VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. - SyncRemoteAddressSpace *SyncRemoteAddressSpace -} - -// VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete -// method. -type VirtualNetworkPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get method. -type VirtualNetworkPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager -// method. -type VirtualNetworkPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkPropertiesFormat - Properties of the virtual network. type VirtualNetworkPropertiesFormat struct { // The AddressSpace that contains an array of IP address ranges that can be used by subnets. @@ -17051,43 +13466,6 @@ type VirtualNetworkTapPropertiesFormat struct { ResourceGUID *string } -// VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate -// method. -type VirtualNetworkTapsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete -// method. -type VirtualNetworkTapsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. -type VirtualNetworkTapsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager -// method. -type VirtualNetworkTapsClientListAllOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager -// method. -type VirtualNetworkTapsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags -// method. -type VirtualNetworkTapsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VirtualNetworkUsage - Usage details for subnet. type VirtualNetworkUsage struct { // READ-ONLY; Indicates number of IPs used from the Subnet. @@ -17115,63 +13493,6 @@ type VirtualNetworkUsageName struct { Value *string } -// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate -// method. -type VirtualNetworksClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. -type VirtualNetworksClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus -// method. -type VirtualNetworksClientBeginListDdosProtectionStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string - // The skipToken that is given with nextLink. - SkipToken *string - // The max number of ip addresses to return. - Top *int32 -} - -// VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability -// method. -type VirtualNetworksClientCheckIPAddressAvailabilityOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. -type VirtualNetworksClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager method. -type VirtualNetworksClientListAllOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. -type VirtualNetworksClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager -// method. -type VirtualNetworksClientListUsageOptions struct { - // placeholder for future optional parameters -} - -// VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags method. -type VirtualNetworksClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VirtualRouter Resource. type VirtualRouter struct { // Resource ID. @@ -17250,31 +13571,6 @@ type VirtualRouterPeeringProperties struct { ProvisioningState *ProvisioningState } -// VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate -// method. -type VirtualRouterPeeringsClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete -// method. -type VirtualRouterPeeringsClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get method. -type VirtualRouterPeeringsClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager -// method. -type VirtualRouterPeeringsClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualRouterPropertiesFormat - Virtual Router definition. type VirtualRouterPropertiesFormat struct { // The Gateway on which VirtualRouter is hosted. @@ -17296,36 +13592,6 @@ type VirtualRouterPropertiesFormat struct { ProvisioningState *ProvisioningState } -// VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate -// method. -type VirtualRoutersClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete method. -type VirtualRoutersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. -type VirtualRoutersClientGetOptions struct { - // Expands referenced resources. - Expand *string -} - -// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager -// method. -type VirtualRoutersClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. -type VirtualRoutersClientListOptions struct { - // placeholder for future optional parameters -} - // VirtualWAN Resource. type VirtualWAN struct { // Resource ID. @@ -17404,40 +13670,6 @@ type VirtualWanVPNProfileParameters struct { VPNServerConfigurationResourceID *string } -// VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate -// method. -type VirtualWansClientBeginCreateOrUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. -type VirtualWansClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. -type VirtualWansClientGetOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager -// method. -type VirtualWansClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. -type VirtualWansClientListOptions struct { - // placeholder for future optional parameters -} - -// VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. -type VirtualWansClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // VnetRoute - List of routes that control routing from VirtualHub into a virtual network connection. type VnetRoute struct { // List of all Static Routes. @@ -17513,117 +13745,6 @@ type WatcherPropertiesFormat struct { ProvisioningState *ProvisioningState } -// WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity -// method. -type WatchersClientBeginCheckConnectivityOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. -type WatchersClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport -// method. -type WatchersClientBeginGetAzureReachabilityReportOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus -// method. -type WatchersClientBeginGetFlowLogStatusOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic -// method. -type WatchersClientBeginGetNetworkConfigurationDiagnosticOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop method. -type WatchersClientBeginGetNextHopOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting -// method. -type WatchersClientBeginGetTroubleshootingOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult -// method. -type WatchersClientBeginGetTroubleshootingResultOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules -// method. -type WatchersClientBeginGetVMSecurityRulesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders -// method. -type WatchersClientBeginListAvailableProvidersOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration -// method. -type WatchersClientBeginSetFlowLogConfigurationOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow method. -type WatchersClientBeginVerifyIPFlowOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. -type WatchersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. -type WatchersClientGetOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. -type WatchersClientGetTopologyOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. -type WatchersClientListAllOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. -type WatchersClientListOptions struct { - // placeholder for future optional parameters -} - -// WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. -type WatchersClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // WebApplicationFirewallCustomRule - Defines contents of a web application rule. type WebApplicationFirewallCustomRule struct { // REQUIRED; Type of Actions. @@ -17657,37 +13778,6 @@ type WebApplicationFirewallCustomRule struct { Etag *string } -// WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete -// method. -type WebApplicationFirewallPoliciesClientBeginDeleteOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - -// WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate -// method. -type WebApplicationFirewallPoliciesClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get -// method. -type WebApplicationFirewallPoliciesClientGetOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager -// method. -type WebApplicationFirewallPoliciesClientListAllOptions struct { - // placeholder for future optional parameters -} - -// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager -// method. -type WebApplicationFirewallPoliciesClientListOptions struct { - // placeholder for future optional parameters -} - // WebApplicationFirewallPolicy - Defines web application firewall policy. type WebApplicationFirewallPolicy struct { // Resource ID. @@ -17764,15 +13854,3 @@ type WebApplicationFirewallScrubbingRules struct { // Defines the state of log scrubbing rule. Default value is Enabled. State *ScrubbingRuleEntryState } - -// WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. -type WebCategoriesClientGetOptions struct { - // Expands resourceIds back referenced by the azureWebCategory resource. - Expand *string -} - -// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager -// method. -type WebCategoriesClientListBySubscriptionOptions struct { - // placeholder for future optional parameters -} diff --git a/sdk/resourcemanager/network/armnetwork/options.go b/sdk/resourcemanager/network/armnetwork/options.go new file mode 100644 index 000000000000..362e4e60de26 --- /dev/null +++ b/sdk/resourcemanager/network/armnetwork/options.go @@ -0,0 +1,3920 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +// AdminRuleCollectionsClientBeginDeleteOptions contains the optional parameters for the AdminRuleCollectionsClient.BeginDelete +// method. +type AdminRuleCollectionsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AdminRuleCollectionsClientCreateOrUpdateOptions contains the optional parameters for the AdminRuleCollectionsClient.CreateOrUpdate +// method. +type AdminRuleCollectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AdminRuleCollectionsClientGetOptions contains the optional parameters for the AdminRuleCollectionsClient.Get method. +type AdminRuleCollectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AdminRuleCollectionsClientListOptions contains the optional parameters for the AdminRuleCollectionsClient.NewListPager +// method. +type AdminRuleCollectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// AdminRulesClientBeginDeleteOptions contains the optional parameters for the AdminRulesClient.BeginDelete method. +type AdminRulesClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AdminRulesClientCreateOrUpdateOptions contains the optional parameters for the AdminRulesClient.CreateOrUpdate method. +type AdminRulesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// AdminRulesClientGetOptions contains the optional parameters for the AdminRulesClient.Get method. +type AdminRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// AdminRulesClientListOptions contains the optional parameters for the AdminRulesClient.NewListPager method. +type AdminRulesClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager +// method. +type ApplicationGatewayPrivateEndpointConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.NewListPager +// method. +type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayWafDynamicManifestsClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsClient.NewGetPager +// method. +type ApplicationGatewayWafDynamicManifestsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions contains the optional parameters for the ApplicationGatewayWafDynamicManifestsDefaultClient.Get +// method. +type ApplicationGatewayWafDynamicManifestsDefaultClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand +// method. +type ApplicationGatewaysClientBeginBackendHealthOnDemandOptions struct { + // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Expand *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth +// method. +type ApplicationGatewaysClientBeginBackendHealthOptions struct { + // Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + Expand *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate +// method. +type ApplicationGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete +// method. +type ApplicationGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart +// method. +type ApplicationGatewaysClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop +// method. +type ApplicationGatewaysClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. +type ApplicationGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientGetSSLPredefinedPolicyOptions contains the optional parameters for the ApplicationGatewaysClient.GetSSLPredefinedPolicy +// method. +type ApplicationGatewaysClientGetSSLPredefinedPolicyOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAllPager +// method. +type ApplicationGatewaysClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableRequestHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableRequestHeaders +// method. +type ApplicationGatewaysClientListAvailableRequestHeadersOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableResponseHeadersOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableResponseHeaders +// method. +type ApplicationGatewaysClientListAvailableResponseHeadersOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableSSLOptionsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLOptions +// method. +type ApplicationGatewaysClientListAvailableSSLOptionsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager +// method. +type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableServerVariablesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableServerVariables +// method. +type ApplicationGatewaysClientListAvailableServerVariablesOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListAvailableWafRuleSetsOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableWafRuleSets +// method. +type ApplicationGatewaysClientListAvailableWafRuleSetsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.NewListPager method. +type ApplicationGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationGatewaysClientUpdateTagsOptions contains the optional parameters for the ApplicationGatewaysClient.UpdateTags +// method. +type ApplicationGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate +// method. +type ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete +// method. +type ApplicationSecurityGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get +// method. +type ApplicationSecurityGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListAllPager +// method. +type ApplicationSecurityGroupsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.NewListPager +// method. +type ApplicationSecurityGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// ApplicationSecurityGroupsClientUpdateTagsOptions contains the optional parameters for the ApplicationSecurityGroupsClient.UpdateTags +// method. +type ApplicationSecurityGroupsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.NewListPager +// method. +type AvailableDelegationsClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.NewListPager +// method. +type AvailableEndpointServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager +// method. +type AvailablePrivateEndpointTypesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.NewListPager +// method. +type AvailablePrivateEndpointTypesClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.NewListPager +// method. +type AvailableResourceGroupDelegationsClientListOptions struct { + // placeholder for future optional parameters +} + +// AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListByResourceGroupPager +// method. +type AvailableServiceAliasesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.NewListPager +// method. +type AvailableServiceAliasesClientListOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.NewListAllPager +// method. +type AzureFirewallFqdnTagsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate +// method. +type AzureFirewallsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete method. +type AzureFirewallsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginListLearnedPrefixesOptions contains the optional parameters for the AzureFirewallsClient.BeginListLearnedPrefixes +// method. +type AzureFirewallsClientBeginListLearnedPrefixesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginPacketCaptureOptions contains the optional parameters for the AzureFirewallsClient.BeginPacketCapture +// method. +type AzureFirewallsClientBeginPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags +// method. +type AzureFirewallsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. +type AzureFirewallsClientGetOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.NewListAllPager method. +type AzureFirewallsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.NewListPager method. +type AzureFirewallsClientListOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate +// method. +type BastionHostsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete method. +type BastionHostsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags method. +type BastionHostsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. +type BastionHostsClientGetOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.NewListByResourceGroupPager +// method. +type BastionHostsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.NewListPager method. +type BastionHostsClientListOptions struct { + // placeholder for future optional parameters +} + +// BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.NewListPager +// method. +type BgpServiceCommunitiesClientListOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginCreateOrUpdate +// method. +type ConfigurationPolicyGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationPolicyGroupsClientBeginDeleteOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.BeginDelete +// method. +type ConfigurationPolicyGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConfigurationPolicyGroupsClientGetOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.Get +// method. +type ConfigurationPolicyGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions contains the optional parameters for the ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager +// method. +type ConfigurationPolicyGroupsClientListByVPNServerConfigurationOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate +// method. +type ConnectionMonitorsClientBeginCreateOrUpdateOptions struct { + // Value indicating whether connection monitor V1 should be migrated to V2 format. + Migrate *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete +// method. +type ConnectionMonitorsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery +// method. +type ConnectionMonitorsClientBeginQueryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart +// method. +type ConnectionMonitorsClientBeginStartOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop method. +type ConnectionMonitorsClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. +type ConnectionMonitorsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.NewListPager method. +type ConnectionMonitorsClientListOptions struct { + // placeholder for future optional parameters +} + +// ConnectionMonitorsClientUpdateTagsOptions contains the optional parameters for the ConnectionMonitorsClient.UpdateTags +// method. +type ConnectionMonitorsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientBeginDeleteOptions contains the optional parameters for the ConnectivityConfigurationsClient.BeginDelete +// method. +type ConnectivityConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ConnectivityConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the ConnectivityConfigurationsClient.CreateOrUpdate +// method. +type ConnectivityConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientGetOptions contains the optional parameters for the ConnectivityConfigurationsClient.Get +// method. +type ConnectivityConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ConnectivityConfigurationsClientListOptions contains the optional parameters for the ConnectivityConfigurationsClient.NewListPager +// method. +type ConnectivityConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate +// method. +type CustomIPPrefixesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete method. +type CustomIPPrefixesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. +type CustomIPPrefixesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.NewListAllPager method. +type CustomIPPrefixesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.NewListPager method. +type CustomIPPrefixesClientListOptions struct { + // placeholder for future optional parameters +} + +// CustomIPPrefixesClientUpdateTagsOptions contains the optional parameters for the CustomIPPrefixesClient.UpdateTags method. +type CustomIPPrefixesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate +// method. +type DdosCustomPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete +// method. +type DdosCustomPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. +type DdosCustomPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DdosCustomPoliciesClientUpdateTagsOptions contains the optional parameters for the DdosCustomPoliciesClient.UpdateTags +// method. +type DdosCustomPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate +// method. +type DdosProtectionPlansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete +// method. +type DdosProtectionPlansClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. +type DdosProtectionPlansClientGetOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.NewListByResourceGroupPager +// method. +type DdosProtectionPlansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.NewListPager method. +type DdosProtectionPlansClientListOptions struct { + // placeholder for future optional parameters +} + +// DdosProtectionPlansClientUpdateTagsOptions contains the optional parameters for the DdosProtectionPlansClient.UpdateTags +// method. +type DdosProtectionPlansClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// DefaultSecurityRulesClientGetOptions contains the optional parameters for the DefaultSecurityRulesClient.Get method. +type DefaultSecurityRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.NewListPager +// method. +type DefaultSecurityRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate +// method. +type DscpConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete +// method. +type DscpConfigurationClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. +type DscpConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.NewListAllPager +// method. +type DscpConfigurationClientListAllOptions struct { + // placeholder for future optional parameters +} + +// DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.NewListPager method. +type DscpConfigurationClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete +// method. +type ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get +// method. +type ExpressRouteCircuitAuthorizationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.NewListPager +// method. +type ExpressRouteCircuitAuthorizationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete +// method. +type ExpressRouteCircuitConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get +// method. +type ExpressRouteCircuitConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.NewListPager +// method. +type ExpressRouteCircuitConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete +// method. +type ExpressRouteCircuitPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get +// method. +type ExpressRouteCircuitPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.NewListPager +// method. +type ExpressRouteCircuitPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCircuitsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete +// method. +type ExpressRouteCircuitsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable +// method. +type ExpressRouteCircuitsClientBeginListArpTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable +// method. +type ExpressRouteCircuitsClientBeginListRoutesTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary +// method. +type ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get method. +type ExpressRouteCircuitsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientGetPeeringStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetPeeringStats +// method. +type ExpressRouteCircuitsClientGetPeeringStatsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientGetStatsOptions contains the optional parameters for the ExpressRouteCircuitsClient.GetStats +// method. +type ExpressRouteCircuitsClientGetStatsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListAllPager +// method. +type ExpressRouteCircuitsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.NewListPager +// method. +type ExpressRouteCircuitsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCircuitsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCircuitsClient.UpdateTags +// method. +type ExpressRouteCircuitsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete +// method. +type ExpressRouteConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get method. +type ExpressRouteConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteConnectionsClientListOptions contains the optional parameters for the ExpressRouteConnectionsClient.List method. +type ExpressRouteConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete +// method. +type ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get +// method. +type ExpressRouteCrossConnectionPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.NewListPager +// method. +type ExpressRouteCrossConnectionPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate +// method. +type ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable +// method. +type ExpressRouteCrossConnectionsClientBeginListArpTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable +// method. +type ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary +// method. +type ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get +// method. +type ExpressRouteCrossConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager +// method. +type ExpressRouteCrossConnectionsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.NewListPager +// method. +type ExpressRouteCrossConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteCrossConnectionsClientUpdateTagsOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.UpdateTags +// method. +type ExpressRouteCrossConnectionsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate +// method. +type ExpressRouteGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete +// method. +type ExpressRouteGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags +// method. +type ExpressRouteGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get method. +type ExpressRouteGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListByResourceGroup +// method. +type ExpressRouteGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteGatewaysClientListBySubscriptionOptions contains the optional parameters for the ExpressRouteGatewaysClient.ListBySubscription +// method. +type ExpressRouteGatewaysClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteLinksClientGetOptions contains the optional parameters for the ExpressRouteLinksClient.Get method. +type ExpressRouteLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.NewListPager method. +type ExpressRouteLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate +// method. +type ExpressRoutePortAuthorizationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.BeginDelete +// method. +type ExpressRoutePortAuthorizationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortAuthorizationsClientGetOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.Get +// method. +type ExpressRoutePortAuthorizationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortAuthorizationsClientListOptions contains the optional parameters for the ExpressRoutePortAuthorizationsClient.NewListPager +// method. +type ExpressRoutePortAuthorizationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate +// method. +type ExpressRoutePortsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete +// method. +type ExpressRoutePortsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA +// method. +type ExpressRoutePortsClientGenerateLOAOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientGetOptions contains the optional parameters for the ExpressRoutePortsClient.Get method. +type ExpressRoutePortsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.NewListByResourceGroupPager +// method. +type ExpressRoutePortsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.NewListPager method. +type ExpressRoutePortsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsClientUpdateTagsOptions contains the optional parameters for the ExpressRoutePortsClient.UpdateTags method. +type ExpressRoutePortsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get +// method. +type ExpressRoutePortsLocationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.NewListPager +// method. +type ExpressRoutePortsLocationsClientListOptions struct { + // placeholder for future optional parameters +} + +// ExpressRouteProviderPortsLocationClientListOptions contains the optional parameters for the ExpressRouteProviderPortsLocationClient.List +// method. +type ExpressRouteProviderPortsLocationClientListOptions struct { + // The filter to apply on the operation. For example, you can use $filter=location eq '{state}'. + Filter *string +} + +// ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.NewListPager +// method. +type ExpressRouteServiceProvidersClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate +// method. +type FirewallPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete method. +type FirewallPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. +type FirewallPoliciesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.NewListAllPager method. +type FirewallPoliciesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.NewListPager method. +type FirewallPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPoliciesClientUpdateTagsOptions contains the optional parameters for the FirewallPoliciesClient.UpdateTags method. +type FirewallPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesClient.List +// method. +type FirewallPolicyIdpsSignaturesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesFilterValuesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesFilterValuesClient.List +// method. +type FirewallPolicyIdpsSignaturesFilterValuesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientGetOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Get +// method. +type FirewallPolicyIdpsSignaturesOverridesClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientListOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.List +// method. +type FirewallPolicyIdpsSignaturesOverridesClientListOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientPatchOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Patch +// method. +type FirewallPolicyIdpsSignaturesOverridesClientPatchOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyIdpsSignaturesOverridesClientPutOptions contains the optional parameters for the FirewallPolicyIdpsSignaturesOverridesClient.Put +// method. +type FirewallPolicyIdpsSignaturesOverridesClientPutOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate +// method. +type FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete +// method. +type FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get +// method. +type FirewallPolicyRuleCollectionGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.NewListPager +// method. +type FirewallPolicyRuleCollectionGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate method. +type FlowLogsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. +type FlowLogsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. +type FlowLogsClientGetOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.NewListPager method. +type FlowLogsClientListOptions struct { + // placeholder for future optional parameters +} + +// FlowLogsClientUpdateTagsOptions contains the optional parameters for the FlowLogsClient.UpdateTags method. +type FlowLogsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method. +type GroupsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// GroupsClientCreateOrUpdateOptions contains the optional parameters for the GroupsClient.CreateOrUpdate method. +type GroupsClientCreateOrUpdateOptions struct { + // The ETag of the transformation. Omit this value to always overwrite the current resource. Specify the last-seen ETag value + // to prevent accidentally overwriting concurrent changes. + IfMatch *string +} + +// GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method. +type GroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// GroupsClientListOptions contains the optional parameters for the GroupsClient.NewListPager method. +type GroupsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate +// method. +type HubRouteTablesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete method. +type HubRouteTablesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. +type HubRouteTablesClientGetOptions struct { + // placeholder for future optional parameters +} + +// HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.NewListPager method. +type HubRouteTablesClientListOptions struct { + // placeholder for future optional parameters +} + +// HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate +// method. +type HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete +// method. +type HubVirtualNetworkConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get +// method. +type HubVirtualNetworkConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.NewListPager +// method. +type HubVirtualNetworkConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate +// method. +type IPAllocationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete method. +type IPAllocationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. +type IPAllocationsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.NewListByResourceGroupPager +// method. +type IPAllocationsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.NewListPager method. +type IPAllocationsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPAllocationsClientUpdateTagsOptions contains the optional parameters for the IPAllocationsClient.UpdateTags method. +type IPAllocationsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate method. +type IPGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. +type IPGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. +type IPGroupsClientGetOptions struct { + // Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced by the IpGroups resource. + Expand *string +} + +// IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.NewListByResourceGroupPager +// method. +type IPGroupsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.NewListPager method. +type IPGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// IPGroupsClientUpdateGroupsOptions contains the optional parameters for the IPGroupsClient.UpdateGroups method. +type IPGroupsClientUpdateGroupsOptions struct { + // placeholder for future optional parameters +} + +// InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate +// method. +type InboundNatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete method. +type InboundNatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. +type InboundNatRulesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.NewListPager method. +type InboundNatRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate +// method. +type InboundSecurityRuleClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get +// method. +type InterfaceIPConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.NewListPager +// method. +type InterfaceIPConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.NewListPager +// method. +type InterfaceLoadBalancersClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate +// method. +type InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete +// method. +type InterfaceTapConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get +// method. +type InterfaceTapConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.NewListPager +// method. +type InterfaceTapConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate +// method. +type InterfacesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. +type InterfacesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable +// method. +type InterfacesClientBeginGetEffectiveRouteTableOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups +// method. +type InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface +// method. +type InterfacesClientGetCloudServiceNetworkInterfaceOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetOptions contains the optional parameters for the InterfacesClient.Get method. +type InterfacesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetIPConfiguration +// method. +type InterfacesClientGetVirtualMachineScaleSetIPConfigurationOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetVirtualMachineScaleSetNetworkInterface +// method. +type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.NewListAllPager method. +type InterfacesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceNetworkInterfacesPager +// method. +type InterfacesClientListCloudServiceNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager +// method. +type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListOptions contains the optional parameters for the InterfacesClient.NewListPager method. +type InterfacesClientListOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager +// method. +type InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions struct { + // Expands referenced resources. + Expand *string +} + +// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager +// method. +type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager +// method. +type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions struct { + // placeholder for future optional parameters +} + +// InterfacesClientUpdateTagsOptions contains the optional parameters for the InterfacesClient.UpdateTags method. +type InterfacesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate +// method. +type LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete +// method. +type LoadBalancerBackendAddressPoolsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get +// method. +type LoadBalancerBackendAddressPoolsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.NewListPager +// method. +type LoadBalancerBackendAddressPoolsClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get +// method. +type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.NewListPager +// method. +type LoadBalancerFrontendIPConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get +// method. +type LoadBalancerLoadBalancingRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.NewListPager +// method. +type LoadBalancerLoadBalancingRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.NewListPager +// method. +type LoadBalancerNetworkInterfacesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get +// method. +type LoadBalancerOutboundRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.NewListPager +// method. +type LoadBalancerOutboundRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. +type LoadBalancerProbesClientGetOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.NewListPager method. +type LoadBalancerProbesClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate +// method. +type LoadBalancersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. +type LoadBalancersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings +// method. +type LoadBalancersClientBeginListInboundNatRulePortMappingsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses +// method. +type LoadBalancersClientBeginSwapPublicIPAddressesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. +type LoadBalancersClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.NewListAllPager method. +type LoadBalancersClientListAllOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.NewListPager method. +type LoadBalancersClientListOptions struct { + // placeholder for future optional parameters +} + +// LoadBalancersClientUpdateTagsOptions contains the optional parameters for the LoadBalancersClient.UpdateTags method. +type LoadBalancersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate +// method. +type LocalNetworkGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete +// method. +type LocalNetworkGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get method. +type LocalNetworkGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.NewListPager +// method. +type LocalNetworkGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// LocalNetworkGatewaysClientUpdateTagsOptions contains the optional parameters for the LocalNetworkGatewaysClient.UpdateTags +// method. +type LocalNetworkGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink +// method. +type ManagementClientBeginDeleteBastionShareableLinkOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters for the +// ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. +type ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions +// method. +type ManagementClientBeginGetActiveSessionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink +// method. +type ManagementClientBeginPutBastionShareableLinkOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability +// method. +type ManagementClientCheckDNSNameAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.NewDisconnectActiveSessionsPager +// method. +type ManagementClientDisconnectActiveSessionsOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientExpressRouteProviderPortOptions contains the optional parameters for the ManagementClient.ExpressRouteProviderPort +// method. +type ManagementClientExpressRouteProviderPortOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.NewGetBastionShareableLinkPager +// method. +type ManagementClientGetBastionShareableLinkOptions struct { + // placeholder for future optional parameters +} + +// ManagementClientListActiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListActiveConnectivityConfigurations +// method. +type ManagementClientListActiveConnectivityConfigurationsOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListActiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListActiveSecurityAdminRules +// method. +type ManagementClientListActiveSecurityAdminRulesOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations +// method. +type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions contains the optional parameters for the ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules +// method. +type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagementClientSupportedSecurityProvidersOptions contains the optional parameters for the ManagementClient.SupportedSecurityProviders +// method. +type ManagementClientSupportedSecurityProvidersOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate +// method. +type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Delete +// method. +type ManagementGroupNetworkManagerConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientGetOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.Get +// method. +type ManagementGroupNetworkManagerConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagementGroupNetworkManagerConnectionsClientListOptions contains the optional parameters for the ManagementGroupNetworkManagerConnectionsClient.NewListPager +// method. +type ManagementGroupNetworkManagerConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagerCommitsClientBeginPostOptions contains the optional parameters for the ManagerCommitsClient.BeginPost method. +type ManagerCommitsClientBeginPostOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagerDeploymentStatusClientListOptions contains the optional parameters for the ManagerDeploymentStatusClient.List method. +type ManagerDeploymentStatusClientListOptions struct { + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientBeginDeleteOptions contains the optional parameters for the ManagersClient.BeginDelete method. +type ManagersClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ManagersClientCreateOrUpdateOptions contains the optional parameters for the ManagersClient.CreateOrUpdate method. +type ManagersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagersClientGetOptions contains the optional parameters for the ManagersClient.Get method. +type ManagersClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagersClientListBySubscriptionOptions contains the optional parameters for the ManagersClient.NewListBySubscriptionPager +// method. +type ManagersClientListBySubscriptionOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientListOptions contains the optional parameters for the ManagersClient.NewListPager method. +type ManagersClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// ManagersClientPatchOptions contains the optional parameters for the ManagersClient.Patch method. +type ManagersClientPatchOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate +// method. +type NatGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. +type NatGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. +type NatGatewaysClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.NewListAllPager method. +type NatGatewaysClientListAllOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.NewListPager method. +type NatGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// NatGatewaysClientUpdateTagsOptions contains the optional parameters for the NatGatewaysClient.UpdateTags method. +type NatGatewaysClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate method. +type NatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. +type NatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. +type NatRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.NewListByVPNGatewayPager +// method. +type NatRulesClientListByVPNGatewayOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate +// method. +type P2SVPNGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete method. +type P2SVPNGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections +// method. +type P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile +// method. +type P2SVPNGatewaysClientBeginGenerateVPNProfileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed +// method. +type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth +// method. +type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset method. +type P2SVPNGatewaysClientBeginResetOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags +// method. +type P2SVPNGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. +type P2SVPNGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListByResourceGroupPager +// method. +type P2SVPNGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.NewListPager method. +type P2SVPNGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate method. +type PacketCapturesClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete method. +type PacketCapturesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus +// method. +type PacketCapturesClientBeginGetStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop method. +type PacketCapturesClientBeginStopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. +type PacketCapturesClientGetOptions struct { + // placeholder for future optional parameters +} + +// PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.NewListPager method. +type PacketCapturesClientListOptions struct { + // placeholder for future optional parameters +} + +// PeerExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.Get +// method. +type PeerExpressRouteCircuitConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.NewListPager +// method. +type PeerExpressRouteCircuitConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate +// method. +type PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete +// method. +type PrivateDNSZoneGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get method. +type PrivateDNSZoneGroupsClientGetOptions struct { + // placeholder for future optional parameters +} + +// PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.NewListPager +// method. +type PrivateDNSZoneGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate +// method. +type PrivateEndpointsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. +type PrivateEndpointsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. +type PrivateEndpointsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.NewListBySubscriptionPager +// method. +type PrivateEndpointsClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.NewListPager method. +type PrivateEndpointsClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters +// for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. +type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility +// method. +type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate +// method. +type PrivateLinkServicesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete +// method. +type PrivateLinkServicesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection +// method. +type PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. +type PrivateLinkServicesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateLinkServicesClientGetPrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.GetPrivateEndpointConnection +// method. +type PrivateLinkServicesClientGetPrivateEndpointConnectionOptions struct { + // Expands referenced resources. + Expand *string +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters for +// the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager method. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager +// method. +type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.NewListBySubscriptionPager +// method. +type PrivateLinkServicesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPager method. +type PrivateLinkServicesClientListOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager +// method. +type PrivateLinkServicesClientListPrivateEndpointConnectionsOptions struct { + // placeholder for future optional parameters +} + +// PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.UpdatePrivateEndpointConnection +// method. +type PrivateLinkServicesClientUpdatePrivateEndpointConnectionOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. +type ProfilesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. +type ProfilesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientGetOptions contains the optional parameters for the ProfilesClient.Get method. +type ProfilesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.NewListAllPager method. +type ProfilesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientListOptions contains the optional parameters for the ProfilesClient.NewListPager method. +type ProfilesClientListOptions struct { + // placeholder for future optional parameters +} + +// ProfilesClientUpdateTagsOptions contains the optional parameters for the ProfilesClient.UpdateTags method. +type ProfilesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate +// method. +type PublicIPAddressesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientBeginDdosProtectionStatusOptions contains the optional parameters for the PublicIPAddressesClient.BeginDdosProtectionStatus +// method. +type PublicIPAddressesClientBeginDdosProtectionStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete +// method. +type PublicIPAddressesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress +// method. +type PublicIPAddressesClientGetCloudServicePublicIPAddressOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientGetOptions contains the optional parameters for the PublicIPAddressesClient.Get method. +type PublicIPAddressesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress +// method. +type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.NewListAllPager +// method. +type PublicIPAddressesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager +// method. +type PublicIPAddressesClientListCloudServicePublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager +// method. +type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.NewListPager method. +type PublicIPAddressesClientListOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager +// method. +type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager +// method. +type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions struct { + // placeholder for future optional parameters +} + +// PublicIPAddressesClientUpdateTagsOptions contains the optional parameters for the PublicIPAddressesClient.UpdateTags method. +type PublicIPAddressesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate +// method. +type PublicIPPrefixesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete method. +type PublicIPPrefixesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. +type PublicIPPrefixesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.NewListAllPager method. +type PublicIPPrefixesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.NewListPager method. +type PublicIPPrefixesClientListOptions struct { + // placeholder for future optional parameters +} + +// PublicIPPrefixesClientUpdateTagsOptions contains the optional parameters for the PublicIPPrefixesClient.UpdateTags method. +type PublicIPPrefixesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ResourceNavigationLinksClientListOptions contains the optional parameters for the ResourceNavigationLinksClient.List method. +type ResourceNavigationLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate +// method. +type RouteFilterRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete method. +type RouteFilterRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. +type RouteFilterRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.NewListByRouteFilterPager +// method. +type RouteFilterRulesClientListByRouteFilterOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate +// method. +type RouteFiltersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete method. +type RouteFiltersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. +type RouteFiltersClientGetOptions struct { + // Expands referenced express route bgp peering resources. + Expand *string +} + +// RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.NewListByResourceGroupPager +// method. +type RouteFiltersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.NewListPager method. +type RouteFiltersClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteFiltersClientUpdateTagsOptions contains the optional parameters for the RouteFiltersClient.UpdateTags method. +type RouteFiltersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// RouteMapsClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteMapsClient.BeginCreateOrUpdate +// method. +type RouteMapsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteMapsClientBeginDeleteOptions contains the optional parameters for the RouteMapsClient.BeginDelete method. +type RouteMapsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteMapsClientGetOptions contains the optional parameters for the RouteMapsClient.Get method. +type RouteMapsClientGetOptions struct { + // placeholder for future optional parameters +} + +// RouteMapsClientListOptions contains the optional parameters for the RouteMapsClient.NewListPager method. +type RouteMapsClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate +// method. +type RouteTablesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. +type RouteTablesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. +type RouteTablesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.NewListAllPager method. +type RouteTablesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.NewListPager method. +type RouteTablesClientListOptions struct { + // placeholder for future optional parameters +} + +// RouteTablesClientUpdateTagsOptions contains the optional parameters for the RouteTablesClient.UpdateTags method. +type RouteTablesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate method. +type RoutesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. +type RoutesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. +type RoutesClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutesClientListOptions contains the optional parameters for the RoutesClient.NewListPager method. +type RoutesClientListOptions struct { + // placeholder for future optional parameters +} + +// RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate +// method. +type RoutingIntentClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete method. +type RoutingIntentClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. +type RoutingIntentClientGetOptions struct { + // placeholder for future optional parameters +} + +// RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.NewListPager method. +type RoutingIntentClientListOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientCreateOrUpdateOptions contains the optional parameters for the ScopeConnectionsClient.CreateOrUpdate +// method. +type ScopeConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientDeleteOptions contains the optional parameters for the ScopeConnectionsClient.Delete method. +type ScopeConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientGetOptions contains the optional parameters for the ScopeConnectionsClient.Get method. +type ScopeConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ScopeConnectionsClientListOptions contains the optional parameters for the ScopeConnectionsClient.NewListPager method. +type ScopeConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityAdminConfigurationsClientBeginDeleteOptions contains the optional parameters for the SecurityAdminConfigurationsClient.BeginDelete +// method. +type SecurityAdminConfigurationsClientBeginDeleteOptions struct { + // Deletes the resource even if it is part of a deployed configuration. If the configuration has been deployed, the service + // will do a cleanup deployment in the background, prior to the delete. + Force *bool + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityAdminConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the SecurityAdminConfigurationsClient.CreateOrUpdate +// method. +type SecurityAdminConfigurationsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SecurityAdminConfigurationsClientGetOptions contains the optional parameters for the SecurityAdminConfigurationsClient.Get +// method. +type SecurityAdminConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityAdminConfigurationsClientListOptions contains the optional parameters for the SecurityAdminConfigurationsClient.NewListPager +// method. +type SecurityAdminConfigurationsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate +// method. +type SecurityGroupsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete method. +type SecurityGroupsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. +type SecurityGroupsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.NewListAllPager method. +type SecurityGroupsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.NewListPager method. +type SecurityGroupsClientListOptions struct { + // placeholder for future optional parameters +} + +// SecurityGroupsClientUpdateTagsOptions contains the optional parameters for the SecurityGroupsClient.UpdateTags method. +type SecurityGroupsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate +// method. +type SecurityPartnerProvidersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete +// method. +type SecurityPartnerProvidersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get method. +type SecurityPartnerProvidersClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListByResourceGroupPager +// method. +type SecurityPartnerProvidersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.NewListPager +// method. +type SecurityPartnerProvidersClientListOptions struct { + // placeholder for future optional parameters +} + +// SecurityPartnerProvidersClientUpdateTagsOptions contains the optional parameters for the SecurityPartnerProvidersClient.UpdateTags +// method. +type SecurityPartnerProvidersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate +// method. +type SecurityRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete method. +type SecurityRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. +type SecurityRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.NewListPager method. +type SecurityRulesClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List method. +type ServiceAssociationLinksClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate +// method. +type ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete +// method. +type ServiceEndpointPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get method. +type ServiceEndpointPoliciesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListByResourceGroupPager +// method. +type ServiceEndpointPoliciesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.NewListPager +// method. +type ServiceEndpointPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPoliciesClientUpdateTagsOptions contains the optional parameters for the ServiceEndpointPoliciesClient.UpdateTags +// method. +type ServiceEndpointPoliciesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate +// method. +type ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete +// method. +type ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get +// method. +type ServiceEndpointPolicyDefinitionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager +// method. +type ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.NewListPager +// method. +type ServiceTagInformationClientListOptions struct { + // Do not return address prefixes for the tag(s). + NoAddressPrefixes *bool + + // Return tag information for a particular tag. + TagName *string +} + +// ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. +type ServiceTagsClientListOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientCreateOrUpdateOptions contains the optional parameters for the StaticMembersClient.CreateOrUpdate method. +type StaticMembersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientDeleteOptions contains the optional parameters for the StaticMembersClient.Delete method. +type StaticMembersClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientGetOptions contains the optional parameters for the StaticMembersClient.Get method. +type StaticMembersClientGetOptions struct { + // placeholder for future optional parameters +} + +// StaticMembersClientListOptions contains the optional parameters for the StaticMembersClient.NewListPager method. +type StaticMembersClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate method. +type SubnetsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. +type SubnetsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies +// method. +type SubnetsClientBeginPrepareNetworkPoliciesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies +// method. +type SubnetsClientBeginUnprepareNetworkPoliciesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. +type SubnetsClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// SubnetsClientListOptions contains the optional parameters for the SubnetsClient.NewListPager method. +type SubnetsClientListOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate +// method. +type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientDeleteOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Delete +// method. +type SubscriptionNetworkManagerConnectionsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientGetOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.Get +// method. +type SubscriptionNetworkManagerConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionNetworkManagerConnectionsClientListOptions contains the optional parameters for the SubscriptionNetworkManagerConnectionsClient.NewListPager +// method. +type SubscriptionNetworkManagerConnectionsClientListOptions struct { + // SkipToken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, + // the value of the nextLink element will include a skipToken parameter that + // specifies a starting point to use for subsequent calls. + SkipToken *string + + // An optional query parameter which specifies the maximum number of records to be returned by the server. + Top *int32 +} + +// UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method. +type UsagesClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate +// method. +type VPNConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete method. +type VPNConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture +// method. +type VPNConnectionsClientBeginStartPacketCaptureOptions struct { + // Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. + Parameters *VPNConnectionPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture +// method. +type VPNConnectionsClientBeginStopPacketCaptureOptions struct { + // Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. + Parameters *VPNConnectionPacketCaptureStopParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNConnectionsClientGetOptions contains the optional parameters for the VPNConnectionsClient.Get method. +type VPNConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.NewListByVPNGatewayPager +// method. +type VPNConnectionsClientListByVPNGatewayOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate +// method. +type VPNGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. +type VPNGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. +type VPNGatewaysClientBeginResetOptions struct { + // VpnGateway ipConfigurationId to specify the gateway instance. + IPConfigurationID *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture +// method. +type VPNGatewaysClientBeginStartPacketCaptureOptions struct { + // Vpn gateway packet capture parameters supplied to start packet capture on vpn gateway. + Parameters *VPNGatewayPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture +// method. +type VPNGatewaysClientBeginStopPacketCaptureOptions struct { + // Vpn gateway packet capture parameters supplied to stop packet capture on vpn gateway. + Parameters *VPNGatewayPacketCaptureStopParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags method. +type VPNGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. +type VPNGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.NewListByResourceGroupPager +// method. +type VPNGatewaysClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.NewListPager method. +type VPNGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas +// method. +type VPNLinkConnectionsClientBeginGetIkeSasOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection +// method. +type VPNLinkConnectionsClientBeginResetConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.NewListByVPNConnectionPager +// method. +type VPNLinkConnectionsClientListByVPNConnectionOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList +// method. +type VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate +// method. +type VPNServerConfigurationsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete +// method. +type VPNServerConfigurationsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get method. +type VPNServerConfigurationsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListByResourceGroupPager +// method. +type VPNServerConfigurationsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.NewListPager +// method. +type VPNServerConfigurationsClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNServerConfigurationsClientUpdateTagsOptions contains the optional parameters for the VPNServerConfigurationsClient.UpdateTags +// method. +type VPNServerConfigurationsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get method. +type VPNSiteLinkConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinksClientGetOptions contains the optional parameters for the VPNSiteLinksClient.Get method. +type VPNSiteLinksClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.NewListByVPNSitePager +// method. +type VPNSiteLinksClientListByVPNSiteOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate method. +type VPNSitesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. +type VPNSitesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. +type VPNSitesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.NewListByResourceGroupPager +// method. +type VPNSitesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.NewListPager method. +type VPNSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesClientUpdateTagsOptions contains the optional parameters for the VPNSitesClient.UpdateTags method. +type VPNSitesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload +// method. +type VPNSitesConfigurationClientBeginDownloadOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VipSwapClientBeginCreateOptions contains the optional parameters for the VipSwapClient.BeginCreate method. +type VipSwapClientBeginCreateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VipSwapClientGetOptions contains the optional parameters for the VipSwapClient.Get method. +type VipSwapClientGetOptions struct { + // placeholder for future optional parameters +} + +// VipSwapClientListOptions contains the optional parameters for the VipSwapClient.List method. +type VipSwapClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginCreateOrUpdate +// method. +type VirtualApplianceConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceConnectionsClient.BeginDelete +// method. +type VirtualApplianceConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceConnectionsClientGetOptions contains the optional parameters for the VirtualApplianceConnectionsClient.Get +// method. +type VirtualApplianceConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceConnectionsClientListOptions contains the optional parameters for the VirtualApplianceConnectionsClient.NewListPager +// method. +type VirtualApplianceConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get method. +type VirtualApplianceSKUsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.NewListPager +// method. +type VirtualApplianceSKUsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate +// method. +type VirtualApplianceSitesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete +// method. +type VirtualApplianceSitesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get method. +type VirtualApplianceSitesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.NewListPager +// method. +type VirtualApplianceSitesClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate +// method. +type VirtualAppliancesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete +// method. +type VirtualAppliancesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. +type VirtualAppliancesClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.NewListByResourceGroupPager +// method. +type VirtualAppliancesClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.NewListPager method. +type VirtualAppliancesClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualAppliancesClientUpdateTagsOptions contains the optional parameters for the VirtualAppliancesClient.UpdateTags method. +type VirtualAppliancesClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate +// method. +type VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete +// method. +type VirtualHubBgpConnectionClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get method. +type VirtualHubBgpConnectionClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes +// method. +type VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes +// method. +type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.NewListPager +// method. +type VirtualHubBgpConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate +// method. +type VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete +// method. +type VirtualHubIPConfigurationClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get +// method. +type VirtualHubIPConfigurationClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.NewListPager +// method. +type VirtualHubIPConfigurationClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate +// method. +type VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete +// method. +type VirtualHubRouteTableV2SClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get method. +type VirtualHubRouteTableV2SClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.NewListPager +// method. +type VirtualHubRouteTableV2SClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate +// method. +type VirtualHubsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. +type VirtualHubsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes +// method. +type VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions struct { + // Parameters supplied to get the effective routes for a specific resource. + EffectiveRoutesParameters *EffectiveRoutesParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetInboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetInboundRoutes +// method. +type VirtualHubsClientBeginGetInboundRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientBeginGetOutboundRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetOutboundRoutes +// method. +type VirtualHubsClientBeginGetOutboundRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. +type VirtualHubsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.NewListByResourceGroupPager +// method. +type VirtualHubsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.NewListPager method. +type VirtualHubsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualHubsClientUpdateTagsOptions contains the optional parameters for the VirtualHubsClient.UpdateTags method. +type VirtualHubsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete +// method. +type VirtualNetworkGatewayConnectionsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas +// method. +type VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection +// method. +type VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture +// method. +type VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions struct { + // Virtual network gateway packet capture parameters supplied to start packet capture on gateway connection. + Parameters *VPNPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture +// method. +type VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags +// method. +type VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get +// method. +type VirtualNetworkGatewayConnectionsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.GetSharedKey +// method. +type VirtualNetworkGatewayConnectionsClientGetSharedKeyOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.NewListPager +// method. +type VirtualNetworkGatewayConnectionsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete +// method. +type VirtualNetworkGatewayNatRulesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get +// method. +type VirtualNetworkGatewayNatRulesClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager +// method. +type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate +// method. +type VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete +// method. +type VirtualNetworkGatewaysClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters +// for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. +type VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile +// method. +type VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage +// method. +type VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes +// method. +type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus +// method. +type VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions struct { + // The IP address of the peer to retrieve the status of. + Peer *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes +// method. +type VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL +// method. +type VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth +// method. +type VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters +// method. +type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset +// method. +type VirtualNetworkGatewaysClientBeginResetOptions struct { + // Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. + GatewayVip *string + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey +// method. +type VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters +// method. +type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture +// method. +type VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions struct { + // Virtual network gateway packet capture parameters supplied to start packet capture on gateway. + Parameters *VPNPacketCaptureStartParameters + + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture +// method. +type VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags +// method. +type VirtualNetworkGatewaysClientBeginUpdateTagsOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get method. +type VirtualNetworkGatewaysClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListConnectionsPager +// method. +type VirtualNetworkGatewaysClientListConnectionsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.NewListPager +// method. +type VirtualNetworkGatewaysClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientSupportedVPNDevicesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.SupportedVPNDevices +// method. +type VirtualNetworkGatewaysClientSupportedVPNDevicesOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions contains the optional parameters for the VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript +// method. +type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated. + SyncRemoteAddressSpace *SyncRemoteAddressSpace +} + +// VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete +// method. +type VirtualNetworkPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get method. +type VirtualNetworkPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.NewListPager +// method. +type VirtualNetworkPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate +// method. +type VirtualNetworkTapsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete +// method. +type VirtualNetworkTapsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. +type VirtualNetworkTapsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListAllPager +// method. +type VirtualNetworkTapsClientListAllOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.NewListByResourceGroupPager +// method. +type VirtualNetworkTapsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworkTapsClientUpdateTagsOptions contains the optional parameters for the VirtualNetworkTapsClient.UpdateTags +// method. +type VirtualNetworkTapsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate +// method. +type VirtualNetworksClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. +type VirtualNetworksClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualNetworksClientBeginListDdosProtectionStatusOptions contains the optional parameters for the VirtualNetworksClient.BeginListDdosProtectionStatus +// method. +type VirtualNetworksClientBeginListDdosProtectionStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string + + // The skipToken that is given with nextLink. + SkipToken *string + + // The max number of ip addresses to return. + Top *int32 +} + +// VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability +// method. +type VirtualNetworksClientCheckIPAddressAvailabilityOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method. +type VirtualNetworksClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.NewListAllPager method. +type VirtualNetworksClientListAllOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.NewListPager method. +type VirtualNetworksClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.NewListUsagePager +// method. +type VirtualNetworksClientListUsageOptions struct { + // placeholder for future optional parameters +} + +// VirtualNetworksClientUpdateTagsOptions contains the optional parameters for the VirtualNetworksClient.UpdateTags method. +type VirtualNetworksClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate +// method. +type VirtualRouterPeeringsClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete +// method. +type VirtualRouterPeeringsClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get method. +type VirtualRouterPeeringsClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.NewListPager +// method. +type VirtualRouterPeeringsClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate +// method. +type VirtualRoutersClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete method. +type VirtualRoutersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. +type VirtualRoutersClientGetOptions struct { + // Expands referenced resources. + Expand *string +} + +// VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.NewListByResourceGroupPager +// method. +type VirtualRoutersClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.NewListPager method. +type VirtualRoutersClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate +// method. +type VirtualWansClientBeginCreateOrUpdateOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. +type VirtualWansClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. +type VirtualWansClientGetOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.NewListByResourceGroupPager +// method. +type VirtualWansClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.NewListPager method. +type VirtualWansClientListOptions struct { + // placeholder for future optional parameters +} + +// VirtualWansClientUpdateTagsOptions contains the optional parameters for the VirtualWansClient.UpdateTags method. +type VirtualWansClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity +// method. +type WatchersClientBeginCheckConnectivityOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. +type WatchersClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport +// method. +type WatchersClientBeginGetAzureReachabilityReportOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus +// method. +type WatchersClientBeginGetFlowLogStatusOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic +// method. +type WatchersClientBeginGetNetworkConfigurationDiagnosticOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop method. +type WatchersClientBeginGetNextHopOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting +// method. +type WatchersClientBeginGetTroubleshootingOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult +// method. +type WatchersClientBeginGetTroubleshootingResultOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules +// method. +type WatchersClientBeginGetVMSecurityRulesOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders +// method. +type WatchersClientBeginListAvailableProvidersOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration +// method. +type WatchersClientBeginSetFlowLogConfigurationOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow method. +type WatchersClientBeginVerifyIPFlowOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. +type WatchersClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientGetOptions contains the optional parameters for the WatchersClient.Get method. +type WatchersClientGetOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientGetTopologyOptions contains the optional parameters for the WatchersClient.GetTopology method. +type WatchersClientGetTopologyOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientListAllOptions contains the optional parameters for the WatchersClient.NewListAllPager method. +type WatchersClientListAllOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientListOptions contains the optional parameters for the WatchersClient.NewListPager method. +type WatchersClientListOptions struct { + // placeholder for future optional parameters +} + +// WatchersClientUpdateTagsOptions contains the optional parameters for the WatchersClient.UpdateTags method. +type WatchersClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete +// method. +type WebApplicationFirewallPoliciesClientBeginDeleteOptions struct { + // Resumes the LRO from the provided token. + ResumeToken string +} + +// WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate +// method. +type WebApplicationFirewallPoliciesClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientGetOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.Get +// method. +type WebApplicationFirewallPoliciesClientGetOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListAllPager +// method. +type WebApplicationFirewallPoliciesClientListAllOptions struct { + // placeholder for future optional parameters +} + +// WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.NewListPager +// method. +type WebApplicationFirewallPoliciesClientListOptions struct { + // placeholder for future optional parameters +} + +// WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. +type WebCategoriesClientGetOptions struct { + // Expands resourceIds back referenced by the azureWebCategory resource. + Expand *string +} + +// WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.NewListBySubscriptionPager +// method. +type WebCategoriesClientListBySubscriptionOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/network/armnetwork/response_types.go b/sdk/resourcemanager/network/armnetwork/response_types.go index 4cdf009ba2a9..11e5d0ad2792 100644 --- a/sdk/resourcemanager/network/armnetwork/response_types.go +++ b/sdk/resourcemanager/network/armnetwork/response_types.go @@ -12,6 +12,7 @@ import "encoding/json" // AdminRuleCollectionsClientCreateOrUpdateResponse contains the response from method AdminRuleCollectionsClient.CreateOrUpdate. type AdminRuleCollectionsClientCreateOrUpdateResponse struct { + // Defines the admin rule collection. AdminRuleCollection } @@ -22,16 +23,19 @@ type AdminRuleCollectionsClientDeleteResponse struct { // AdminRuleCollectionsClientGetResponse contains the response from method AdminRuleCollectionsClient.Get. type AdminRuleCollectionsClientGetResponse struct { + // Defines the admin rule collection. AdminRuleCollection } // AdminRuleCollectionsClientListResponse contains the response from method AdminRuleCollectionsClient.NewListPager. type AdminRuleCollectionsClientListResponse struct { + // Security admin configuration rule collection list result. AdminRuleCollectionListResult } // AdminRulesClientCreateOrUpdateResponse contains the response from method AdminRulesClient.CreateOrUpdate. type AdminRulesClientCreateOrUpdateResponse struct { + // Network base admin rule. BaseAdminRuleClassification } @@ -52,6 +56,7 @@ type AdminRulesClientDeleteResponse struct { // AdminRulesClientGetResponse contains the response from method AdminRulesClient.Get. type AdminRulesClientGetResponse struct { + // Network base admin rule. BaseAdminRuleClassification } @@ -67,6 +72,7 @@ func (a *AdminRulesClientGetResponse) UnmarshalJSON(data []byte) error { // AdminRulesClientListResponse contains the response from method AdminRulesClient.NewListPager. type AdminRulesClientListResponse struct { + // security configuration admin rule list result. AdminRuleListResult } @@ -77,46 +83,57 @@ type ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse struct { // ApplicationGatewayPrivateEndpointConnectionsClientGetResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Get. type ApplicationGatewayPrivateEndpointConnectionsClientGetResponse struct { + // Private Endpoint connection on an application gateway. ApplicationGatewayPrivateEndpointConnection } // ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.NewListPager. type ApplicationGatewayPrivateEndpointConnectionsClientListResponse struct { + // Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for + // an application gateway. ApplicationGatewayPrivateEndpointConnectionListResult } // ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate. type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse struct { + // Private Endpoint connection on an application gateway. ApplicationGatewayPrivateEndpointConnection } // ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.NewListPager. type ApplicationGatewayPrivateLinkResourcesClientListResponse struct { + // Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application + // gateway. ApplicationGatewayPrivateLinkResourceListResult } // ApplicationGatewayWafDynamicManifestsClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsClient.NewGetPager. type ApplicationGatewayWafDynamicManifestsClientGetResponse struct { + // Response for ApplicationGatewayWafDynamicManifests API service call. ApplicationGatewayWafDynamicManifestResultList } // ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse contains the response from method ApplicationGatewayWafDynamicManifestsDefaultClient.Get. type ApplicationGatewayWafDynamicManifestsDefaultClientGetResponse struct { + // Response for ApplicationGatewayWafDynamicManifest API service call. ApplicationGatewayWafDynamicManifestResult } // ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealthOnDemand. type ApplicationGatewaysClientBackendHealthOnDemandResponse struct { + // Result of on demand test probe. ApplicationGatewayBackendHealthOnDemand } // ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BeginBackendHealth. type ApplicationGatewaysClientBackendHealthResponse struct { + // Response for ApplicationGatewayBackendHealth API service call. ApplicationGatewayBackendHealth } // ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.BeginCreateOrUpdate. type ApplicationGatewaysClientCreateOrUpdateResponse struct { + // Application gateway resource. ApplicationGateway } @@ -127,16 +144,19 @@ type ApplicationGatewaysClientDeleteResponse struct { // ApplicationGatewaysClientGetResponse contains the response from method ApplicationGatewaysClient.Get. type ApplicationGatewaysClientGetResponse struct { + // Application gateway resource. ApplicationGateway } // ApplicationGatewaysClientGetSSLPredefinedPolicyResponse contains the response from method ApplicationGatewaysClient.GetSSLPredefinedPolicy. type ApplicationGatewaysClientGetSSLPredefinedPolicyResponse struct { + // An Ssl predefined policy. ApplicationGatewaySSLPredefinedPolicy } // ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.NewListAllPager. type ApplicationGatewaysClientListAllResponse struct { + // Response for ListApplicationGateways API service call. ApplicationGatewayListResult } @@ -154,11 +174,13 @@ type ApplicationGatewaysClientListAvailableResponseHeadersResponse struct { // ApplicationGatewaysClientListAvailableSSLOptionsResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLOptions. type ApplicationGatewaysClientListAvailableSSLOptionsResponse struct { + // Response for ApplicationGatewayAvailableSslOptions API service call. ApplicationGatewayAvailableSSLOptions } // ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.NewListAvailableSSLPredefinedPoliciesPager. type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse struct { + // Response for ApplicationGatewayAvailableSslOptions API service call. ApplicationGatewayAvailableSSLPredefinedPolicies } @@ -170,11 +192,13 @@ type ApplicationGatewaysClientListAvailableServerVariablesResponse struct { // ApplicationGatewaysClientListAvailableWafRuleSetsResponse contains the response from method ApplicationGatewaysClient.ListAvailableWafRuleSets. type ApplicationGatewaysClientListAvailableWafRuleSetsResponse struct { + // Response for ApplicationGatewayAvailableWafRuleSets API service call. ApplicationGatewayAvailableWafRuleSetsResult } // ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.NewListPager. type ApplicationGatewaysClientListResponse struct { + // Response for ListApplicationGateways API service call. ApplicationGatewayListResult } @@ -190,11 +214,13 @@ type ApplicationGatewaysClientStopResponse struct { // ApplicationGatewaysClientUpdateTagsResponse contains the response from method ApplicationGatewaysClient.UpdateTags. type ApplicationGatewaysClientUpdateTagsResponse struct { + // Application gateway resource. ApplicationGateway } // ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.BeginCreateOrUpdate. type ApplicationSecurityGroupsClientCreateOrUpdateResponse struct { + // An application security group in a resource group. ApplicationSecurityGroup } @@ -205,66 +231,79 @@ type ApplicationSecurityGroupsClientDeleteResponse struct { // ApplicationSecurityGroupsClientGetResponse contains the response from method ApplicationSecurityGroupsClient.Get. type ApplicationSecurityGroupsClientGetResponse struct { + // An application security group in a resource group. ApplicationSecurityGroup } // ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.NewListAllPager. type ApplicationSecurityGroupsClientListAllResponse struct { + // A list of application security groups. ApplicationSecurityGroupListResult } // ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.NewListPager. type ApplicationSecurityGroupsClientListResponse struct { + // A list of application security groups. ApplicationSecurityGroupListResult } // ApplicationSecurityGroupsClientUpdateTagsResponse contains the response from method ApplicationSecurityGroupsClient.UpdateTags. type ApplicationSecurityGroupsClientUpdateTagsResponse struct { + // An application security group in a resource group. ApplicationSecurityGroup } // AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.NewListPager. type AvailableDelegationsClientListResponse struct { + // An array of available delegations. AvailableDelegationsResult } // AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.NewListPager. type AvailableEndpointServicesClientListResponse struct { + // Response for the ListAvailableEndpointServices API service call. EndpointServicesListResult } // AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListByResourceGroupPager. type AvailablePrivateEndpointTypesClientListByResourceGroupResponse struct { + // An array of available PrivateEndpoint types. AvailablePrivateEndpointTypesResult } // AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.NewListPager. type AvailablePrivateEndpointTypesClientListResponse struct { + // An array of available PrivateEndpoint types. AvailablePrivateEndpointTypesResult } // AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.NewListPager. type AvailableResourceGroupDelegationsClientListResponse struct { + // An array of available delegations. AvailableDelegationsResult } // AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.NewListByResourceGroupPager. type AvailableServiceAliasesClientListByResourceGroupResponse struct { + // An array of available service aliases. AvailableServiceAliasesResult } // AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.NewListPager. type AvailableServiceAliasesClientListResponse struct { + // An array of available service aliases. AvailableServiceAliasesResult } // AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.NewListAllPager. type AzureFirewallFqdnTagsClientListAllResponse struct { + // Response for ListAzureFirewallFqdnTags API service call. AzureFirewallFqdnTagListResult } // AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.BeginCreateOrUpdate. type AzureFirewallsClientCreateOrUpdateResponse struct { + // Azure Firewall resource. AzureFirewall } @@ -275,21 +314,25 @@ type AzureFirewallsClientDeleteResponse struct { // AzureFirewallsClientGetResponse contains the response from method AzureFirewallsClient.Get. type AzureFirewallsClientGetResponse struct { + // Azure Firewall resource. AzureFirewall } // AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.NewListAllPager. type AzureFirewallsClientListAllResponse struct { + // Response for ListAzureFirewalls API service call. AzureFirewallListResult } // AzureFirewallsClientListLearnedPrefixesResponse contains the response from method AzureFirewallsClient.BeginListLearnedPrefixes. type AzureFirewallsClientListLearnedPrefixesResponse struct { + // List of SNAT IP Prefixes learnt by firewall to not SNAT IPPrefixesList } // AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.NewListPager. type AzureFirewallsClientListResponse struct { + // Response for ListAzureFirewalls API service call. AzureFirewallListResult } @@ -300,11 +343,13 @@ type AzureFirewallsClientPacketCaptureResponse struct { // AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.BeginUpdateTags. type AzureFirewallsClientUpdateTagsResponse struct { + // Azure Firewall resource. AzureFirewall } // BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.BeginCreateOrUpdate. type BastionHostsClientCreateOrUpdateResponse struct { + // Bastion Host resource. BastionHost } @@ -315,31 +360,37 @@ type BastionHostsClientDeleteResponse struct { // BastionHostsClientGetResponse contains the response from method BastionHostsClient.Get. type BastionHostsClientGetResponse struct { + // Bastion Host resource. BastionHost } // BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.NewListByResourceGroupPager. type BastionHostsClientListByResourceGroupResponse struct { + // Response for ListBastionHosts API service call. BastionHostListResult } // BastionHostsClientListResponse contains the response from method BastionHostsClient.NewListPager. type BastionHostsClientListResponse struct { + // Response for ListBastionHosts API service call. BastionHostListResult } // BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.BeginUpdateTags. type BastionHostsClientUpdateTagsResponse struct { + // Bastion Host resource. BastionHost } // BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.NewListPager. type BgpServiceCommunitiesClientListResponse struct { + // Response for the ListServiceCommunity API service call. BgpServiceCommunityListResult } // ConfigurationPolicyGroupsClientCreateOrUpdateResponse contains the response from method ConfigurationPolicyGroupsClient.BeginCreateOrUpdate. type ConfigurationPolicyGroupsClientCreateOrUpdateResponse struct { + // VpnServerConfigurationPolicyGroup Resource. VPNServerConfigurationPolicyGroup } @@ -350,16 +401,20 @@ type ConfigurationPolicyGroupsClientDeleteResponse struct { // ConfigurationPolicyGroupsClientGetResponse contains the response from method ConfigurationPolicyGroupsClient.Get. type ConfigurationPolicyGroupsClientGetResponse struct { + // VpnServerConfigurationPolicyGroup Resource. VPNServerConfigurationPolicyGroup } // ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse contains the response from method ConfigurationPolicyGroupsClient.NewListByVPNServerConfigurationPager. type ConfigurationPolicyGroupsClientListByVPNServerConfigurationResponse struct { + // Result of the request to list VpnServerConfigurationPolicyGroups. It contains a list of VpnServerConfigurationPolicyGroups + // and a URL nextLink to get the next set of results. ListVPNServerConfigurationPolicyGroupsResult } // ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.BeginCreateOrUpdate. type ConnectionMonitorsClientCreateOrUpdateResponse struct { + // Information about the connection monitor. ConnectionMonitorResult } @@ -370,16 +425,19 @@ type ConnectionMonitorsClientDeleteResponse struct { // ConnectionMonitorsClientGetResponse contains the response from method ConnectionMonitorsClient.Get. type ConnectionMonitorsClientGetResponse struct { + // Information about the connection monitor. ConnectionMonitorResult } // ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.NewListPager. type ConnectionMonitorsClientListResponse struct { + // List of connection monitors. ConnectionMonitorListResult } // ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.BeginQuery. type ConnectionMonitorsClientQueryResponse struct { + // List of connection states snapshots. ConnectionMonitorQueryResult } @@ -395,11 +453,13 @@ type ConnectionMonitorsClientStopResponse struct { // ConnectionMonitorsClientUpdateTagsResponse contains the response from method ConnectionMonitorsClient.UpdateTags. type ConnectionMonitorsClientUpdateTagsResponse struct { + // Information about the connection monitor. ConnectionMonitorResult } // ConnectivityConfigurationsClientCreateOrUpdateResponse contains the response from method ConnectivityConfigurationsClient.CreateOrUpdate. type ConnectivityConfigurationsClientCreateOrUpdateResponse struct { + // The network manager connectivity configuration resource ConnectivityConfiguration } @@ -410,16 +470,20 @@ type ConnectivityConfigurationsClientDeleteResponse struct { // ConnectivityConfigurationsClientGetResponse contains the response from method ConnectivityConfigurationsClient.Get. type ConnectivityConfigurationsClientGetResponse struct { + // The network manager connectivity configuration resource ConnectivityConfiguration } // ConnectivityConfigurationsClientListResponse contains the response from method ConnectivityConfigurationsClient.NewListPager. type ConnectivityConfigurationsClientListResponse struct { + // Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link + // to get the next set of results. ConnectivityConfigurationListResult } // CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.BeginCreateOrUpdate. type CustomIPPrefixesClientCreateOrUpdateResponse struct { + // Custom IP prefix resource. CustomIPPrefix } @@ -430,26 +494,31 @@ type CustomIPPrefixesClientDeleteResponse struct { // CustomIPPrefixesClientGetResponse contains the response from method CustomIPPrefixesClient.Get. type CustomIPPrefixesClientGetResponse struct { + // Custom IP prefix resource. CustomIPPrefix } // CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.NewListAllPager. type CustomIPPrefixesClientListAllResponse struct { + // Response for ListCustomIpPrefixes API service call. CustomIPPrefixListResult } // CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.NewListPager. type CustomIPPrefixesClientListResponse struct { + // Response for ListCustomIpPrefixes API service call. CustomIPPrefixListResult } // CustomIPPrefixesClientUpdateTagsResponse contains the response from method CustomIPPrefixesClient.UpdateTags. type CustomIPPrefixesClientUpdateTagsResponse struct { + // Custom IP prefix resource. CustomIPPrefix } // DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.BeginCreateOrUpdate. type DdosCustomPoliciesClientCreateOrUpdateResponse struct { + // A DDoS custom policy in a resource group. DdosCustomPolicy } @@ -460,16 +529,19 @@ type DdosCustomPoliciesClientDeleteResponse struct { // DdosCustomPoliciesClientGetResponse contains the response from method DdosCustomPoliciesClient.Get. type DdosCustomPoliciesClientGetResponse struct { + // A DDoS custom policy in a resource group. DdosCustomPolicy } // DdosCustomPoliciesClientUpdateTagsResponse contains the response from method DdosCustomPoliciesClient.UpdateTags. type DdosCustomPoliciesClientUpdateTagsResponse struct { + // A DDoS custom policy in a resource group. DdosCustomPolicy } // DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.BeginCreateOrUpdate. type DdosProtectionPlansClientCreateOrUpdateResponse struct { + // A DDoS protection plan in a resource group. DdosProtectionPlan } @@ -480,36 +552,43 @@ type DdosProtectionPlansClientDeleteResponse struct { // DdosProtectionPlansClientGetResponse contains the response from method DdosProtectionPlansClient.Get. type DdosProtectionPlansClientGetResponse struct { + // A DDoS protection plan in a resource group. DdosProtectionPlan } // DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.NewListByResourceGroupPager. type DdosProtectionPlansClientListByResourceGroupResponse struct { + // A list of DDoS protection plans. DdosProtectionPlanListResult } // DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.NewListPager. type DdosProtectionPlansClientListResponse struct { + // A list of DDoS protection plans. DdosProtectionPlanListResult } // DdosProtectionPlansClientUpdateTagsResponse contains the response from method DdosProtectionPlansClient.UpdateTags. type DdosProtectionPlansClientUpdateTagsResponse struct { + // A DDoS protection plan in a resource group. DdosProtectionPlan } // DefaultSecurityRulesClientGetResponse contains the response from method DefaultSecurityRulesClient.Get. type DefaultSecurityRulesClientGetResponse struct { + // Network security rule. SecurityRule } // DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.NewListPager. type DefaultSecurityRulesClientListResponse struct { + // Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. SecurityRuleListResult } // DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.BeginCreateOrUpdate. type DscpConfigurationClientCreateOrUpdateResponse struct { + // Differentiated Services Code Point configuration for any given network interface DscpConfiguration } @@ -520,21 +599,25 @@ type DscpConfigurationClientDeleteResponse struct { // DscpConfigurationClientGetResponse contains the response from method DscpConfigurationClient.Get. type DscpConfigurationClientGetResponse struct { + // Differentiated Services Code Point configuration for any given network interface DscpConfiguration } // DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.NewListAllPager. type DscpConfigurationClientListAllResponse struct { + // Response for the DscpConfigurationList API service call. DscpConfigurationListResult } // DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.NewListPager. type DscpConfigurationClientListResponse struct { + // Response for the DscpConfigurationList API service call. DscpConfigurationListResult } // ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate. type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse struct { + // Authorization in an ExpressRouteCircuit resource. ExpressRouteCircuitAuthorization } @@ -545,16 +628,19 @@ type ExpressRouteCircuitAuthorizationsClientDeleteResponse struct { // ExpressRouteCircuitAuthorizationsClientGetResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Get. type ExpressRouteCircuitAuthorizationsClientGetResponse struct { + // Authorization in an ExpressRouteCircuit resource. ExpressRouteCircuitAuthorization } // ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.NewListPager. type ExpressRouteCircuitAuthorizationsClientListResponse struct { + // Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. AuthorizationListResult } // ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate. type ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse struct { + // Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. ExpressRouteCircuitConnection } @@ -565,16 +651,20 @@ type ExpressRouteCircuitConnectionsClientDeleteResponse struct { // ExpressRouteCircuitConnectionsClientGetResponse contains the response from method ExpressRouteCircuitConnectionsClient.Get. type ExpressRouteCircuitConnectionsClientGetResponse struct { + // Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. ExpressRouteCircuitConnection } // ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.NewListPager. type ExpressRouteCircuitConnectionsClientListResponse struct { + // Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering + // for an ExpressRouteCircuit. ExpressRouteCircuitConnectionListResult } // ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate. type ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse struct { + // Peering in an ExpressRouteCircuit resource. ExpressRouteCircuitPeering } @@ -585,16 +675,19 @@ type ExpressRouteCircuitPeeringsClientDeleteResponse struct { // ExpressRouteCircuitPeeringsClientGetResponse contains the response from method ExpressRouteCircuitPeeringsClient.Get. type ExpressRouteCircuitPeeringsClientGetResponse struct { + // Peering in an ExpressRouteCircuit resource. ExpressRouteCircuitPeering } // ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.NewListPager. type ExpressRouteCircuitPeeringsClientListResponse struct { + // Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. ExpressRouteCircuitPeeringListResult } // ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.BeginCreateOrUpdate. type ExpressRouteCircuitsClientCreateOrUpdateResponse struct { + // ExpressRouteCircuit resource. ExpressRouteCircuit } @@ -605,51 +698,61 @@ type ExpressRouteCircuitsClientDeleteResponse struct { // ExpressRouteCircuitsClientGetPeeringStatsResponse contains the response from method ExpressRouteCircuitsClient.GetPeeringStats. type ExpressRouteCircuitsClientGetPeeringStatsResponse struct { + // Contains stats associated with the peering. ExpressRouteCircuitStats } // ExpressRouteCircuitsClientGetResponse contains the response from method ExpressRouteCircuitsClient.Get. type ExpressRouteCircuitsClientGetResponse struct { + // ExpressRouteCircuit resource. ExpressRouteCircuit } // ExpressRouteCircuitsClientGetStatsResponse contains the response from method ExpressRouteCircuitsClient.GetStats. type ExpressRouteCircuitsClientGetStatsResponse struct { + // Contains stats associated with the peering. ExpressRouteCircuitStats } // ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.NewListAllPager. type ExpressRouteCircuitsClientListAllResponse struct { + // Response for ListExpressRouteCircuit API service call. ExpressRouteCircuitListResult } // ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListArpTable. type ExpressRouteCircuitsClientListArpTableResponse struct { + // Response for ListArpTable associated with the Express Route Circuits API. ExpressRouteCircuitsArpTableListResult } // ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.NewListPager. type ExpressRouteCircuitsClientListResponse struct { + // Response for ListExpressRouteCircuit API service call. ExpressRouteCircuitListResult } // ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTable. type ExpressRouteCircuitsClientListRoutesTableResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. ExpressRouteCircuitsRoutesTableListResult } // ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.BeginListRoutesTableSummary. type ExpressRouteCircuitsClientListRoutesTableSummaryResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. ExpressRouteCircuitsRoutesTableSummaryListResult } // ExpressRouteCircuitsClientUpdateTagsResponse contains the response from method ExpressRouteCircuitsClient.UpdateTags. type ExpressRouteCircuitsClientUpdateTagsResponse struct { + // ExpressRouteCircuit resource. ExpressRouteCircuit } // ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.BeginCreateOrUpdate. type ExpressRouteConnectionsClientCreateOrUpdateResponse struct { + // ExpressRouteConnection resource. ExpressRouteConnection } @@ -660,16 +763,19 @@ type ExpressRouteConnectionsClientDeleteResponse struct { // ExpressRouteConnectionsClientGetResponse contains the response from method ExpressRouteConnectionsClient.Get. type ExpressRouteConnectionsClientGetResponse struct { + // ExpressRouteConnection resource. ExpressRouteConnection } // ExpressRouteConnectionsClientListResponse contains the response from method ExpressRouteConnectionsClient.List. type ExpressRouteConnectionsClientListResponse struct { + // ExpressRouteConnection list. ExpressRouteConnectionList } // ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate. type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse struct { + // Peering in an ExpressRoute Cross Connection resource. ExpressRouteCrossConnectionPeering } @@ -680,56 +786,67 @@ type ExpressRouteCrossConnectionPeeringsClientDeleteResponse struct { // ExpressRouteCrossConnectionPeeringsClientGetResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Get. type ExpressRouteCrossConnectionPeeringsClientGetResponse struct { + // Peering in an ExpressRoute Cross Connection resource. ExpressRouteCrossConnectionPeering } // ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.NewListPager. type ExpressRouteCrossConnectionPeeringsClientListResponse struct { + // Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. ExpressRouteCrossConnectionPeeringList } // ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate. type ExpressRouteCrossConnectionsClientCreateOrUpdateResponse struct { + // ExpressRouteCrossConnection resource. ExpressRouteCrossConnection } // ExpressRouteCrossConnectionsClientGetResponse contains the response from method ExpressRouteCrossConnectionsClient.Get. type ExpressRouteCrossConnectionsClientGetResponse struct { + // ExpressRouteCrossConnection resource. ExpressRouteCrossConnection } // ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListArpTable. type ExpressRouteCrossConnectionsClientListArpTableResponse struct { + // Response for ListArpTable associated with the Express Route Circuits API. ExpressRouteCircuitsArpTableListResult } // ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListByResourceGroupPager. type ExpressRouteCrossConnectionsClientListByResourceGroupResponse struct { + // Response for ListExpressRouteCrossConnection API service call. ExpressRouteCrossConnectionListResult } // ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.NewListPager. type ExpressRouteCrossConnectionsClientListResponse struct { + // Response for ListExpressRouteCrossConnection API service call. ExpressRouteCrossConnectionListResult } // ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTable. type ExpressRouteCrossConnectionsClientListRoutesTableResponse struct { + // Response for ListRoutesTable associated with the Express Route Circuits API. ExpressRouteCircuitsRoutesTableListResult } // ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary. type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse struct { + // Response for ListRoutesTable associated with the Express Route Cross Connections. ExpressRouteCrossConnectionsRoutesTableSummaryListResult } // ExpressRouteCrossConnectionsClientUpdateTagsResponse contains the response from method ExpressRouteCrossConnectionsClient.UpdateTags. type ExpressRouteCrossConnectionsClientUpdateTagsResponse struct { + // ExpressRouteCrossConnection resource. ExpressRouteCrossConnection } // ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.BeginCreateOrUpdate. type ExpressRouteGatewaysClientCreateOrUpdateResponse struct { + // ExpressRoute gateway resource. ExpressRouteGateway } @@ -740,36 +857,43 @@ type ExpressRouteGatewaysClientDeleteResponse struct { // ExpressRouteGatewaysClientGetResponse contains the response from method ExpressRouteGatewaysClient.Get. type ExpressRouteGatewaysClientGetResponse struct { + // ExpressRoute gateway resource. ExpressRouteGateway } // ExpressRouteGatewaysClientListByResourceGroupResponse contains the response from method ExpressRouteGatewaysClient.ListByResourceGroup. type ExpressRouteGatewaysClientListByResourceGroupResponse struct { + // List of ExpressRoute gateways. ExpressRouteGatewayList } // ExpressRouteGatewaysClientListBySubscriptionResponse contains the response from method ExpressRouteGatewaysClient.ListBySubscription. type ExpressRouteGatewaysClientListBySubscriptionResponse struct { + // List of ExpressRoute gateways. ExpressRouteGatewayList } // ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.BeginUpdateTags. type ExpressRouteGatewaysClientUpdateTagsResponse struct { + // ExpressRoute gateway resource. ExpressRouteGateway } // ExpressRouteLinksClientGetResponse contains the response from method ExpressRouteLinksClient.Get. type ExpressRouteLinksClientGetResponse struct { + // ExpressRouteLink child resource definition. ExpressRouteLink } // ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.NewListPager. type ExpressRouteLinksClientListResponse struct { + // Response for ListExpressRouteLinks API service call. ExpressRouteLinkListResult } // ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortAuthorizationsClient.BeginCreateOrUpdate. type ExpressRoutePortAuthorizationsClientCreateOrUpdateResponse struct { + // ExpressRoutePort Authorization resource definition. ExpressRoutePortAuthorization } @@ -780,16 +904,19 @@ type ExpressRoutePortAuthorizationsClientDeleteResponse struct { // ExpressRoutePortAuthorizationsClientGetResponse contains the response from method ExpressRoutePortAuthorizationsClient.Get. type ExpressRoutePortAuthorizationsClientGetResponse struct { + // ExpressRoutePort Authorization resource definition. ExpressRoutePortAuthorization } // ExpressRoutePortAuthorizationsClientListResponse contains the response from method ExpressRoutePortAuthorizationsClient.NewListPager. type ExpressRoutePortAuthorizationsClientListResponse struct { + // Response for ListExpressRoutePortAuthorizations API service call. ExpressRoutePortAuthorizationListResult } // ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.BeginCreateOrUpdate. type ExpressRoutePortsClientCreateOrUpdateResponse struct { + // ExpressRoutePort resource definition. ExpressRoutePort } @@ -800,51 +927,61 @@ type ExpressRoutePortsClientDeleteResponse struct { // ExpressRoutePortsClientGenerateLOAResponse contains the response from method ExpressRoutePortsClient.GenerateLOA. type ExpressRoutePortsClientGenerateLOAResponse struct { + // Response for GenerateExpressRoutePortsLOA API service call. GenerateExpressRoutePortsLOAResult } // ExpressRoutePortsClientGetResponse contains the response from method ExpressRoutePortsClient.Get. type ExpressRoutePortsClientGetResponse struct { + // ExpressRoutePort resource definition. ExpressRoutePort } // ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.NewListByResourceGroupPager. type ExpressRoutePortsClientListByResourceGroupResponse struct { + // Response for ListExpressRoutePorts API service call. ExpressRoutePortListResult } // ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.NewListPager. type ExpressRoutePortsClientListResponse struct { + // Response for ListExpressRoutePorts API service call. ExpressRoutePortListResult } // ExpressRoutePortsClientUpdateTagsResponse contains the response from method ExpressRoutePortsClient.UpdateTags. type ExpressRoutePortsClientUpdateTagsResponse struct { + // ExpressRoutePort resource definition. ExpressRoutePort } // ExpressRoutePortsLocationsClientGetResponse contains the response from method ExpressRoutePortsLocationsClient.Get. type ExpressRoutePortsLocationsClientGetResponse struct { + // Definition of the ExpressRoutePorts peering location resource. ExpressRoutePortsLocation } // ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.NewListPager. type ExpressRoutePortsLocationsClientListResponse struct { + // Response for ListExpressRoutePortsLocations API service call. ExpressRoutePortsLocationListResult } // ExpressRouteProviderPortsLocationClientListResponse contains the response from method ExpressRouteProviderPortsLocationClient.List. type ExpressRouteProviderPortsLocationClientListResponse struct { + // Response for ListExpressRouteProviderPort API service call. ExpressRouteProviderPortListResult } // ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.NewListPager. type ExpressRouteServiceProvidersClientListResponse struct { + // Response for the ListExpressRouteServiceProvider API service call. ExpressRouteServiceProviderListResult } // FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.BeginCreateOrUpdate. type FirewallPoliciesClientCreateOrUpdateResponse struct { + // FirewallPolicy Resource. FirewallPolicy } @@ -855,56 +992,67 @@ type FirewallPoliciesClientDeleteResponse struct { // FirewallPoliciesClientGetResponse contains the response from method FirewallPoliciesClient.Get. type FirewallPoliciesClientGetResponse struct { + // FirewallPolicy Resource. FirewallPolicy } // FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.NewListAllPager. type FirewallPoliciesClientListAllResponse struct { + // Response for ListFirewallPolicies API service call. FirewallPolicyListResult } // FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.NewListPager. type FirewallPoliciesClientListResponse struct { + // Response for ListFirewallPolicies API service call. FirewallPolicyListResult } // FirewallPoliciesClientUpdateTagsResponse contains the response from method FirewallPoliciesClient.UpdateTags. type FirewallPoliciesClientUpdateTagsResponse struct { + // FirewallPolicy Resource. FirewallPolicy } // FirewallPolicyIdpsSignaturesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesClient.List. type FirewallPolicyIdpsSignaturesClientListResponse struct { + // Query result QueryResults } // FirewallPolicyIdpsSignaturesFilterValuesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesFilterValuesClient.List. type FirewallPolicyIdpsSignaturesFilterValuesClientListResponse struct { + // Describes the list of all possible values for a specific filter value SignatureOverridesFilterValuesResponse } // FirewallPolicyIdpsSignaturesOverridesClientGetResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Get. type FirewallPolicyIdpsSignaturesOverridesClientGetResponse struct { + // Contains all specific policy signatures overrides for the IDPS SignaturesOverrides } // FirewallPolicyIdpsSignaturesOverridesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.List. type FirewallPolicyIdpsSignaturesOverridesClientListResponse struct { + // Describes an object containing an array with a single item SignaturesOverridesList } // FirewallPolicyIdpsSignaturesOverridesClientPatchResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Patch. type FirewallPolicyIdpsSignaturesOverridesClientPatchResponse struct { + // Contains all specific policy signatures overrides for the IDPS SignaturesOverrides } // FirewallPolicyIdpsSignaturesOverridesClientPutResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Put. type FirewallPolicyIdpsSignaturesOverridesClientPutResponse struct { + // Contains all specific policy signatures overrides for the IDPS SignaturesOverrides } // FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate. type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse struct { + // Rule Collection Group resource. FirewallPolicyRuleCollectionGroup } @@ -915,16 +1063,19 @@ type FirewallPolicyRuleCollectionGroupsClientDeleteResponse struct { // FirewallPolicyRuleCollectionGroupsClientGetResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Get. type FirewallPolicyRuleCollectionGroupsClientGetResponse struct { + // Rule Collection Group resource. FirewallPolicyRuleCollectionGroup } // FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.NewListPager. type FirewallPolicyRuleCollectionGroupsClientListResponse struct { + // Response for ListFirewallPolicyRuleCollectionGroups API service call. FirewallPolicyRuleCollectionGroupListResult } // FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.BeginCreateOrUpdate. type FlowLogsClientCreateOrUpdateResponse struct { + // A flow log resource. FlowLog } @@ -935,22 +1086,27 @@ type FlowLogsClientDeleteResponse struct { // FlowLogsClientGetResponse contains the response from method FlowLogsClient.Get. type FlowLogsClientGetResponse struct { + // A flow log resource. FlowLog } // FlowLogsClientListResponse contains the response from method FlowLogsClient.NewListPager. type FlowLogsClientListResponse struct { + // List of flow logs. FlowLogListResult } // FlowLogsClientUpdateTagsResponse contains the response from method FlowLogsClient.UpdateTags. type FlowLogsClientUpdateTagsResponse struct { + // A flow log resource. FlowLog } // GroupsClientCreateOrUpdateResponse contains the response from method GroupsClient.CreateOrUpdate. type GroupsClientCreateOrUpdateResponse struct { + // The network group resource Group + // ETag contains the information returned from the ETag header response. ETag *string } @@ -962,16 +1118,19 @@ type GroupsClientDeleteResponse struct { // GroupsClientGetResponse contains the response from method GroupsClient.Get. type GroupsClientGetResponse struct { + // The network group resource Group } // GroupsClientListResponse contains the response from method GroupsClient.NewListPager. type GroupsClientListResponse struct { + // Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. GroupListResult } // HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.BeginCreateOrUpdate. type HubRouteTablesClientCreateOrUpdateResponse struct { + // RouteTable resource in a virtual hub. HubRouteTable } @@ -982,16 +1141,19 @@ type HubRouteTablesClientDeleteResponse struct { // HubRouteTablesClientGetResponse contains the response from method HubRouteTablesClient.Get. type HubRouteTablesClientGetResponse struct { + // RouteTable resource in a virtual hub. HubRouteTable } // HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.NewListPager. type HubRouteTablesClientListResponse struct { + // List of RouteTables and a URL nextLink to get the next set of results. ListHubRouteTablesResult } // HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate. type HubVirtualNetworkConnectionsClientCreateOrUpdateResponse struct { + // HubVirtualNetworkConnection Resource. HubVirtualNetworkConnection } @@ -1002,16 +1164,19 @@ type HubVirtualNetworkConnectionsClientDeleteResponse struct { // HubVirtualNetworkConnectionsClientGetResponse contains the response from method HubVirtualNetworkConnectionsClient.Get. type HubVirtualNetworkConnectionsClientGetResponse struct { + // HubVirtualNetworkConnection Resource. HubVirtualNetworkConnection } // HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.NewListPager. type HubVirtualNetworkConnectionsClientListResponse struct { + // List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. ListHubVirtualNetworkConnectionsResult } // IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.BeginCreateOrUpdate. type IPAllocationsClientCreateOrUpdateResponse struct { + // IpAllocation resource. IPAllocation } @@ -1022,26 +1187,31 @@ type IPAllocationsClientDeleteResponse struct { // IPAllocationsClientGetResponse contains the response from method IPAllocationsClient.Get. type IPAllocationsClientGetResponse struct { + // IpAllocation resource. IPAllocation } // IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.NewListByResourceGroupPager. type IPAllocationsClientListByResourceGroupResponse struct { + // Response for the ListIpAllocations API service call. IPAllocationListResult } // IPAllocationsClientListResponse contains the response from method IPAllocationsClient.NewListPager. type IPAllocationsClientListResponse struct { + // Response for the ListIpAllocations API service call. IPAllocationListResult } // IPAllocationsClientUpdateTagsResponse contains the response from method IPAllocationsClient.UpdateTags. type IPAllocationsClientUpdateTagsResponse struct { + // IpAllocation resource. IPAllocation } // IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.BeginCreateOrUpdate. type IPGroupsClientCreateOrUpdateResponse struct { + // The IpGroups resource information. IPGroup } @@ -1052,26 +1222,31 @@ type IPGroupsClientDeleteResponse struct { // IPGroupsClientGetResponse contains the response from method IPGroupsClient.Get. type IPGroupsClientGetResponse struct { + // The IpGroups resource information. IPGroup } // IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.NewListByResourceGroupPager. type IPGroupsClientListByResourceGroupResponse struct { + // Response for the ListIpGroups API service call. IPGroupListResult } // IPGroupsClientListResponse contains the response from method IPGroupsClient.NewListPager. type IPGroupsClientListResponse struct { + // Response for the ListIpGroups API service call. IPGroupListResult } // IPGroupsClientUpdateGroupsResponse contains the response from method IPGroupsClient.UpdateGroups. type IPGroupsClientUpdateGroupsResponse struct { + // The IpGroups resource information. IPGroup } // InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.BeginCreateOrUpdate. type InboundNatRulesClientCreateOrUpdateResponse struct { + // Inbound NAT rule of the load balancer. InboundNatRule } @@ -1082,36 +1257,43 @@ type InboundNatRulesClientDeleteResponse struct { // InboundNatRulesClientGetResponse contains the response from method InboundNatRulesClient.Get. type InboundNatRulesClientGetResponse struct { + // Inbound NAT rule of the load balancer. InboundNatRule } // InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.NewListPager. type InboundNatRulesClientListResponse struct { + // Response for ListInboundNatRule API service call. InboundNatRuleListResult } // InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.BeginCreateOrUpdate. type InboundSecurityRuleClientCreateOrUpdateResponse struct { + // NVA Inbound Security Rule resource. InboundSecurityRule } // InterfaceIPConfigurationsClientGetResponse contains the response from method InterfaceIPConfigurationsClient.Get. type InterfaceIPConfigurationsClientGetResponse struct { + // IPConfiguration in a network interface. InterfaceIPConfiguration } // InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.NewListPager. type InterfaceIPConfigurationsClientListResponse struct { + // Response for list ip configurations API service call. InterfaceIPConfigurationListResult } // InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.NewListPager. type InterfaceLoadBalancersClientListResponse struct { + // Response for list ip configurations API service call. InterfaceLoadBalancerListResult } // InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.BeginCreateOrUpdate. type InterfaceTapConfigurationsClientCreateOrUpdateResponse struct { + // Tap configuration in a Network Interface. InterfaceTapConfiguration } @@ -1122,16 +1304,19 @@ type InterfaceTapConfigurationsClientDeleteResponse struct { // InterfaceTapConfigurationsClientGetResponse contains the response from method InterfaceTapConfigurationsClient.Get. type InterfaceTapConfigurationsClientGetResponse struct { + // Tap configuration in a Network Interface. InterfaceTapConfiguration } // InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.NewListPager. type InterfaceTapConfigurationsClientListResponse struct { + // Response for list tap configurations API service call. InterfaceTapConfigurationListResult } // InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.BeginCreateOrUpdate. type InterfacesClientCreateOrUpdateResponse struct { + // A network interface in a resource group. Interface } @@ -1142,76 +1327,91 @@ type InterfacesClientDeleteResponse struct { // InterfacesClientGetCloudServiceNetworkInterfaceResponse contains the response from method InterfacesClient.GetCloudServiceNetworkInterface. type InterfacesClientGetCloudServiceNetworkInterfaceResponse struct { + // A network interface in a resource group. Interface } // InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.BeginGetEffectiveRouteTable. type InterfacesClientGetEffectiveRouteTableResponse struct { + // Response for list effective route API service call. EffectiveRouteListResult } // InterfacesClientGetResponse contains the response from method InterfacesClient.Get. type InterfacesClientGetResponse struct { + // A network interface in a resource group. Interface } // InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetIPConfiguration. type InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse struct { + // IPConfiguration in a network interface. InterfaceIPConfiguration } // InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetNetworkInterface. type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse struct { + // A network interface in a resource group. Interface } // InterfacesClientListAllResponse contains the response from method InterfacesClient.NewListAllPager. type InterfacesClientListAllResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceNetworkInterfacesPager. type InterfacesClientListCloudServiceNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.NewListCloudServiceRoleInstanceNetworkInterfacesPager. type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.BeginListEffectiveNetworkSecurityGroups. type InterfacesClientListEffectiveNetworkSecurityGroupsResponse struct { + // Response for list effective network security groups API service call. EffectiveNetworkSecurityGroupListResult } // InterfacesClientListResponse contains the response from method InterfacesClient.NewListPager. type InterfacesClientListResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetIPConfigurationsPager. type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse struct { + // Response for list ip configurations API service call. InterfaceIPConfigurationListResult } // InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetNetworkInterfacesPager. type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.NewListVirtualMachineScaleSetVMNetworkInterfacesPager. type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // InterfacesClientUpdateTagsResponse contains the response from method InterfacesClient.UpdateTags. type InterfacesClientUpdateTagsResponse struct { + // A network interface in a resource group. Interface } // LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate. type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse struct { + // Pool of backend IP addresses. BackendAddressPool } @@ -1222,61 +1422,73 @@ type LoadBalancerBackendAddressPoolsClientDeleteResponse struct { // LoadBalancerBackendAddressPoolsClientGetResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Get. type LoadBalancerBackendAddressPoolsClientGetResponse struct { + // Pool of backend IP addresses. BackendAddressPool } // LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.NewListPager. type LoadBalancerBackendAddressPoolsClientListResponse struct { + // Response for ListBackendAddressPool API service call. LoadBalancerBackendAddressPoolListResult } // LoadBalancerFrontendIPConfigurationsClientGetResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.Get. type LoadBalancerFrontendIPConfigurationsClientGetResponse struct { + // Frontend IP address of the load balancer. FrontendIPConfiguration } // LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.NewListPager. type LoadBalancerFrontendIPConfigurationsClientListResponse struct { + // Response for ListFrontendIPConfiguration API service call. LoadBalancerFrontendIPConfigurationListResult } // LoadBalancerLoadBalancingRulesClientGetResponse contains the response from method LoadBalancerLoadBalancingRulesClient.Get. type LoadBalancerLoadBalancingRulesClientGetResponse struct { + // A load balancing rule for a load balancer. LoadBalancingRule } // LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.NewListPager. type LoadBalancerLoadBalancingRulesClientListResponse struct { + // Response for ListLoadBalancingRule API service call. LoadBalancerLoadBalancingRuleListResult } // LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.NewListPager. type LoadBalancerNetworkInterfacesClientListResponse struct { + // Response for the ListNetworkInterface API service call. InterfaceListResult } // LoadBalancerOutboundRulesClientGetResponse contains the response from method LoadBalancerOutboundRulesClient.Get. type LoadBalancerOutboundRulesClientGetResponse struct { + // Outbound rule of the load balancer. OutboundRule } // LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.NewListPager. type LoadBalancerOutboundRulesClientListResponse struct { + // Response for ListOutboundRule API service call. LoadBalancerOutboundRuleListResult } // LoadBalancerProbesClientGetResponse contains the response from method LoadBalancerProbesClient.Get. type LoadBalancerProbesClientGetResponse struct { + // A load balancer probe. Probe } // LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.NewListPager. type LoadBalancerProbesClientListResponse struct { + // Response for ListProbe API service call. LoadBalancerProbeListResult } // LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.BeginCreateOrUpdate. type LoadBalancersClientCreateOrUpdateResponse struct { + // LoadBalancer resource. LoadBalancer } @@ -1287,21 +1499,25 @@ type LoadBalancersClientDeleteResponse struct { // LoadBalancersClientGetResponse contains the response from method LoadBalancersClient.Get. type LoadBalancersClientGetResponse struct { + // LoadBalancer resource. LoadBalancer } // LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.NewListAllPager. type LoadBalancersClientListAllResponse struct { + // Response for ListLoadBalancers API service call. LoadBalancerListResult } // LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.BeginListInboundNatRulePortMappings. type LoadBalancersClientListInboundNatRulePortMappingsResponse struct { + // The response for a QueryInboundNatRulePortMapping API. BackendAddressInboundNatRulePortMappings } // LoadBalancersClientListResponse contains the response from method LoadBalancersClient.NewListPager. type LoadBalancersClientListResponse struct { + // Response for ListLoadBalancers API service call. LoadBalancerListResult } @@ -1312,11 +1528,13 @@ type LoadBalancersClientSwapPublicIPAddressesResponse struct { // LoadBalancersClientUpdateTagsResponse contains the response from method LoadBalancersClient.UpdateTags. type LoadBalancersClientUpdateTagsResponse struct { + // LoadBalancer resource. LoadBalancer } // LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.BeginCreateOrUpdate. type LocalNetworkGatewaysClientCreateOrUpdateResponse struct { + // A common class for general resource information. LocalNetworkGateway } @@ -1327,21 +1545,25 @@ type LocalNetworkGatewaysClientDeleteResponse struct { // LocalNetworkGatewaysClientGetResponse contains the response from method LocalNetworkGatewaysClient.Get. type LocalNetworkGatewaysClientGetResponse struct { + // A common class for general resource information. LocalNetworkGateway } // LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.NewListPager. type LocalNetworkGatewaysClientListResponse struct { + // Response for ListLocalNetworkGateways API service call. LocalNetworkGatewayListResult } // LocalNetworkGatewaysClientUpdateTagsResponse contains the response from method LocalNetworkGatewaysClient.UpdateTags. type LocalNetworkGatewaysClientUpdateTagsResponse struct { + // A common class for general resource information. LocalNetworkGateway } // ManagementClientCheckDNSNameAvailabilityResponse contains the response from method ManagementClient.CheckDNSNameAvailability. type ManagementClientCheckDNSNameAvailabilityResponse struct { + // Response for the CheckDnsNameAvailability API service call. DNSNameAvailabilityResult } @@ -1352,61 +1574,77 @@ type ManagementClientDeleteBastionShareableLinkResponse struct { // ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.NewDisconnectActiveSessionsPager. type ManagementClientDisconnectActiveSessionsResponse struct { + // Response for DisconnectActiveSessions. BastionSessionDeleteResult } // ManagementClientExpressRouteProviderPortResponse contains the response from method ManagementClient.ExpressRouteProviderPort. type ManagementClientExpressRouteProviderPortResponse struct { + // ExpressRouteProviderPort resource. ExpressRouteProviderPort } // ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile. type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { + // Vpn Profile Response for package generation. VPNProfileResponse } // ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.BeginGetActiveSessions. type ManagementClientGetActiveSessionsResponse struct { + // Response for GetActiveSessions. BastionActiveSessionListResult } // ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.NewGetBastionShareableLinkPager. type ManagementClientGetBastionShareableLinkResponse struct { + // Response for all the Bastion Shareable Link endpoints. BastionShareableLinkListResult } // ManagementClientListActiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListActiveConnectivityConfigurations. type ManagementClientListActiveConnectivityConfigurationsResponse struct { + // Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations + // and a skiptoken to get the next set of results. ActiveConnectivityConfigurationsListResult } // ManagementClientListActiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListActiveSecurityAdminRules. type ManagementClientListActiveSecurityAdminRulesResponse struct { + // Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken + // to get the next set of results. ActiveSecurityAdminRulesListResult } // ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveConnectivityConfigurations. type ManagementClientListNetworkManagerEffectiveConnectivityConfigurationsResponse struct { + // Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken + // to get the next set of results. ManagerEffectiveConnectivityConfigurationListResult } // ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse contains the response from method ManagementClient.ListNetworkManagerEffectiveSecurityAdminRules. type ManagementClientListNetworkManagerEffectiveSecurityAdminRulesResponse struct { + // Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to + // get the next set of results. ManagerEffectiveSecurityAdminRulesListResult } // ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.BeginPutBastionShareableLink. type ManagementClientPutBastionShareableLinkResponse struct { + // Response for all the Bastion Shareable Link endpoints. BastionShareableLinkListResult } // ManagementClientSupportedSecurityProvidersResponse contains the response from method ManagementClient.SupportedSecurityProviders. type ManagementClientSupportedSecurityProvidersResponse struct { + // Collection of SecurityProviders. VirtualWanSecurityProviders } // ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.CreateOrUpdate. type ManagementGroupNetworkManagerConnectionsClientCreateOrUpdateResponse struct { + // The Network Manager Connection resource ManagerConnection } @@ -1417,26 +1655,31 @@ type ManagementGroupNetworkManagerConnectionsClientDeleteResponse struct { // ManagementGroupNetworkManagerConnectionsClientGetResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.Get. type ManagementGroupNetworkManagerConnectionsClientGetResponse struct { + // The Network Manager Connection resource ManagerConnection } // ManagementGroupNetworkManagerConnectionsClientListResponse contains the response from method ManagementGroupNetworkManagerConnectionsClient.NewListPager. type ManagementGroupNetworkManagerConnectionsClientListResponse struct { + // List of network manager connections. ManagerConnectionListResult } // ManagerCommitsClientPostResponse contains the response from method ManagerCommitsClient.BeginPost. type ManagerCommitsClientPostResponse struct { + // Network Manager Commit. ManagerCommit } // ManagerDeploymentStatusClientListResponse contains the response from method ManagerDeploymentStatusClient.List. type ManagerDeploymentStatusClientListResponse struct { + // A list of Network Manager Deployment Status ManagerDeploymentStatusListResult } // ManagersClientCreateOrUpdateResponse contains the response from method ManagersClient.CreateOrUpdate. type ManagersClientCreateOrUpdateResponse struct { + // The Managed Network resource Manager } @@ -1447,26 +1690,33 @@ type ManagersClientDeleteResponse struct { // ManagersClientGetResponse contains the response from method ManagersClient.Get. type ManagersClientGetResponse struct { + // The Managed Network resource Manager } // ManagersClientListBySubscriptionResponse contains the response from method ManagersClient.NewListBySubscriptionPager. type ManagersClientListBySubscriptionResponse struct { + // Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set + // of results. ManagerListResult } // ManagersClientListResponse contains the response from method ManagersClient.NewListPager. type ManagersClientListResponse struct { + // Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set + // of results. ManagerListResult } // ManagersClientPatchResponse contains the response from method ManagersClient.Patch. type ManagersClientPatchResponse struct { + // The Managed Network resource Manager } // NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.BeginCreateOrUpdate. type NatGatewaysClientCreateOrUpdateResponse struct { + // Nat Gateway resource. NatGateway } @@ -1477,26 +1727,31 @@ type NatGatewaysClientDeleteResponse struct { // NatGatewaysClientGetResponse contains the response from method NatGatewaysClient.Get. type NatGatewaysClientGetResponse struct { + // Nat Gateway resource. NatGateway } // NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.NewListAllPager. type NatGatewaysClientListAllResponse struct { + // Response for ListNatGateways API service call. NatGatewayListResult } // NatGatewaysClientListResponse contains the response from method NatGatewaysClient.NewListPager. type NatGatewaysClientListResponse struct { + // Response for ListNatGateways API service call. NatGatewayListResult } // NatGatewaysClientUpdateTagsResponse contains the response from method NatGatewaysClient.UpdateTags. type NatGatewaysClientUpdateTagsResponse struct { + // Nat Gateway resource. NatGateway } // NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.BeginCreateOrUpdate. type NatRulesClientCreateOrUpdateResponse struct { + // VpnGatewayNatRule Resource. VPNGatewayNatRule } @@ -1507,21 +1762,27 @@ type NatRulesClientDeleteResponse struct { // NatRulesClientGetResponse contains the response from method NatRulesClient.Get. type NatRulesClientGetResponse struct { + // VpnGatewayNatRule Resource. VPNGatewayNatRule } // NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.NewListByVPNGatewayPager. type NatRulesClientListByVPNGatewayResponse struct { + // Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink + // to get the next set of results. ListVPNGatewayNatRulesResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of + // results. OperationListResult } // P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.BeginCreateOrUpdate. type P2SVPNGatewaysClientCreateOrUpdateResponse struct { + // P2SVpnGateway Resource. P2SVPNGateway } @@ -1537,46 +1798,57 @@ type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse struct { // P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.BeginGenerateVPNProfile. type P2SVPNGatewaysClientGenerateVPNProfileResponse struct { + // Vpn Profile Response for package generation. VPNProfileResponse } // P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse struct { + // P2S Vpn connection detailed health written to sas url. P2SVPNConnectionHealth } // P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse struct { + // P2SVpnGateway Resource. P2SVPNGateway } // P2SVPNGatewaysClientGetResponse contains the response from method P2SVPNGatewaysClient.Get. type P2SVPNGatewaysClientGetResponse struct { + // P2SVpnGateway Resource. P2SVPNGateway } // P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.NewListByResourceGroupPager. type P2SVPNGatewaysClientListByResourceGroupResponse struct { + // Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set + // of results. ListP2SVPNGatewaysResult } // P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.NewListPager. type P2SVPNGatewaysClientListResponse struct { + // Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set + // of results. ListP2SVPNGatewaysResult } // P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.BeginReset. type P2SVPNGatewaysClientResetResponse struct { + // P2SVpnGateway Resource. P2SVPNGateway } // P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.BeginUpdateTags. type P2SVPNGatewaysClientUpdateTagsResponse struct { + // P2SVpnGateway Resource. P2SVPNGateway } // PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.BeginCreate. type PacketCapturesClientCreateResponse struct { + // Information about packet capture session. PacketCaptureResult } @@ -1587,16 +1859,19 @@ type PacketCapturesClientDeleteResponse struct { // PacketCapturesClientGetResponse contains the response from method PacketCapturesClient.Get. type PacketCapturesClientGetResponse struct { + // Information about packet capture session. PacketCaptureResult } // PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.BeginGetStatus. type PacketCapturesClientGetStatusResponse struct { + // Status of packet capture session. PacketCaptureQueryStatusResult } // PacketCapturesClientListResponse contains the response from method PacketCapturesClient.NewListPager. type PacketCapturesClientListResponse struct { + // List of packet capture sessions. PacketCaptureListResult } @@ -1607,16 +1882,20 @@ type PacketCapturesClientStopResponse struct { // PeerExpressRouteCircuitConnectionsClientGetResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.Get. type PeerExpressRouteCircuitConnectionsClientGetResponse struct { + // Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. PeerExpressRouteCircuitConnection } // PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.NewListPager. type PeerExpressRouteCircuitConnectionsClientListResponse struct { + // Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to + // a Private Peering for an ExpressRouteCircuit. PeerExpressRouteCircuitConnectionListResult } // PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.BeginCreateOrUpdate. type PrivateDNSZoneGroupsClientCreateOrUpdateResponse struct { + // Private dns zone group resource. PrivateDNSZoneGroup } @@ -1627,16 +1906,19 @@ type PrivateDNSZoneGroupsClientDeleteResponse struct { // PrivateDNSZoneGroupsClientGetResponse contains the response from method PrivateDNSZoneGroupsClient.Get. type PrivateDNSZoneGroupsClientGetResponse struct { + // Private dns zone group resource. PrivateDNSZoneGroup } // PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.NewListPager. type PrivateDNSZoneGroupsClientListResponse struct { + // Response for the ListPrivateDnsZoneGroups API service call. PrivateDNSZoneGroupListResult } // PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.BeginCreateOrUpdate. type PrivateEndpointsClientCreateOrUpdateResponse struct { + // Private endpoint resource. PrivateEndpoint } @@ -1647,31 +1929,37 @@ type PrivateEndpointsClientDeleteResponse struct { // PrivateEndpointsClientGetResponse contains the response from method PrivateEndpointsClient.Get. type PrivateEndpointsClientGetResponse struct { + // Private endpoint resource. PrivateEndpoint } // PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.NewListBySubscriptionPager. type PrivateEndpointsClientListBySubscriptionResponse struct { + // Response for the ListPrivateEndpoints API service call. PrivateEndpointListResult } // PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.NewListPager. type PrivateEndpointsClientListResponse struct { + // Response for the ListPrivateEndpoints API service call. PrivateEndpointListResult } // PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse struct { + // Response for the CheckPrivateLinkServiceVisibility API service call. PrivateLinkServiceVisibility } // PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse struct { + // Response for the CheckPrivateLinkServiceVisibility API service call. PrivateLinkServiceVisibility } // PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.BeginCreateOrUpdate. type PrivateLinkServicesClientCreateOrUpdateResponse struct { + // Private link service resource. PrivateLinkService } @@ -1687,46 +1975,55 @@ type PrivateLinkServicesClientDeleteResponse struct { // PrivateLinkServicesClientGetPrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.GetPrivateEndpointConnection. type PrivateLinkServicesClientGetPrivateEndpointConnectionResponse struct { + // PrivateEndpointConnection resource. PrivateEndpointConnection } // PrivateLinkServicesClientGetResponse contains the response from method PrivateLinkServicesClient.Get. type PrivateLinkServicesClientGetResponse struct { + // Private link service resource. PrivateLinkService } // PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesByResourceGroupPager. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse struct { + // An array of private link service id that can be linked to a private end point with auto approved. AutoApprovedPrivateLinkServicesResult } // PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.NewListAutoApprovedPrivateLinkServicesPager. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse struct { + // An array of private link service id that can be linked to a private end point with auto approved. AutoApprovedPrivateLinkServicesResult } // PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.NewListBySubscriptionPager. type PrivateLinkServicesClientListBySubscriptionResponse struct { + // Response for the ListPrivateLinkService API service call. PrivateLinkServiceListResult } // PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.NewListPrivateEndpointConnectionsPager. type PrivateLinkServicesClientListPrivateEndpointConnectionsResponse struct { + // Response for the ListPrivateEndpointConnection API service call. PrivateEndpointConnectionListResult } // PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.NewListPager. type PrivateLinkServicesClientListResponse struct { + // Response for the ListPrivateLinkService API service call. PrivateLinkServiceListResult } // PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.UpdatePrivateEndpointConnection. type PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse struct { + // PrivateEndpointConnection resource. PrivateEndpointConnection } // ProfilesClientCreateOrUpdateResponse contains the response from method ProfilesClient.CreateOrUpdate. type ProfilesClientCreateOrUpdateResponse struct { + // Network profile resource. Profile } @@ -1737,31 +2034,37 @@ type ProfilesClientDeleteResponse struct { // ProfilesClientGetResponse contains the response from method ProfilesClient.Get. type ProfilesClientGetResponse struct { + // Network profile resource. Profile } // ProfilesClientListAllResponse contains the response from method ProfilesClient.NewListAllPager. type ProfilesClientListAllResponse struct { + // Response for ListNetworkProfiles API service call. ProfileListResult } // ProfilesClientListResponse contains the response from method ProfilesClient.NewListPager. type ProfilesClientListResponse struct { + // Response for ListNetworkProfiles API service call. ProfileListResult } // ProfilesClientUpdateTagsResponse contains the response from method ProfilesClient.UpdateTags. type ProfilesClientUpdateTagsResponse struct { + // Network profile resource. Profile } // PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.BeginCreateOrUpdate. type PublicIPAddressesClientCreateOrUpdateResponse struct { + // Public IP address resource. PublicIPAddress } // PublicIPAddressesClientDdosProtectionStatusResponse contains the response from method PublicIPAddressesClient.BeginDdosProtectionStatus. type PublicIPAddressesClientDdosProtectionStatusResponse struct { + // Response for GetPublicIpAddressDdosProtectionStatusOperation API service call. PublicIPDdosProtectionStatusResult } @@ -1772,56 +2075,67 @@ type PublicIPAddressesClientDeleteResponse struct { // PublicIPAddressesClientGetCloudServicePublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetCloudServicePublicIPAddress. type PublicIPAddressesClientGetCloudServicePublicIPAddressResponse struct { + // Public IP address resource. PublicIPAddress } // PublicIPAddressesClientGetResponse contains the response from method PublicIPAddressesClient.Get. type PublicIPAddressesClientGetResponse struct { + // Public IP address resource. PublicIPAddress } // PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress. type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse struct { + // Public IP address resource. PublicIPAddress } // PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.NewListAllPager. type PublicIPAddressesClientListAllResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServicePublicIPAddressesPager. type PublicIPAddressesClientListCloudServicePublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListCloudServiceRoleInstancePublicIPAddressesPager. type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.NewListPager. type PublicIPAddressesClientListResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetPublicIPAddressesPager. type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.NewListVirtualMachineScaleSetVMPublicIPAddressesPager. type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse struct { + // Response for ListPublicIpAddresses API service call. PublicIPAddressListResult } // PublicIPAddressesClientUpdateTagsResponse contains the response from method PublicIPAddressesClient.UpdateTags. type PublicIPAddressesClientUpdateTagsResponse struct { + // Public IP address resource. PublicIPAddress } // PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.BeginCreateOrUpdate. type PublicIPPrefixesClientCreateOrUpdateResponse struct { + // Public IP prefix resource. PublicIPPrefix } @@ -1832,31 +2146,37 @@ type PublicIPPrefixesClientDeleteResponse struct { // PublicIPPrefixesClientGetResponse contains the response from method PublicIPPrefixesClient.Get. type PublicIPPrefixesClientGetResponse struct { + // Public IP prefix resource. PublicIPPrefix } // PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.NewListAllPager. type PublicIPPrefixesClientListAllResponse struct { + // Response for ListPublicIpPrefixes API service call. PublicIPPrefixListResult } // PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.NewListPager. type PublicIPPrefixesClientListResponse struct { + // Response for ListPublicIpPrefixes API service call. PublicIPPrefixListResult } // PublicIPPrefixesClientUpdateTagsResponse contains the response from method PublicIPPrefixesClient.UpdateTags. type PublicIPPrefixesClientUpdateTagsResponse struct { + // Public IP prefix resource. PublicIPPrefix } // ResourceNavigationLinksClientListResponse contains the response from method ResourceNavigationLinksClient.List. type ResourceNavigationLinksClientListResponse struct { + // Response for ResourceNavigationLinks_List operation. ResourceNavigationLinksListResult } // RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.BeginCreateOrUpdate. type RouteFilterRulesClientCreateOrUpdateResponse struct { + // Route Filter Rule Resource. RouteFilterRule } @@ -1867,16 +2187,19 @@ type RouteFilterRulesClientDeleteResponse struct { // RouteFilterRulesClientGetResponse contains the response from method RouteFilterRulesClient.Get. type RouteFilterRulesClientGetResponse struct { + // Route Filter Rule Resource. RouteFilterRule } // RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.NewListByRouteFilterPager. type RouteFilterRulesClientListByRouteFilterResponse struct { + // Response for the ListRouteFilterRules API service call. RouteFilterRuleListResult } // RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.BeginCreateOrUpdate. type RouteFiltersClientCreateOrUpdateResponse struct { + // Route Filter Resource. RouteFilter } @@ -1887,26 +2210,31 @@ type RouteFiltersClientDeleteResponse struct { // RouteFiltersClientGetResponse contains the response from method RouteFiltersClient.Get. type RouteFiltersClientGetResponse struct { + // Route Filter Resource. RouteFilter } // RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.NewListByResourceGroupPager. type RouteFiltersClientListByResourceGroupResponse struct { + // Response for the ListRouteFilters API service call. RouteFilterListResult } // RouteFiltersClientListResponse contains the response from method RouteFiltersClient.NewListPager. type RouteFiltersClientListResponse struct { + // Response for the ListRouteFilters API service call. RouteFilterListResult } // RouteFiltersClientUpdateTagsResponse contains the response from method RouteFiltersClient.UpdateTags. type RouteFiltersClientUpdateTagsResponse struct { + // Route Filter Resource. RouteFilter } // RouteMapsClientCreateOrUpdateResponse contains the response from method RouteMapsClient.BeginCreateOrUpdate. type RouteMapsClientCreateOrUpdateResponse struct { + // The RouteMap child resource of a Virtual hub. RouteMap } @@ -1917,16 +2245,19 @@ type RouteMapsClientDeleteResponse struct { // RouteMapsClientGetResponse contains the response from method RouteMapsClient.Get. type RouteMapsClientGetResponse struct { + // The RouteMap child resource of a Virtual hub. RouteMap } // RouteMapsClientListResponse contains the response from method RouteMapsClient.NewListPager. type RouteMapsClientListResponse struct { + // List of RouteMaps and a URL nextLink to get the next set of results. ListRouteMapsResult } // RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.BeginCreateOrUpdate. type RouteTablesClientCreateOrUpdateResponse struct { + // Route table resource. RouteTable } @@ -1937,26 +2268,31 @@ type RouteTablesClientDeleteResponse struct { // RouteTablesClientGetResponse contains the response from method RouteTablesClient.Get. type RouteTablesClientGetResponse struct { + // Route table resource. RouteTable } // RouteTablesClientListAllResponse contains the response from method RouteTablesClient.NewListAllPager. type RouteTablesClientListAllResponse struct { + // Response for the ListRouteTable API service call. RouteTableListResult } // RouteTablesClientListResponse contains the response from method RouteTablesClient.NewListPager. type RouteTablesClientListResponse struct { + // Response for the ListRouteTable API service call. RouteTableListResult } // RouteTablesClientUpdateTagsResponse contains the response from method RouteTablesClient.UpdateTags. type RouteTablesClientUpdateTagsResponse struct { + // Route table resource. RouteTable } // RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.BeginCreateOrUpdate. type RoutesClientCreateOrUpdateResponse struct { + // Route resource. Route } @@ -1967,16 +2303,19 @@ type RoutesClientDeleteResponse struct { // RoutesClientGetResponse contains the response from method RoutesClient.Get. type RoutesClientGetResponse struct { + // Route resource. Route } // RoutesClientListResponse contains the response from method RoutesClient.NewListPager. type RoutesClientListResponse struct { + // Response for the ListRoute API service call. RouteListResult } // RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.BeginCreateOrUpdate. type RoutingIntentClientCreateOrUpdateResponse struct { + // The routing intent child resource of a Virtual hub. RoutingIntent } @@ -1987,16 +2326,19 @@ type RoutingIntentClientDeleteResponse struct { // RoutingIntentClientGetResponse contains the response from method RoutingIntentClient.Get. type RoutingIntentClientGetResponse struct { + // The routing intent child resource of a Virtual hub. RoutingIntent } // RoutingIntentClientListResponse contains the response from method RoutingIntentClient.NewListPager. type RoutingIntentClientListResponse struct { + // List of the routing intent result and a URL nextLink to get the next set of results. ListRoutingIntentResult } // ScopeConnectionsClientCreateOrUpdateResponse contains the response from method ScopeConnectionsClient.CreateOrUpdate. type ScopeConnectionsClientCreateOrUpdateResponse struct { + // The Scope Connections resource ScopeConnection } @@ -2007,16 +2349,19 @@ type ScopeConnectionsClientDeleteResponse struct { // ScopeConnectionsClientGetResponse contains the response from method ScopeConnectionsClient.Get. type ScopeConnectionsClientGetResponse struct { + // The Scope Connections resource ScopeConnection } // ScopeConnectionsClientListResponse contains the response from method ScopeConnectionsClient.NewListPager. type ScopeConnectionsClientListResponse struct { + // List of scope connections. ScopeConnectionListResult } // SecurityAdminConfigurationsClientCreateOrUpdateResponse contains the response from method SecurityAdminConfigurationsClient.CreateOrUpdate. type SecurityAdminConfigurationsClientCreateOrUpdateResponse struct { + // Defines the security admin configuration SecurityAdminConfiguration } @@ -2027,16 +2372,19 @@ type SecurityAdminConfigurationsClientDeleteResponse struct { // SecurityAdminConfigurationsClientGetResponse contains the response from method SecurityAdminConfigurationsClient.Get. type SecurityAdminConfigurationsClientGetResponse struct { + // Defines the security admin configuration SecurityAdminConfiguration } // SecurityAdminConfigurationsClientListResponse contains the response from method SecurityAdminConfigurationsClient.NewListPager. type SecurityAdminConfigurationsClientListResponse struct { + // A list of network manager security admin configurations SecurityAdminConfigurationListResult } // SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.BeginCreateOrUpdate. type SecurityGroupsClientCreateOrUpdateResponse struct { + // NetworkSecurityGroup resource. SecurityGroup } @@ -2047,26 +2395,31 @@ type SecurityGroupsClientDeleteResponse struct { // SecurityGroupsClientGetResponse contains the response from method SecurityGroupsClient.Get. type SecurityGroupsClientGetResponse struct { + // NetworkSecurityGroup resource. SecurityGroup } // SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.NewListAllPager. type SecurityGroupsClientListAllResponse struct { + // Response for ListNetworkSecurityGroups API service call. SecurityGroupListResult } // SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.NewListPager. type SecurityGroupsClientListResponse struct { + // Response for ListNetworkSecurityGroups API service call. SecurityGroupListResult } // SecurityGroupsClientUpdateTagsResponse contains the response from method SecurityGroupsClient.UpdateTags. type SecurityGroupsClientUpdateTagsResponse struct { + // NetworkSecurityGroup resource. SecurityGroup } // SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.BeginCreateOrUpdate. type SecurityPartnerProvidersClientCreateOrUpdateResponse struct { + // Security Partner Provider resource. SecurityPartnerProvider } @@ -2077,26 +2430,31 @@ type SecurityPartnerProvidersClientDeleteResponse struct { // SecurityPartnerProvidersClientGetResponse contains the response from method SecurityPartnerProvidersClient.Get. type SecurityPartnerProvidersClientGetResponse struct { + // Security Partner Provider resource. SecurityPartnerProvider } // SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.NewListByResourceGroupPager. type SecurityPartnerProvidersClientListByResourceGroupResponse struct { + // Response for ListSecurityPartnerProviders API service call. SecurityPartnerProviderListResult } // SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.NewListPager. type SecurityPartnerProvidersClientListResponse struct { + // Response for ListSecurityPartnerProviders API service call. SecurityPartnerProviderListResult } // SecurityPartnerProvidersClientUpdateTagsResponse contains the response from method SecurityPartnerProvidersClient.UpdateTags. type SecurityPartnerProvidersClientUpdateTagsResponse struct { + // Security Partner Provider resource. SecurityPartnerProvider } // SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.BeginCreateOrUpdate. type SecurityRulesClientCreateOrUpdateResponse struct { + // Network security rule. SecurityRule } @@ -2107,21 +2465,25 @@ type SecurityRulesClientDeleteResponse struct { // SecurityRulesClientGetResponse contains the response from method SecurityRulesClient.Get. type SecurityRulesClientGetResponse struct { + // Network security rule. SecurityRule } // SecurityRulesClientListResponse contains the response from method SecurityRulesClient.NewListPager. type SecurityRulesClientListResponse struct { + // Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. SecurityRuleListResult } // ServiceAssociationLinksClientListResponse contains the response from method ServiceAssociationLinksClient.List. type ServiceAssociationLinksClientListResponse struct { + // Response for ServiceAssociationLinks_List operation. ServiceAssociationLinksListResult } // ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.BeginCreateOrUpdate. type ServiceEndpointPoliciesClientCreateOrUpdateResponse struct { + // Service End point policy resource. ServiceEndpointPolicy } @@ -2132,26 +2494,31 @@ type ServiceEndpointPoliciesClientDeleteResponse struct { // ServiceEndpointPoliciesClientGetResponse contains the response from method ServiceEndpointPoliciesClient.Get. type ServiceEndpointPoliciesClientGetResponse struct { + // Service End point policy resource. ServiceEndpointPolicy } // ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.NewListByResourceGroupPager. type ServiceEndpointPoliciesClientListByResourceGroupResponse struct { + // Response for ListServiceEndpointPolicies API service call. ServiceEndpointPolicyListResult } // ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.NewListPager. type ServiceEndpointPoliciesClientListResponse struct { + // Response for ListServiceEndpointPolicies API service call. ServiceEndpointPolicyListResult } // ServiceEndpointPoliciesClientUpdateTagsResponse contains the response from method ServiceEndpointPoliciesClient.UpdateTags. type ServiceEndpointPoliciesClientUpdateTagsResponse struct { + // Service End point policy resource. ServiceEndpointPolicy } // ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate. type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse struct { + // Service Endpoint policy definitions. ServiceEndpointPolicyDefinition } @@ -2162,26 +2529,32 @@ type ServiceEndpointPolicyDefinitionsClientDeleteResponse struct { // ServiceEndpointPolicyDefinitionsClientGetResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Get. type ServiceEndpointPolicyDefinitionsClientGetResponse struct { + // Service Endpoint policy definitions. ServiceEndpointPolicyDefinition } // ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.NewListByResourceGroupPager. type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse struct { + // Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that + // belongs to a service endpoint policy. ServiceEndpointPolicyDefinitionListResult } // ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.NewListPager. type ServiceTagInformationClientListResponse struct { + // Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. ServiceTagInformationListResult } // ServiceTagsClientListResponse contains the response from method ServiceTagsClient.List. type ServiceTagsClientListResponse struct { + // Response for the ListServiceTags API service call. ServiceTagsListResult } // StaticMembersClientCreateOrUpdateResponse contains the response from method StaticMembersClient.CreateOrUpdate. type StaticMembersClientCreateOrUpdateResponse struct { + // StaticMember Item. StaticMember } @@ -2192,16 +2565,19 @@ type StaticMembersClientDeleteResponse struct { // StaticMembersClientGetResponse contains the response from method StaticMembersClient.Get. type StaticMembersClientGetResponse struct { + // StaticMember Item. StaticMember } // StaticMembersClientListResponse contains the response from method StaticMembersClient.NewListPager. type StaticMembersClientListResponse struct { + // Result of the request to list StaticMember. It contains a list of groups and a URL link to get the next set of results. StaticMemberListResult } // SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.BeginCreateOrUpdate. type SubnetsClientCreateOrUpdateResponse struct { + // Subnet in a virtual network resource. Subnet } @@ -2212,11 +2588,13 @@ type SubnetsClientDeleteResponse struct { // SubnetsClientGetResponse contains the response from method SubnetsClient.Get. type SubnetsClientGetResponse struct { + // Subnet in a virtual network resource. Subnet } // SubnetsClientListResponse contains the response from method SubnetsClient.NewListPager. type SubnetsClientListResponse struct { + // Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. SubnetListResult } @@ -2232,6 +2610,7 @@ type SubnetsClientUnprepareNetworkPoliciesResponse struct { // SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.CreateOrUpdate. type SubscriptionNetworkManagerConnectionsClientCreateOrUpdateResponse struct { + // The Network Manager Connection resource ManagerConnection } @@ -2242,21 +2621,25 @@ type SubscriptionNetworkManagerConnectionsClientDeleteResponse struct { // SubscriptionNetworkManagerConnectionsClientGetResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.Get. type SubscriptionNetworkManagerConnectionsClientGetResponse struct { + // The Network Manager Connection resource ManagerConnection } // SubscriptionNetworkManagerConnectionsClientListResponse contains the response from method SubscriptionNetworkManagerConnectionsClient.NewListPager. type SubscriptionNetworkManagerConnectionsClientListResponse struct { + // List of network manager connections. ManagerConnectionListResult } // UsagesClientListResponse contains the response from method UsagesClient.NewListPager. type UsagesClientListResponse struct { + // The list usages operation response. UsagesListResult } // VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.BeginCreateOrUpdate. type VPNConnectionsClientCreateOrUpdateResponse struct { + // VpnConnection Resource. VPNConnection } @@ -2267,11 +2650,14 @@ type VPNConnectionsClientDeleteResponse struct { // VPNConnectionsClientGetResponse contains the response from method VPNConnectionsClient.Get. type VPNConnectionsClientGetResponse struct { + // VpnConnection Resource. VPNConnection } // VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.NewListByVPNGatewayPager. type VPNConnectionsClientListByVPNGatewayResponse struct { + // Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and + // a URL nextLink to get the next set of results. ListVPNConnectionsResult } @@ -2297,6 +2683,7 @@ func (v *VPNConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byt // VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.BeginCreateOrUpdate. type VPNGatewaysClientCreateOrUpdateResponse struct { + // VpnGateway Resource. VPNGateway } @@ -2307,21 +2694,27 @@ type VPNGatewaysClientDeleteResponse struct { // VPNGatewaysClientGetResponse contains the response from method VPNGatewaysClient.Get. type VPNGatewaysClientGetResponse struct { + // VpnGateway Resource. VPNGateway } // VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.NewListByResourceGroupPager. type VPNGatewaysClientListByResourceGroupResponse struct { + // Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of + // results. ListVPNGatewaysResult } // VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.NewListPager. type VPNGatewaysClientListResponse struct { + // Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of + // results. ListVPNGatewaysResult } // VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.BeginReset. type VPNGatewaysClientResetResponse struct { + // VpnGateway Resource. VPNGateway } @@ -2347,6 +2740,7 @@ func (v *VPNGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) // VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.BeginUpdateTags. type VPNGatewaysClientUpdateTagsResponse struct { + // VpnGateway Resource. VPNGateway } @@ -2362,6 +2756,8 @@ func (v *VPNLinkConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) e // VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.NewListByVPNConnectionPager. type VPNLinkConnectionsClientListByVPNConnectionResponse struct { + // Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and + // a URL nextLink to get the next set of results. ListVPNSiteLinkConnectionsResult } @@ -2372,11 +2768,13 @@ type VPNLinkConnectionsClientResetConnectionResponse struct { // VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList. type VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse struct { + // VpnServerConfigurations list associated with VirtualWan Response. VPNServerConfigurationsResponse } // VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.BeginCreateOrUpdate. type VPNServerConfigurationsClientCreateOrUpdateResponse struct { + // VpnServerConfiguration Resource. VPNServerConfiguration } @@ -2387,41 +2785,52 @@ type VPNServerConfigurationsClientDeleteResponse struct { // VPNServerConfigurationsClientGetResponse contains the response from method VPNServerConfigurationsClient.Get. type VPNServerConfigurationsClientGetResponse struct { + // VpnServerConfiguration Resource. VPNServerConfiguration } // VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.NewListByResourceGroupPager. type VPNServerConfigurationsClientListByResourceGroupResponse struct { + // Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink + // to get the next set of results. ListVPNServerConfigurationsResult } // VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.NewListPager. type VPNServerConfigurationsClientListResponse struct { + // Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink + // to get the next set of results. ListVPNServerConfigurationsResult } // VPNServerConfigurationsClientUpdateTagsResponse contains the response from method VPNServerConfigurationsClient.UpdateTags. type VPNServerConfigurationsClientUpdateTagsResponse struct { + // VpnServerConfiguration Resource. VPNServerConfiguration } // VPNSiteLinkConnectionsClientGetResponse contains the response from method VPNSiteLinkConnectionsClient.Get. type VPNSiteLinkConnectionsClientGetResponse struct { + // VpnSiteLinkConnection Resource. VPNSiteLinkConnection } // VPNSiteLinksClientGetResponse contains the response from method VPNSiteLinksClient.Get. type VPNSiteLinksClientGetResponse struct { + // VpnSiteLink Resource. VPNSiteLink } // VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.NewListByVPNSitePager. type VPNSiteLinksClientListByVPNSiteResponse struct { + // Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of + // results. ListVPNSiteLinksResult } // VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.BeginCreateOrUpdate. type VPNSitesClientCreateOrUpdateResponse struct { + // VpnSite Resource. VPNSite } @@ -2432,21 +2841,25 @@ type VPNSitesClientDeleteResponse struct { // VPNSitesClientGetResponse contains the response from method VPNSitesClient.Get. type VPNSitesClientGetResponse struct { + // VpnSite Resource. VPNSite } // VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.NewListByResourceGroupPager. type VPNSitesClientListByResourceGroupResponse struct { + // Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. ListVPNSitesResult } // VPNSitesClientListResponse contains the response from method VPNSitesClient.NewListPager. type VPNSitesClientListResponse struct { + // Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. ListVPNSitesResult } // VPNSitesClientUpdateTagsResponse contains the response from method VPNSitesClient.UpdateTags. type VPNSitesClientUpdateTagsResponse struct { + // VpnSite Resource. VPNSite } @@ -2462,16 +2875,19 @@ type VipSwapClientCreateResponse struct { // VipSwapClientGetResponse contains the response from method VipSwapClient.Get. type VipSwapClientGetResponse struct { + // SwapResource to represent slot type on the specified cloud service. SwapResource } // VipSwapClientListResponse contains the response from method VipSwapClient.List. type VipSwapClientListResponse struct { + // SwapResource List with single entry to represent slot type on the specified cloud service. SwapResourceListResult } // VirtualApplianceConnectionsClientCreateOrUpdateResponse contains the response from method VirtualApplianceConnectionsClient.BeginCreateOrUpdate. type VirtualApplianceConnectionsClientCreateOrUpdateResponse struct { + // NetworkVirtualApplianceConnection resource. VirtualApplianceConnection } @@ -2482,26 +2898,31 @@ type VirtualApplianceConnectionsClientDeleteResponse struct { // VirtualApplianceConnectionsClientGetResponse contains the response from method VirtualApplianceConnectionsClient.Get. type VirtualApplianceConnectionsClientGetResponse struct { + // NetworkVirtualApplianceConnection resource. VirtualApplianceConnection } // VirtualApplianceConnectionsClientListResponse contains the response from method VirtualApplianceConnectionsClient.NewListPager. type VirtualApplianceConnectionsClientListResponse struct { + // NetworkVirtualApplianceConnection list. VirtualApplianceConnectionList } // VirtualApplianceSKUsClientGetResponse contains the response from method VirtualApplianceSKUsClient.Get. type VirtualApplianceSKUsClientGetResponse struct { + // Definition of the NetworkVirtualApplianceSkus resource. VirtualApplianceSKU } // VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.NewListPager. type VirtualApplianceSKUsClientListResponse struct { + // Response for ListNetworkVirtualApplianceSkus API service call. VirtualApplianceSKUListResult } // VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.BeginCreateOrUpdate. type VirtualApplianceSitesClientCreateOrUpdateResponse struct { + // Virtual Appliance Site resource. VirtualApplianceSite } @@ -2512,16 +2933,19 @@ type VirtualApplianceSitesClientDeleteResponse struct { // VirtualApplianceSitesClientGetResponse contains the response from method VirtualApplianceSitesClient.Get. type VirtualApplianceSitesClientGetResponse struct { + // Virtual Appliance Site resource. VirtualApplianceSite } // VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.NewListPager. type VirtualApplianceSitesClientListResponse struct { + // Response for ListNetworkVirtualApplianceSites API service call. VirtualApplianceSiteListResult } // VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.BeginCreateOrUpdate. type VirtualAppliancesClientCreateOrUpdateResponse struct { + // NetworkVirtualAppliance Resource. VirtualAppliance } @@ -2532,26 +2956,31 @@ type VirtualAppliancesClientDeleteResponse struct { // VirtualAppliancesClientGetResponse contains the response from method VirtualAppliancesClient.Get. type VirtualAppliancesClientGetResponse struct { + // NetworkVirtualAppliance Resource. VirtualAppliance } // VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.NewListByResourceGroupPager. type VirtualAppliancesClientListByResourceGroupResponse struct { + // Response for ListNetworkVirtualAppliances API service call. VirtualApplianceListResult } // VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.NewListPager. type VirtualAppliancesClientListResponse struct { + // Response for ListNetworkVirtualAppliances API service call. VirtualApplianceListResult } // VirtualAppliancesClientUpdateTagsResponse contains the response from method VirtualAppliancesClient.UpdateTags. type VirtualAppliancesClientUpdateTagsResponse struct { + // NetworkVirtualAppliance Resource. VirtualAppliance } // VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.BeginCreateOrUpdate. type VirtualHubBgpConnectionClientCreateOrUpdateResponse struct { + // Virtual Appliance Site resource. BgpConnection } @@ -2562,6 +2991,7 @@ type VirtualHubBgpConnectionClientDeleteResponse struct { // VirtualHubBgpConnectionClientGetResponse contains the response from method VirtualHubBgpConnectionClient.Get. type VirtualHubBgpConnectionClientGetResponse struct { + // Virtual Appliance Site resource. BgpConnection } @@ -2589,11 +3019,13 @@ func (v *VirtualHubBgpConnectionsClientListLearnedRoutesResponse) UnmarshalJSON( // VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.NewListPager. type VirtualHubBgpConnectionsClientListResponse struct { + // VirtualHubBgpConnections list. ListVirtualHubBgpConnectionResults } // VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.BeginCreateOrUpdate. type VirtualHubIPConfigurationClientCreateOrUpdateResponse struct { + // IpConfigurations. HubIPConfiguration } @@ -2604,16 +3036,19 @@ type VirtualHubIPConfigurationClientDeleteResponse struct { // VirtualHubIPConfigurationClientGetResponse contains the response from method VirtualHubIPConfigurationClient.Get. type VirtualHubIPConfigurationClientGetResponse struct { + // IpConfigurations. HubIPConfiguration } // VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.NewListPager. type VirtualHubIPConfigurationClientListResponse struct { + // VirtualHubIpConfigurations list. ListVirtualHubIPConfigurationResults } // VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.BeginCreateOrUpdate. type VirtualHubRouteTableV2SClientCreateOrUpdateResponse struct { + // VirtualHubRouteTableV2 Resource. VirtualHubRouteTableV2 } @@ -2624,16 +3059,19 @@ type VirtualHubRouteTableV2SClientDeleteResponse struct { // VirtualHubRouteTableV2SClientGetResponse contains the response from method VirtualHubRouteTableV2SClient.Get. type VirtualHubRouteTableV2SClientGetResponse struct { + // VirtualHubRouteTableV2 Resource. VirtualHubRouteTableV2 } // VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.NewListPager. type VirtualHubRouteTableV2SClientListResponse struct { + // List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. ListVirtualHubRouteTableV2SResult } // VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.BeginCreateOrUpdate. type VirtualHubsClientCreateOrUpdateResponse struct { + // VirtualHub Resource. VirtualHub } @@ -2644,41 +3082,51 @@ type VirtualHubsClientDeleteResponse struct { // VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes. type VirtualHubsClientGetEffectiveVirtualHubRoutesResponse struct { + // EffectiveRoutes List. VirtualHubEffectiveRouteList } // VirtualHubsClientGetInboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetInboundRoutes. type VirtualHubsClientGetInboundRoutesResponse struct { + // EffectiveRouteMapRoute List. EffectiveRouteMapRouteList } // VirtualHubsClientGetOutboundRoutesResponse contains the response from method VirtualHubsClient.BeginGetOutboundRoutes. type VirtualHubsClientGetOutboundRoutesResponse struct { + // EffectiveRouteMapRoute List. EffectiveRouteMapRouteList } // VirtualHubsClientGetResponse contains the response from method VirtualHubsClient.Get. type VirtualHubsClientGetResponse struct { + // VirtualHub Resource. VirtualHub } // VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.NewListByResourceGroupPager. type VirtualHubsClientListByResourceGroupResponse struct { + // Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of + // results. ListVirtualHubsResult } // VirtualHubsClientListResponse contains the response from method VirtualHubsClient.NewListPager. type VirtualHubsClientListResponse struct { + // Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of + // results. ListVirtualHubsResult } // VirtualHubsClientUpdateTagsResponse contains the response from method VirtualHubsClient.UpdateTags. type VirtualHubsClientUpdateTagsResponse struct { + // VirtualHub Resource. VirtualHub } // VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate. type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse struct { + // A common class for general resource information. VirtualNetworkGatewayConnection } @@ -2699,16 +3147,19 @@ func (v *VirtualNetworkGatewayConnectionsClientGetIkeSasResponse) UnmarshalJSON( // VirtualNetworkGatewayConnectionsClientGetResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Get. type VirtualNetworkGatewayConnectionsClientGetResponse struct { + // A common class for general resource information. VirtualNetworkGatewayConnection } // VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetSharedKey. type VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse struct { + // Response for GetConnectionSharedKey API service call. ConnectionSharedKey } // VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.NewListPager. type VirtualNetworkGatewayConnectionsClientListResponse struct { + // Response for the ListVirtualNetworkGatewayConnections API service call. VirtualNetworkGatewayConnectionListResult } @@ -2719,11 +3170,13 @@ type VirtualNetworkGatewayConnectionsClientResetConnectionResponse struct { // VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey. type VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse struct { + // The virtual network connection reset shared key. ConnectionResetSharedKey } // VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey. type VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse struct { + // Response for GetConnectionSharedKey API service call. ConnectionSharedKey } @@ -2749,11 +3202,13 @@ func (v *VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse) Unmars // VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.BeginUpdateTags. type VirtualNetworkGatewayConnectionsClientUpdateTagsResponse struct { + // A common class for general resource information. VirtualNetworkGatewayConnection } // VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate. type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse struct { + // VirtualNetworkGatewayNatRule Resource. VirtualNetworkGatewayNatRule } @@ -2764,16 +3219,20 @@ type VirtualNetworkGatewayNatRulesClientDeleteResponse struct { // VirtualNetworkGatewayNatRulesClientGetResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Get. type VirtualNetworkGatewayNatRulesClientGetResponse struct { + // VirtualNetworkGatewayNatRule Resource. VirtualNetworkGatewayNatRule } // VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.NewListByVirtualNetworkGatewayPager. type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse struct { + // Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink + // to get the next set of results. ListVirtualNetworkGatewayNatRulesResult } // VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.BeginCreateOrUpdate. type VirtualNetworkGatewaysClientCreateOrUpdateResponse struct { + // A common class for general resource information. VirtualNetworkGateway } @@ -2809,21 +3268,25 @@ func (v *VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse) Unmarshal // VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes. type VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse struct { + // List of virtual network gateway routes. GatewayRouteListResult } // VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus. type VirtualNetworkGatewaysClientGetBgpPeerStatusResponse struct { + // Response for list BGP peer status API service call. BgpPeerStatusListResult } // VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetLearnedRoutes. type VirtualNetworkGatewaysClientGetLearnedRoutesResponse struct { + // List of virtual network gateway routes. GatewayRouteListResult } // VirtualNetworkGatewaysClientGetResponse contains the response from method VirtualNetworkGatewaysClient.Get. type VirtualNetworkGatewaysClientGetResponse struct { + // A common class for general resource information. VirtualNetworkGateway } @@ -2839,26 +3302,31 @@ func (v *VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse) UnmarshalJ // VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth. type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse struct { + // List of virtual network gateway vpn client connection health. VPNClientConnectionHealthDetailListResult } // VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse struct { + // An IPSec parameters for a virtual network gateway P2S connection. VPNClientIPsecParameters } // VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.NewListConnectionsPager. type VirtualNetworkGatewaysClientListConnectionsResponse struct { + // Response for the VirtualNetworkGatewayListConnections API service call. VirtualNetworkGatewayListConnectionsResult } // VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.NewListPager. type VirtualNetworkGatewaysClientListResponse struct { + // Response for the ListVirtualNetworkGateways API service call. VirtualNetworkGatewayListResult } // VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.BeginReset. type VirtualNetworkGatewaysClientResetResponse struct { + // A common class for general resource information. VirtualNetworkGateway } @@ -2869,6 +3337,7 @@ type VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse struct { // VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse struct { + // An IPSec parameters for a virtual network gateway P2S connection. VPNClientIPsecParameters } @@ -2899,6 +3368,7 @@ type VirtualNetworkGatewaysClientSupportedVPNDevicesResponse struct { // VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.BeginUpdateTags. type VirtualNetworkGatewaysClientUpdateTagsResponse struct { + // A common class for general resource information. VirtualNetworkGateway } @@ -2909,6 +3379,7 @@ type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse struct { // VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.BeginCreateOrUpdate. type VirtualNetworkPeeringsClientCreateOrUpdateResponse struct { + // Peerings in a virtual network resource. VirtualNetworkPeering } @@ -2919,16 +3390,19 @@ type VirtualNetworkPeeringsClientDeleteResponse struct { // VirtualNetworkPeeringsClientGetResponse contains the response from method VirtualNetworkPeeringsClient.Get. type VirtualNetworkPeeringsClientGetResponse struct { + // Peerings in a virtual network resource. VirtualNetworkPeering } // VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.NewListPager. type VirtualNetworkPeeringsClientListResponse struct { + // Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. VirtualNetworkPeeringListResult } // VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.BeginCreateOrUpdate. type VirtualNetworkTapsClientCreateOrUpdateResponse struct { + // Virtual Network Tap resource. VirtualNetworkTap } @@ -2939,31 +3413,37 @@ type VirtualNetworkTapsClientDeleteResponse struct { // VirtualNetworkTapsClientGetResponse contains the response from method VirtualNetworkTapsClient.Get. type VirtualNetworkTapsClientGetResponse struct { + // Virtual Network Tap resource. VirtualNetworkTap } // VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.NewListAllPager. type VirtualNetworkTapsClientListAllResponse struct { + // Response for ListVirtualNetworkTap API service call. VirtualNetworkTapListResult } // VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.NewListByResourceGroupPager. type VirtualNetworkTapsClientListByResourceGroupResponse struct { + // Response for ListVirtualNetworkTap API service call. VirtualNetworkTapListResult } // VirtualNetworkTapsClientUpdateTagsResponse contains the response from method VirtualNetworkTapsClient.UpdateTags. type VirtualNetworkTapsClientUpdateTagsResponse struct { + // Virtual Network Tap resource. VirtualNetworkTap } // VirtualNetworksClientCheckIPAddressAvailabilityResponse contains the response from method VirtualNetworksClient.CheckIPAddressAvailability. type VirtualNetworksClientCheckIPAddressAvailabilityResponse struct { + // Response for CheckIPAddressAvailability API service call. IPAddressAvailabilityResult } // VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate. type VirtualNetworksClientCreateOrUpdateResponse struct { + // Virtual Network resource. VirtualNetwork } @@ -2974,36 +3454,43 @@ type VirtualNetworksClientDeleteResponse struct { // VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get. type VirtualNetworksClientGetResponse struct { + // Virtual Network resource. VirtualNetwork } // VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.NewListAllPager. type VirtualNetworksClientListAllResponse struct { + // Response for the ListVirtualNetworks API service call. VirtualNetworkListResult } // VirtualNetworksClientListDdosProtectionStatusResponse contains the response from method VirtualNetworksClient.BeginListDdosProtectionStatus. type VirtualNetworksClientListDdosProtectionStatusResponse struct { + // Response for GetVirtualNetworkDdosProtectionStatusOperation. VirtualNetworkDdosProtectionStatusResult } // VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.NewListPager. type VirtualNetworksClientListResponse struct { + // Response for the ListVirtualNetworks API service call. VirtualNetworkListResult } // VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.NewListUsagePager. type VirtualNetworksClientListUsageResponse struct { + // Response for the virtual networks GetUsage API service call. VirtualNetworkListUsageResult } // VirtualNetworksClientUpdateTagsResponse contains the response from method VirtualNetworksClient.UpdateTags. type VirtualNetworksClientUpdateTagsResponse struct { + // Virtual Network resource. VirtualNetwork } // VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.BeginCreateOrUpdate. type VirtualRouterPeeringsClientCreateOrUpdateResponse struct { + // Virtual Router Peering resource. VirtualRouterPeering } @@ -3014,16 +3501,19 @@ type VirtualRouterPeeringsClientDeleteResponse struct { // VirtualRouterPeeringsClientGetResponse contains the response from method VirtualRouterPeeringsClient.Get. type VirtualRouterPeeringsClientGetResponse struct { + // Virtual Router Peering resource. VirtualRouterPeering } // VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.NewListPager. type VirtualRouterPeeringsClientListResponse struct { + // Response for ListVirtualRouterPeerings API service call. VirtualRouterPeeringListResult } // VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.BeginCreateOrUpdate. type VirtualRoutersClientCreateOrUpdateResponse struct { + // VirtualRouter Resource. VirtualRouter } @@ -3034,21 +3524,25 @@ type VirtualRoutersClientDeleteResponse struct { // VirtualRoutersClientGetResponse contains the response from method VirtualRoutersClient.Get. type VirtualRoutersClientGetResponse struct { + // VirtualRouter Resource. VirtualRouter } // VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.NewListByResourceGroupPager. type VirtualRoutersClientListByResourceGroupResponse struct { + // Response for ListVirtualRouters API service call. VirtualRouterListResult } // VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.NewListPager. type VirtualRoutersClientListResponse struct { + // Response for ListVirtualRouters API service call. VirtualRouterListResult } // VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.BeginCreateOrUpdate. type VirtualWansClientCreateOrUpdateResponse struct { + // VirtualWAN Resource. VirtualWAN } @@ -3059,31 +3553,39 @@ type VirtualWansClientDeleteResponse struct { // VirtualWansClientGetResponse contains the response from method VirtualWansClient.Get. type VirtualWansClientGetResponse struct { + // VirtualWAN Resource. VirtualWAN } // VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.NewListByResourceGroupPager. type VirtualWansClientListByResourceGroupResponse struct { + // Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of + // results. ListVirtualWANsResult } // VirtualWansClientListResponse contains the response from method VirtualWansClient.NewListPager. type VirtualWansClientListResponse struct { + // Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of + // results. ListVirtualWANsResult } // VirtualWansClientUpdateTagsResponse contains the response from method VirtualWansClient.UpdateTags. type VirtualWansClientUpdateTagsResponse struct { + // VirtualWAN Resource. VirtualWAN } // WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.BeginCheckConnectivity. type WatchersClientCheckConnectivityResponse struct { + // Information on the connectivity status. ConnectivityInformation } // WatchersClientCreateOrUpdateResponse contains the response from method WatchersClient.CreateOrUpdate. type WatchersClientCreateOrUpdateResponse struct { + // Network watcher in a resource group. Watcher } @@ -3094,81 +3596,97 @@ type WatchersClientDeleteResponse struct { // WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.BeginGetAzureReachabilityReport. type WatchersClientGetAzureReachabilityReportResponse struct { + // Azure reachability report details. AzureReachabilityReport } // WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.BeginGetFlowLogStatus. type WatchersClientGetFlowLogStatusResponse struct { + // Information on the configuration of flow log and traffic analytics (optional) . FlowLogInformation } // WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.BeginGetNetworkConfigurationDiagnostic. type WatchersClientGetNetworkConfigurationDiagnosticResponse struct { + // Results of network configuration diagnostic on the target resource. ConfigurationDiagnosticResponse } // WatchersClientGetNextHopResponse contains the response from method WatchersClient.BeginGetNextHop. type WatchersClientGetNextHopResponse struct { + // The information about next hop from the specified VM. NextHopResult } // WatchersClientGetResponse contains the response from method WatchersClient.Get. type WatchersClientGetResponse struct { + // Network watcher in a resource group. Watcher } // WatchersClientGetTopologyResponse contains the response from method WatchersClient.GetTopology. type WatchersClientGetTopologyResponse struct { + // Topology of the specified resource group. Topology } // WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.BeginGetTroubleshooting. type WatchersClientGetTroubleshootingResponse struct { + // Troubleshooting information gained from specified resource. TroubleshootingResult } // WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.BeginGetTroubleshootingResult. type WatchersClientGetTroubleshootingResultResponse struct { + // Troubleshooting information gained from specified resource. TroubleshootingResult } // WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.BeginGetVMSecurityRules. type WatchersClientGetVMSecurityRulesResponse struct { + // The information about security rules applied to the specified VM. SecurityGroupViewResult } // WatchersClientListAllResponse contains the response from method WatchersClient.NewListAllPager. type WatchersClientListAllResponse struct { + // Response for ListNetworkWatchers API service call. WatcherListResult } // WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.BeginListAvailableProviders. type WatchersClientListAvailableProvidersResponse struct { + // List of available countries with details. AvailableProvidersList } // WatchersClientListResponse contains the response from method WatchersClient.NewListPager. type WatchersClientListResponse struct { + // Response for ListNetworkWatchers API service call. WatcherListResult } // WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.BeginSetFlowLogConfiguration. type WatchersClientSetFlowLogConfigurationResponse struct { + // Information on the configuration of flow log and traffic analytics (optional) . FlowLogInformation } // WatchersClientUpdateTagsResponse contains the response from method WatchersClient.UpdateTags. type WatchersClientUpdateTagsResponse struct { + // Network watcher in a resource group. Watcher } // WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.BeginVerifyIPFlow. type WatchersClientVerifyIPFlowResponse struct { + // Results of IP flow verification on the target resource. VerificationIPFlowResult } // WebApplicationFirewallPoliciesClientCreateOrUpdateResponse contains the response from method WebApplicationFirewallPoliciesClient.CreateOrUpdate. type WebApplicationFirewallPoliciesClientCreateOrUpdateResponse struct { + // Defines web application firewall policy. WebApplicationFirewallPolicy } @@ -3179,25 +3697,32 @@ type WebApplicationFirewallPoliciesClientDeleteResponse struct { // WebApplicationFirewallPoliciesClientGetResponse contains the response from method WebApplicationFirewallPoliciesClient.Get. type WebApplicationFirewallPoliciesClientGetResponse struct { + // Defines web application firewall policy. WebApplicationFirewallPolicy } // WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListAllPager. type WebApplicationFirewallPoliciesClientListAllResponse struct { + // Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects + // and a URL link to get the next set of results. WebApplicationFirewallPolicyListResult } // WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.NewListPager. type WebApplicationFirewallPoliciesClientListResponse struct { + // Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects + // and a URL link to get the next set of results. WebApplicationFirewallPolicyListResult } // WebCategoriesClientGetResponse contains the response from method WebCategoriesClient.Get. type WebCategoriesClientGetResponse struct { + // Azure Web Category Resource. AzureWebCategory } // WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.NewListBySubscriptionPager. type WebCategoriesClientListBySubscriptionResponse struct { + // Response for ListAzureWebCategories API service call. AzureWebCategoryListResult }