From 6c9a4ce95d41e9b354976109b45a2017a84097ca Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 13 Apr 2022 05:51:12 +0000 Subject: [PATCH] CodeGen from PR 18432 in Azure/azure-rest-api-specs Merge 4a12dab7400973adb9d40c30cac55dea0810401b into c5c5e1d0c31a0ceccda42505d6e872ff303d1c80 --- .../network/armnetwork/CHANGELOG.md | 5246 +++++++ .../network/armnetwork/autorest.md | 6 +- sdk/resourcemanager/network/armnetwork/go.mod | 26 +- sdk/resourcemanager/network/armnetwork/go.sum | 25 +- ...yprivateendpointconnections_client_test.go | 121 - ...gatewayprivatelinkresources_client_test.go | 42 - ...example_applicationgateways_client_test.go | 616 - ...e_applicationsecuritygroups_client_test.go | 156 - ...xample_availabledelegations_client_test.go | 41 - ...e_availableendpointservices_client_test.go | 41 - ...ailableprivateendpointtypes_client_test.go | 66 - ...bleresourcegroupdelegations_client_test.go | 42 - ...ple_availableservicealiases_client_test.go | 66 - ...ample_azurefirewallfqdntags_client_test.go | 40 - ...ated_example_azurefirewalls_client_test.go | 284 - ...erated_example_bastionhosts_client_test.go | 172 - ...ample_bgpservicecommunities_client_test.go | 40 - ..._example_connectionmonitors_client_test.go | 227 - ...ed_example_customipprefixes_client_test.go | 158 - ..._example_ddoscustompolicies_client_test.go | 114 - ...example_ddosprotectionplans_client_test.go | 156 - ...xample_defaultsecurityrules_client_test.go | 61 - ...d_example_dscpconfiguration_client_test.go | 188 - ...sroutecircuitauthorizations_client_test.go | 111 - ...ressroutecircuitconnections_client_test.go | 128 - ...expressroutecircuitpeerings_client_test.go | 117 - ...xample_expressroutecircuits_client_test.go | 279 - ...ple_expressrouteconnections_client_test.go | 113 - ...outecrossconnectionpeerings_client_test.go | 121 - ...xpressroutecrossconnections_client_test.go | 208 - ...xample_expressroutegateways_client_test.go | 155 - ...d_example_expressroutelinks_client_test.go | 61 - ...d_example_expressrouteports_client_test.go | 181 - ..._expressrouteportslocations_client_test.go | 57 - ...xpressrouteserviceproviders_client_test.go | 40 - ...ed_example_firewallpolicies_client_test.go | 216 - ...irewallpolicyidpssignatures_client_test.go | 51 - ...yidpssignaturesfiltervalues_client_test.go | 39 - ...licyidpssignaturesoverrides_client_test.go | 112 - ...lpolicyrulecollectiongroups_client_test.go | 140 - ..._generated_example_flowlogs_client_test.go | 146 - ...ated_example_hubroutetables_client_test.go | 127 - ...ubvirtualnetworkconnections_client_test.go | 148 - ...ted_example_inboundnatrules_client_test.go | 122 - ...example_inboundsecurityrule_client_test.go | 53 - ...rated_example_ipallocations_client_test.go | 162 - ..._generated_example_ipgroups_client_test.go | 164 - ...balancerbackendaddresspools_client_test.go | 132 - ...cerfrontendipconfigurations_client_test.go | 61 - ...dbalancerloadbalancingrules_client_test.go | 61 - ...adbalancernetworkinterfaces_client_test.go | 42 - ...e_loadbalanceroutboundrules_client_test.go | 61 - ..._example_loadbalancerprobes_client_test.go | 61 - ...rated_example_loadbalancers_client_test.go | 246 - ...xample_localnetworkgateways_client_test.go | 140 - ...nerated_example_natgateways_client_test.go | 168 - ..._generated_example_natrules_client_test.go | 99 - ...rkinterfaceipconfigurations_client_test.go | 61 - ...tworkinterfaceloadbalancers_client_test.go | 42 - ...d_example_networkinterfaces_client_test.go | 356 - ...kinterfacetapconfigurations_client_test.go | 116 - ...ple_networkmanagementclient_client_test.go | 241 - ...ted_example_networkprofiles_client_test.go | 168 - ...ample_networksecuritygroups_client_test.go | 155 - ...le_networkvirtualappliances_client_test.go | 179 - ...ted_example_networkwatchers_client_test.go | 479 - ...enerated_example_operations_client_test.go | 40 - ...ated_example_p2svpngateways_client_test.go | 231 - ...ated_example_packetcaptures_client_test.go | 165 - ...ressroutecircuitconnections_client_test.go | 63 - ...xample_privatednszonegroups_client_test.go | 119 - ...ed_example_privateendpoints_client_test.go | 155 - ...example_privatelinkservices_client_test.go | 359 - ...d_example_publicipaddresses_client_test.go | 310 - ...ed_example_publicipprefixes_client_test.go | 163 - ...ple_resourcenavigationlinks_client_test.go | 36 - ...ed_example_routefilterrules_client_test.go | 118 - ...erated_example_routefilters_client_test.go | 170 - ...ze_generated_example_routes_client_test.go | 115 - ...nerated_example_routetables_client_test.go | 155 - ...rated_example_routingintent_client_test.go | 126 - ...le_securitypartnerproviders_client_test.go | 164 - ...rated_example_securityrules_client_test.go | 121 - ...ple_serviceassociationlinks_client_test.go | 36 - ...ple_serviceendpointpolicies_client_test.go | 155 - ...ceendpointpolicydefinitions_client_test.go | 119 - ...ample_servicetaginformation_client_test.go | 43 - ...nerated_example_servicetags_client_test.go | 34 - ...e_generated_example_subnets_client_test.go | 164 - ...ze_generated_example_usages_client_test.go | 41 - ...ample_virtualappliancesites_client_test.go | 121 - ...xample_virtualapplianceskus_client_test.go | 57 - ...ple_virtualhubbgpconnection_client_test.go | 93 - ...le_virtualhubbgpconnections_client_test.go | 90 - ...e_virtualhubipconfiguration_client_test.go | 116 - ...ple_virtualhubroutetablev2s_client_test.go | 133 - ...nerated_example_virtualhubs_client_test.go | 190 - ...alnetworkgatewayconnections_client_test.go | 363 - ...rtualnetworkgatewaynatrules_client_test.go | 126 - ...mple_virtualnetworkgateways_client_test.go | 427 - ...mple_virtualnetworkpeerings_client_test.go | 120 - ...ted_example_virtualnetworks_client_test.go | 206 - ..._example_virtualnetworktaps_client_test.go | 160 - ...ample_virtualrouterpeerings_client_test.go | 115 - ...ated_example_virtualrouters_client_test.go | 139 - ...nerated_example_virtualwans_client_test.go | 162 - ...ated_example_vpnconnections_client_test.go | 164 - ...nerated_example_vpngateways_client_test.go | 298 - ..._example_vpnlinkconnections_client_test.go | 66 - ...ple_vpnserverconfigurations_client_test.go | 199 - ...onsassociatedwithvirtualwan_client_test.go | 41 - ...mple_vpnsitelinkconnections_client_test.go | 37 - ...erated_example_vpnsitelinks_client_test.go | 36 - ..._generated_example_vpnsites_client_test.go | 191 - ...ample_vpnsitesconfiguration_client_test.go | 46 - ...applicationfirewallpolicies_client_test.go | 223 - ...rated_example_webcategories_client_test.go | 57 - ...atewayprivateendpointconnections_client.go | 115 +- ...ationgatewayprivatelinkresources_client.go | 61 +- ...zz_generated_applicationgateways_client.go | 301 +- ...erated_applicationsecuritygroups_client.go | 151 +- ...z_generated_availabledelegations_client.go | 61 +- ...erated_availableendpointservices_client.go | 61 +- ...ed_availableprivateendpointtypes_client.go | 95 +- ...vailableresourcegroupdelegations_client.go | 61 +- ...enerated_availableservicealiases_client.go | 95 +- ..._generated_azurefirewallfqdntags_client.go | 61 +- .../zz_generated_azurefirewalls_client.go | 175 +- .../zz_generated_bastionhosts_client.go | 175 +- ..._generated_bgpservicecommunities_client.go | 61 +- .../zz_generated_connectionmonitors_client.go | 196 +- .../armnetwork/zz_generated_constants.go | 856 +- .../zz_generated_customipprefixes_client.go | 151 +- .../zz_generated_ddoscustompolicies_client.go | 83 +- ...zz_generated_ddosprotectionplans_client.go | 151 +- ...z_generated_defaultsecurityrules_client.go | 63 +- .../zz_generated_dscpconfiguration_client.go | 149 +- ...xpressroutecircuitauthorizations_client.go | 115 +- ...d_expressroutecircuitconnections_client.go | 115 +- ...ated_expressroutecircuitpeerings_client.go | 115 +- ...z_generated_expressroutecircuits_client.go | 233 +- ...enerated_expressrouteconnections_client.go | 83 +- ...ressroutecrossconnectionpeerings_client.go | 115 +- ...ted_expressroutecrossconnections_client.go | 203 +- ...z_generated_expressroutegateways_client.go | 111 +- .../zz_generated_expressroutelinks_client.go | 63 +- .../zz_generated_expressrouteports_client.go | 153 +- ...rated_expressrouteportslocations_client.go | 63 +- ...ted_expressrouteserviceproviders_client.go | 61 +- .../zz_generated_firewallpolicies_client.go | 149 +- ...ted_firewallpolicyidpssignatures_client.go | 29 +- ...policyidpssignaturesfiltervalues_client.go | 29 +- ...allpolicyidpssignaturesoverrides_client.go | 35 +- ...rewallpolicyrulecollectiongroups_client.go | 115 +- .../zz_generated_flowlogs_client.go | 117 +- .../zz_generated_hubroutetables_client.go | 115 +- ...ted_hubvirtualnetworkconnections_client.go | 115 +- .../zz_generated_inboundnatrules_client.go | 115 +- ...zz_generated_inboundsecurityrule_client.go | 53 +- ...erated_interfaceipconfigurations_client.go | 63 +- ...generated_interfaceloadbalancers_client.go | 61 +- .../zz_generated_interfaces_client.go | 379 +- ...rated_interfacetapconfigurations_client.go | 115 +- .../zz_generated_ipallocations_client.go | 151 +- .../zz_generated_ipgroups_client.go | 151 +- ..._loadbalancerbackendaddresspools_client.go | 115 +- ...balancerfrontendipconfigurations_client.go | 63 +- ...d_loadbalancerloadbalancingrules_client.go | 63 +- ...ed_loadbalancernetworkinterfaces_client.go | 61 +- ...erated_loadbalanceroutboundrules_client.go | 63 +- .../zz_generated_loadbalancerprobes_client.go | 63 +- .../zz_generated_loadbalancers_client.go | 203 +- ...z_generated_localnetworkgateways_client.go | 117 +- .../zz_generated_management_client.go | 253 +- .../network/armnetwork/zz_generated_models.go | 5564 +------ .../armnetwork/zz_generated_models_serde.go | 4895 ++++++ .../zz_generated_natgateways_client.go | 151 +- .../zz_generated_natrules_client.go | 115 +- .../zz_generated_operations_client.go | 61 +- .../zz_generated_p2svpngateways_client.go | 305 +- .../zz_generated_packetcaptures_client.go | 168 +- .../network/armnetwork/zz_generated_pagers.go | 8275 ---------- ...erexpressroutecircuitconnections_client.go | 63 +- .../armnetwork/zz_generated_pollers.go | 9817 ------------ .../zz_generated_polymorphic_helpers.go | 4 +- ...z_generated_privatednszonegroups_client.go | 115 +- .../zz_generated_privateendpoints_client.go | 149 +- ...zz_generated_privatelinkservices_client.go | 333 +- .../zz_generated_profiles_client.go | 127 +- .../zz_generated_publicipaddresses_client.go | 291 +- .../zz_generated_publicipprefixes_client.go | 151 +- ...enerated_resourcenavigationlinks_client.go | 29 +- .../armnetwork/zz_generated_response_types.go | 12619 +--------------- .../zz_generated_routefilterrules_client.go | 115 +- .../zz_generated_routefilters_client.go | 151 +- .../armnetwork/zz_generated_routes_client.go | 115 +- .../zz_generated_routetables_client.go | 151 +- .../zz_generated_routingintent_client.go | 115 +- .../zz_generated_securitygroups_client.go | 151 +- ...nerated_securitypartnerproviders_client.go | 151 +- .../zz_generated_securityrules_client.go | 115 +- ...enerated_serviceassociationlinks_client.go | 29 +- ...enerated_serviceendpointpolicies_client.go | 151 +- ...serviceendpointpolicydefinitions_client.go | 115 +- ..._generated_servicetaginformation_client.go | 61 +- .../zz_generated_servicetags_client.go | 29 +- .../armnetwork/zz_generated_subnets_client.go | 167 +- .../armnetwork/zz_generated_time_rfc3339.go | 4 +- .../armnetwork/zz_generated_usages_client.go | 61 +- .../zz_generated_virtualappliances_client.go | 151 +- ..._generated_virtualappliancesites_client.go | 115 +- ...z_generated_virtualapplianceskus_client.go | 63 +- ...enerated_virtualhubbgpconnection_client.go | 81 +- ...nerated_virtualhubbgpconnections_client.go | 113 +- ...erated_virtualhubipconfiguration_client.go | 115 +- ...enerated_virtualhubroutetablev2s_client.go | 115 +- .../zz_generated_virtualhubs_client.go | 177 +- ...virtualnetworkgatewayconnections_client.go | 299 +- ...ed_virtualnetworkgatewaynatrules_client.go | 115 +- ...generated_virtualnetworkgateways_client.go | 543 +- ...generated_virtualnetworkpeerings_client.go | 115 +- .../zz_generated_virtualnetworks_client.go | 187 +- .../zz_generated_virtualnetworktaps_client.go | 151 +- ..._generated_virtualrouterpeerings_client.go | 115 +- .../zz_generated_virtualrouters_client.go | 149 +- .../zz_generated_virtualwans_client.go | 151 +- .../zz_generated_vpnconnections_client.go | 167 +- .../zz_generated_vpngateways_client.go | 253 +- .../zz_generated_vpnlinkconnections_client.go | 113 +- ...enerated_vpnserverconfigurations_client.go | 151 +- ...urationsassociatedwithvirtualwan_client.go | 53 +- ...generated_vpnsitelinkconnections_client.go | 29 +- .../zz_generated_vpnsitelinks_client.go | 63 +- .../zz_generated_vpnsites_client.go | 151 +- ..._generated_vpnsitesconfiguration_client.go | 53 +- .../zz_generated_watchers_client.go | 417 +- ...d_webapplicationfirewallpolicies_client.go | 125 +- .../zz_generated_webcategories_client.go | 63 +- 238 files changed, 19157 insertions(+), 58525 deletions(-) delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go delete mode 100644 sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go create mode 100644 sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go delete mode 100644 sdk/resourcemanager/network/armnetwork/zz_generated_pagers.go delete mode 100644 sdk/resourcemanager/network/armnetwork/zz_generated_pollers.go diff --git a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md index 6a0ef8a4c9dd..91b0dfb05991 100644 --- a/sdk/resourcemanager/network/armnetwork/CHANGELOG.md +++ b/sdk/resourcemanager/network/armnetwork/CHANGELOG.md @@ -1,5 +1,5251 @@ # Release History +## 0.4.0 (2022-04-13) +### Breaking Changes + +- Function `NewServiceAssociationLinksClient` return value(s) have been changed from `(*ServiceAssociationLinksClient)` to `(*ServiceAssociationLinksClient, error)` +- Function `*InterfacesClient.BeginListEffectiveNetworkSecurityGroups` return value(s) have been changed from `(InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse, error)` to `(*armruntime.Poller[InterfacesClientListEffectiveNetworkSecurityGroupsResponse], error)` +- Function `*BastionHostsClient.List` return value(s) have been changed from `(*BastionHostsClientListPager)` to `(*runtime.Pager[BastionHostsClientListResponse])` +- Function `NewConnectionMonitorsClient` return value(s) have been changed from `(*ConnectionMonitorsClient)` to `(*ConnectionMonitorsClient, error)` +- Function `*VirtualNetworkGatewaysClient.BeginDelete` return value(s) have been changed from `(VirtualNetworkGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientDeleteResponse], error)` +- Function `NewAvailableResourceGroupDelegationsClient` return value(s) have been changed from `(*AvailableResourceGroupDelegationsClient)` to `(*AvailableResourceGroupDelegationsClient, error)` +- Function `*ExpressRouteLinksClient.List` return value(s) have been changed from `(*ExpressRouteLinksClientListPager)` to `(*runtime.Pager[ExpressRouteLinksClientListResponse])` +- Function `NewRouteFiltersClient` return value(s) have been changed from `(*RouteFiltersClient)` to `(*RouteFiltersClient, error)` +- Function `*ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse], error)` +- Function `*VirtualHubsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualHubsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualHubsClientCreateOrUpdateResponse], error)` +- Function `*LoadBalancersClient.BeginDelete` return value(s) have been changed from `(LoadBalancersClientDeletePollerResponse, error)` to `(*armruntime.Poller[LoadBalancersClientDeleteResponse], error)` +- Function `*PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility` return value(s) have been changed from `(PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse, error)` to `(*armruntime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse], error)` +- Function `NewLoadBalancerNetworkInterfacesClient` return value(s) have been changed from `(*LoadBalancerNetworkInterfacesClient)` to `(*LoadBalancerNetworkInterfacesClient, error)` +- Function `NewServiceEndpointPolicyDefinitionsClient` return value(s) have been changed from `(*ServiceEndpointPolicyDefinitionsClient)` to `(*ServiceEndpointPolicyDefinitionsClient, error)` +- Function `NewFlowLogsClient` return value(s) have been changed from `(*FlowLogsClient)` to `(*FlowLogsClient, error)` +- Function `*ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse], error)` +- Function `NewFirewallPolicyIdpsSignaturesOverridesClient` return value(s) have been changed from `(*FirewallPolicyIdpsSignaturesOverridesClient)` to `(*FirewallPolicyIdpsSignaturesOverridesClient, error)` +- Function `*FirewallPoliciesClient.BeginCreateOrUpdate` return value(s) have been changed from `(FirewallPoliciesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[FirewallPoliciesClientCreateOrUpdateResponse], error)` +- Function `*IPGroupsClient.BeginCreateOrUpdate` return value(s) have been changed from `(IPGroupsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[IPGroupsClientCreateOrUpdateResponse], error)` +- Function `*VirtualWansClient.ListByResourceGroup` return value(s) have been changed from `(*VirtualWansClientListByResourceGroupPager)` to `(*runtime.Pager[VirtualWansClientListByResourceGroupResponse])` +- Function `NewAvailableEndpointServicesClient` return value(s) have been changed from `(*AvailableEndpointServicesClient)` to `(*AvailableEndpointServicesClient, error)` +- Function `NewNatRulesClient` return value(s) have been changed from `(*NatRulesClient)` to `(*NatRulesClient, error)` +- Function `*NatGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(NatGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[NatGatewaysClientCreateOrUpdateResponse], error)` +- Function `*WatchersClient.BeginGetTroubleshooting` return value(s) have been changed from `(WatchersClientGetTroubleshootingPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetTroubleshootingResponse], error)` +- Function `*AvailablePrivateEndpointTypesClient.ListByResourceGroup` return value(s) have been changed from `(*AvailablePrivateEndpointTypesClientListByResourceGroupPager)` to `(*runtime.Pager[AvailablePrivateEndpointTypesClientListByResourceGroupResponse])` +- Function `*AvailableDelegationsClient.List` return value(s) have been changed from `(*AvailableDelegationsClientListPager)` to `(*runtime.Pager[AvailableDelegationsClientListResponse])` +- Function `*ExpressRouteCircuitsClient.BeginListRoutesTable` return value(s) have been changed from `(ExpressRouteCircuitsClientListRoutesTablePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitsClientListRoutesTableResponse], error)` +- Function `*VPNSitesClient.BeginDelete` return value(s) have been changed from `(VPNSitesClientDeletePollerResponse, error)` to `(*armruntime.Poller[VPNSitesClientDeleteResponse], error)` +- Function `*SecurityRulesClient.BeginDelete` return value(s) have been changed from `(SecurityRulesClientDeletePollerResponse, error)` to `(*armruntime.Poller[SecurityRulesClientDeleteResponse], error)` +- Function `*InboundNatRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(InboundNatRulesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[InboundNatRulesClientCreateOrUpdateResponse], error)` +- Function `*PacketCapturesClient.List` parameter(s) have been changed from `(context.Context, string, string, *PacketCapturesClientListOptions)` to `(string, string, *PacketCapturesClientListOptions)` +- Function `*PacketCapturesClient.List` return value(s) have been changed from `(PacketCapturesClientListResponse, error)` to `(*runtime.Pager[PacketCapturesClientListResponse])` +- Function `NewServiceTagsClient` return value(s) have been changed from `(*ServiceTagsClient)` to `(*ServiceTagsClient, error)` +- Function `*PrivateEndpointsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateEndpointsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointsClientCreateOrUpdateResponse], error)` +- Function `*ServiceTagInformationClient.List` return value(s) have been changed from `(*ServiceTagInformationClientListPager)` to `(*runtime.Pager[ServiceTagInformationClientListResponse])` +- Function `NewExpressRouteCircuitPeeringsClient` return value(s) have been changed from `(*ExpressRouteCircuitPeeringsClient)` to `(*ExpressRouteCircuitPeeringsClient, error)` +- Function `NewVPNServerConfigurationsClient` return value(s) have been changed from `(*VPNServerConfigurationsClient)` to `(*VPNServerConfigurationsClient, error)` +- Function `*VirtualApplianceSitesClient.BeginDelete` return value(s) have been changed from `(VirtualApplianceSitesClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualApplianceSitesClientDeleteResponse], error)` +- Function `NewDdosProtectionPlansClient` return value(s) have been changed from `(*DdosProtectionPlansClient)` to `(*DdosProtectionPlansClient, error)` +- Function `*VirtualNetworkGatewayConnectionsClient.List` return value(s) have been changed from `(*VirtualNetworkGatewayConnectionsClientListPager)` to `(*runtime.Pager[VirtualNetworkGatewayConnectionsClientListResponse])` +- Function `*AvailableEndpointServicesClient.List` return value(s) have been changed from `(*AvailableEndpointServicesClientListPager)` to `(*runtime.Pager[AvailableEndpointServicesClientListResponse])` +- Function `*VirtualHubRouteTableV2SClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualHubRouteTableV2SClientCreateOrUpdateResponse], error)` +- Function `*ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete` return value(s) have been changed from `(ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse], error)` +- Function `*ApplicationSecurityGroupsClient.List` return value(s) have been changed from `(*ApplicationSecurityGroupsClientListPager)` to `(*runtime.Pager[ApplicationSecurityGroupsClientListResponse])` +- Function `*InterfacesClient.ListVirtualMachineScaleSetIPConfigurations` return value(s) have been changed from `(*InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager)` to `(*runtime.Pager[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse])` +- Function `*IPGroupsClient.List` return value(s) have been changed from `(*IPGroupsClientListPager)` to `(*runtime.Pager[IPGroupsClientListResponse])` +- Function `NewExpressRouteConnectionsClient` return value(s) have been changed from `(*ExpressRouteConnectionsClient)` to `(*ExpressRouteConnectionsClient, error)` +- Function `NewFirewallPolicyRuleCollectionGroupsClient` return value(s) have been changed from `(*FirewallPolicyRuleCollectionGroupsClient)` to `(*FirewallPolicyRuleCollectionGroupsClient, error)` +- Function `*FirewallPoliciesClient.BeginDelete` return value(s) have been changed from `(FirewallPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[FirewallPoliciesClientDeleteResponse], error)` +- Function `*SecurityPartnerProvidersClient.BeginDelete` return value(s) have been changed from `(SecurityPartnerProvidersClientDeletePollerResponse, error)` to `(*armruntime.Poller[SecurityPartnerProvidersClientDeleteResponse], error)` +- Function `*PrivateLinkServicesClient.BeginDelete` return value(s) have been changed from `(PrivateLinkServicesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateLinkServicesClientDeleteResponse], error)` +- Function `*WebApplicationFirewallPoliciesClient.List` return value(s) have been changed from `(*WebApplicationFirewallPoliciesClientListPager)` to `(*runtime.Pager[WebApplicationFirewallPoliciesClientListResponse])` +- Function `*SubnetsClient.BeginUnprepareNetworkPolicies` return value(s) have been changed from `(SubnetsClientUnprepareNetworkPoliciesPollerResponse, error)` to `(*armruntime.Poller[SubnetsClientUnprepareNetworkPoliciesResponse], error)` +- Function `*PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices` return value(s) have been changed from `(*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager)` to `(*runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse])` +- Function `*VPNConnectionsClient.BeginDelete` return value(s) have been changed from `(VPNConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VPNConnectionsClientDeleteResponse], error)` +- Function `*LoadBalancersClient.BeginSwapPublicIPAddresses` return value(s) have been changed from `(LoadBalancersClientSwapPublicIPAddressesPollerResponse, error)` to `(*armruntime.Poller[LoadBalancersClientSwapPublicIPAddressesResponse], error)` +- Function `NewExpressRouteCrossConnectionPeeringsClient` return value(s) have been changed from `(*ExpressRouteCrossConnectionPeeringsClient)` to `(*ExpressRouteCrossConnectionPeeringsClient, error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginUpdateTags` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse], error)` +- Function `*ManagementClient.BeginGetActiveSessions` return value(s) have been changed from `(ManagementClientGetActiveSessionsPollerResponse, error)` to `(*armruntime.Poller[*runtime.Pager[ManagementClientGetActiveSessionsResponse]], error)` +- Function `*FirewallPoliciesClient.ListAll` return value(s) have been changed from `(*FirewallPoliciesClientListAllPager)` to `(*runtime.Pager[FirewallPoliciesClientListAllResponse])` +- Function `*LoadBalancerOutboundRulesClient.List` return value(s) have been changed from `(*LoadBalancerOutboundRulesClientListPager)` to `(*runtime.Pager[LoadBalancerOutboundRulesClientListResponse])` +- Function `*IPAllocationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(IPAllocationsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[IPAllocationsClientCreateOrUpdateResponse], error)` +- Function `*UsagesClient.List` return value(s) have been changed from `(*UsagesClientListPager)` to `(*runtime.Pager[UsagesClientListResponse])` +- Function `*P2SVPNGatewaysClient.List` return value(s) have been changed from `(*P2SVPNGatewaysClientListPager)` to `(*runtime.Pager[P2SVPNGatewaysClientListResponse])` +- Function `NewIPAllocationsClient` return value(s) have been changed from `(*IPAllocationsClient)` to `(*IPAllocationsClient, error)` +- Function `*WatchersClient.BeginSetFlowLogConfiguration` return value(s) have been changed from `(WatchersClientSetFlowLogConfigurationPollerResponse, error)` to `(*armruntime.Poller[WatchersClientSetFlowLogConfigurationResponse], error)` +- Function `*VirtualHubRouteTableV2SClient.BeginDelete` return value(s) have been changed from `(VirtualHubRouteTableV2SClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualHubRouteTableV2SClientDeleteResponse], error)` +- Function `*PrivateLinkServicesClient.ListBySubscription` return value(s) have been changed from `(*PrivateLinkServicesClientListBySubscriptionPager)` to `(*runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse])` +- Function `NewLoadBalancerOutboundRulesClient` return value(s) have been changed from `(*LoadBalancerOutboundRulesClient)` to `(*LoadBalancerOutboundRulesClient, error)` +- Function `*InterfaceIPConfigurationsClient.List` return value(s) have been changed from `(*InterfaceIPConfigurationsClientListPager)` to `(*runtime.Pager[InterfaceIPConfigurationsClientListResponse])` +- Function `*SecurityPartnerProvidersClient.ListByResourceGroup` return value(s) have been changed from `(*SecurityPartnerProvidersClientListByResourceGroupPager)` to `(*runtime.Pager[SecurityPartnerProvidersClientListByResourceGroupResponse])` +- Function `*IPGroupsClient.ListByResourceGroup` return value(s) have been changed from `(*IPGroupsClientListByResourceGroupPager)` to `(*runtime.Pager[IPGroupsClientListByResourceGroupResponse])` +- Function `*PublicIPAddressesClient.List` return value(s) have been changed from `(*PublicIPAddressesClientListPager)` to `(*runtime.Pager[PublicIPAddressesClientListResponse])` +- Function `*NatGatewaysClient.ListAll` return value(s) have been changed from `(*NatGatewaysClientListAllPager)` to `(*runtime.Pager[NatGatewaysClientListAllResponse])` +- Function `*InterfacesClient.BeginGetEffectiveRouteTable` return value(s) have been changed from `(InterfacesClientGetEffectiveRouteTablePollerResponse, error)` to `(*armruntime.Poller[InterfacesClientGetEffectiveRouteTableResponse], error)` +- Function `*VirtualAppliancesClient.ListByResourceGroup` return value(s) have been changed from `(*VirtualAppliancesClientListByResourceGroupPager)` to `(*runtime.Pager[VirtualAppliancesClientListByResourceGroupResponse])` +- Function `*ExpressRoutePortsLocationsClient.List` return value(s) have been changed from `(*ExpressRoutePortsLocationsClientListPager)` to `(*runtime.Pager[ExpressRoutePortsLocationsClientListResponse])` +- Function `*BastionHostsClient.BeginDelete` return value(s) have been changed from `(BastionHostsClientDeletePollerResponse, error)` to `(*armruntime.Poller[BastionHostsClientDeleteResponse], error)` +- Function `NewInterfacesClient` return value(s) have been changed from `(*InterfacesClient)` to `(*InterfacesClient, error)` +- Function `*ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse], error)` +- Function `*VirtualRoutersClient.BeginDelete` return value(s) have been changed from `(VirtualRoutersClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualRoutersClientDeleteResponse], error)` +- Function `NewSubnetsClient` return value(s) have been changed from `(*SubnetsClient)` to `(*SubnetsClient, error)` +- Function `*ExpressRouteCircuitConnectionsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteCircuitConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitConnectionsClientDeleteResponse], error)` +- Function `NewRouteTablesClient` return value(s) have been changed from `(*RouteTablesClient)` to `(*RouteTablesClient, error)` +- Function `*PublicIPAddressesClient.ListCloudServicePublicIPAddresses` return value(s) have been changed from `(*PublicIPAddressesClientListCloudServicePublicIPAddressesPager)` to `(*runtime.Pager[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse])` +- Function `*RouteTablesClient.BeginDelete` return value(s) have been changed from `(RouteTablesClientDeletePollerResponse, error)` to `(*armruntime.Poller[RouteTablesClientDeleteResponse], error)` +- Function `*NatGatewaysClient.List` return value(s) have been changed from `(*NatGatewaysClientListPager)` to `(*runtime.Pager[NatGatewaysClientListResponse])` +- Function `NewCustomIPPrefixesClient` return value(s) have been changed from `(*CustomIPPrefixesClient)` to `(*CustomIPPrefixesClient, error)` +- Function `*IPAllocationsClient.ListByResourceGroup` return value(s) have been changed from `(*IPAllocationsClientListByResourceGroupPager)` to `(*runtime.Pager[IPAllocationsClientListByResourceGroupResponse])` +- Function `*AvailableServiceAliasesClient.ListByResourceGroup` return value(s) have been changed from `(*AvailableServiceAliasesClientListByResourceGroupPager)` to `(*runtime.Pager[AvailableServiceAliasesClientListByResourceGroupResponse])` +- Function `*ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse], error)` +- Function `*VPNGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(VPNGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientCreateOrUpdateResponse], error)` +- Function `*FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate` return value(s) have been changed from `(FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse], error)` +- Function `NewWebCategoriesClient` return value(s) have been changed from `(*WebCategoriesClient)` to `(*WebCategoriesClient, error)` +- Function `NewExpressRouteCircuitAuthorizationsClient` return value(s) have been changed from `(*ExpressRouteCircuitAuthorizationsClient)` to `(*ExpressRouteCircuitAuthorizationsClient, error)` +- Function `NewVirtualHubRouteTableV2SClient` return value(s) have been changed from `(*VirtualHubRouteTableV2SClient)` to `(*VirtualHubRouteTableV2SClient, error)` +- Function `*NatRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(NatRulesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[NatRulesClientCreateOrUpdateResponse], error)` +- Function `*PublicIPPrefixesClient.BeginCreateOrUpdate` return value(s) have been changed from `(PublicIPPrefixesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PublicIPPrefixesClientCreateOrUpdateResponse], error)` +- Function `NewVirtualAppliancesClient` return value(s) have been changed from `(*VirtualAppliancesClient)` to `(*VirtualAppliancesClient, error)` +- Function `*NatGatewaysClient.BeginDelete` return value(s) have been changed from `(NatGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[NatGatewaysClientDeleteResponse], error)` +- Function `NewSecurityGroupsClient` return value(s) have been changed from `(*SecurityGroupsClient)` to `(*SecurityGroupsClient, error)` +- Function `NewVirtualHubBgpConnectionClient` return value(s) have been changed from `(*VirtualHubBgpConnectionClient)` to `(*VirtualHubBgpConnectionClient, error)` +- Function `NewRouteFilterRulesClient` return value(s) have been changed from `(*RouteFilterRulesClient)` to `(*RouteFilterRulesClient, error)` +- Function `*VirtualRoutersClient.ListByResourceGroup` return value(s) have been changed from `(*VirtualRoutersClientListByResourceGroupPager)` to `(*runtime.Pager[VirtualRoutersClientListByResourceGroupResponse])` +- Function `*DscpConfigurationClient.BeginCreateOrUpdate` return value(s) have been changed from `(DscpConfigurationClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[DscpConfigurationClientCreateOrUpdateResponse], error)` +- Function `NewExpressRouteLinksClient` return value(s) have been changed from `(*ExpressRouteLinksClient)` to `(*ExpressRouteLinksClient, error)` +- Function `NewHubVirtualNetworkConnectionsClient` return value(s) have been changed from `(*HubVirtualNetworkConnectionsClient)` to `(*HubVirtualNetworkConnectionsClient, error)` +- Function `NewExpressRouteCrossConnectionsClient` return value(s) have been changed from `(*ExpressRouteCrossConnectionsClient)` to `(*ExpressRouteCrossConnectionsClient, error)` +- Function `NewLoadBalancerFrontendIPConfigurationsClient` return value(s) have been changed from `(*LoadBalancerFrontendIPConfigurationsClient)` to `(*LoadBalancerFrontendIPConfigurationsClient, error)` +- Function `*PrivateLinkServicesClient.ListPrivateEndpointConnections` return value(s) have been changed from `(*PrivateLinkServicesClientListPrivateEndpointConnectionsPager)` to `(*runtime.Pager[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse])` +- Function `*RouteFilterRulesClient.BeginDelete` return value(s) have been changed from `(RouteFilterRulesClientDeletePollerResponse, error)` to `(*armruntime.Poller[RouteFilterRulesClientDeleteResponse], error)` +- Function `*VirtualRouterPeeringsClient.BeginDelete` return value(s) have been changed from `(VirtualRouterPeeringsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualRouterPeeringsClientDeleteResponse], error)` +- Function `NewProfilesClient` return value(s) have been changed from `(*ProfilesClient)` to `(*ProfilesClient, error)` +- Function `*IPAllocationsClient.BeginDelete` return value(s) have been changed from `(IPAllocationsClientDeletePollerResponse, error)` to `(*armruntime.Poller[IPAllocationsClientDeleteResponse], error)` +- Function `*AvailableResourceGroupDelegationsClient.List` return value(s) have been changed from `(*AvailableResourceGroupDelegationsClientListPager)` to `(*runtime.Pager[AvailableResourceGroupDelegationsClientListResponse])` +- Function `*PublicIPAddressesClient.BeginCreateOrUpdate` return value(s) have been changed from `(PublicIPAddressesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PublicIPAddressesClientCreateOrUpdateResponse], error)` +- Function `*HubRouteTablesClient.BeginDelete` return value(s) have been changed from `(HubRouteTablesClientDeletePollerResponse, error)` to `(*armruntime.Poller[HubRouteTablesClientDeleteResponse], error)` +- Function `*ExpressRouteCircuitPeeringsClient.List` return value(s) have been changed from `(*ExpressRouteCircuitPeeringsClientListPager)` to `(*runtime.Pager[ExpressRouteCircuitPeeringsClientListResponse])` +- Function `NewAvailablePrivateEndpointTypesClient` return value(s) have been changed from `(*AvailablePrivateEndpointTypesClient)` to `(*AvailablePrivateEndpointTypesClient, error)` +- Function `*RouteTablesClient.List` return value(s) have been changed from `(*RouteTablesClientListPager)` to `(*runtime.Pager[RouteTablesClientListResponse])` +- Function `*RouteFiltersClient.BeginDelete` return value(s) have been changed from `(RouteFiltersClientDeletePollerResponse, error)` to `(*armruntime.Poller[RouteFiltersClientDeleteResponse], error)` +- Function `NewSecurityRulesClient` return value(s) have been changed from `(*SecurityRulesClient)` to `(*SecurityRulesClient, error)` +- Function `*PeerExpressRouteCircuitConnectionsClient.List` return value(s) have been changed from `(*PeerExpressRouteCircuitConnectionsClientListPager)` to `(*runtime.Pager[PeerExpressRouteCircuitConnectionsClientListResponse])` +- Function `*VirtualNetworkGatewayNatRulesClient.BeginDelete` return value(s) have been changed from `(VirtualNetworkGatewayNatRulesClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayNatRulesClientDeleteResponse], error)` +- Function `*CustomIPPrefixesClient.ListAll` return value(s) have been changed from `(*CustomIPPrefixesClientListAllPager)` to `(*runtime.Pager[CustomIPPrefixesClientListAllResponse])` +- Function `*LocalNetworkGatewaysClient.List` return value(s) have been changed from `(*LocalNetworkGatewaysClientListPager)` to `(*runtime.Pager[LocalNetworkGatewaysClientListResponse])` +- Function `*VirtualNetworksClient.ListUsage` return value(s) have been changed from `(*VirtualNetworksClientListUsagePager)` to `(*runtime.Pager[VirtualNetworksClientListUsageResponse])` +- Function `NewVPNSitesClient` return value(s) have been changed from `(*VPNSitesClient)` to `(*VPNSitesClient, error)` +- Function `*SecurityRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(SecurityRulesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[SecurityRulesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse], error)` +- Function `*PrivateEndpointsClient.ListBySubscription` return value(s) have been changed from `(*PrivateEndpointsClientListBySubscriptionPager)` to `(*runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse])` +- Function `*LoadBalancersClient.BeginListInboundNatRulePortMappings` return value(s) have been changed from `(LoadBalancersClientListInboundNatRulePortMappingsPollerResponse, error)` to `(*armruntime.Poller[LoadBalancersClientListInboundNatRulePortMappingsResponse], error)` +- Function `*ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate` return value(s) have been changed from `(ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse], error)` +- Function `*VirtualHubIPConfigurationClient.BeginDelete` return value(s) have been changed from `(VirtualHubIPConfigurationClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualHubIPConfigurationClientDeleteResponse], error)` +- Function `*OperationsClient.List` return value(s) have been changed from `(*OperationsClientListPager)` to `(*runtime.Pager[OperationsClientListResponse])` +- Function `NewLocalNetworkGatewaysClient` return value(s) have been changed from `(*LocalNetworkGatewaysClient)` to `(*LocalNetworkGatewaysClient, error)` +- Function `*VirtualNetworkGatewaysClient.BeginGenerateVPNProfile` return value(s) have been changed from `(VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGenerateVPNProfileResponse], error)` +- Function `NewVirtualNetworkPeeringsClient` return value(s) have been changed from `(*VirtualNetworkPeeringsClient)` to `(*VirtualNetworkPeeringsClient, error)` +- Function `*ApplicationSecurityGroupsClient.BeginDelete` return value(s) have been changed from `(ApplicationSecurityGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ApplicationSecurityGroupsClientDeleteResponse], error)` +- Function `*VPNGatewaysClient.BeginDelete` return value(s) have been changed from `(VPNGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientDeleteResponse], error)` +- Function `*VPNConnectionsClient.BeginStartPacketCapture` return value(s) have been changed from `(VPNConnectionsClientStartPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VPNConnectionsClientStartPacketCaptureResponse], error)` +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList` return value(s) have been changed from `(VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse, error)` to `(*armruntime.Poller[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse], error)` +- Function `*WatchersClient.BeginGetTroubleshootingResult` return value(s) have been changed from `(WatchersClientGetTroubleshootingResultPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetTroubleshootingResultResponse], error)` +- Function `*RouteTablesClient.BeginCreateOrUpdate` return value(s) have been changed from `(RouteTablesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[RouteTablesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworksClient.BeginDelete` return value(s) have been changed from `(VirtualNetworksClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworksClientDeleteResponse], error)` +- Function `NewVPNLinkConnectionsClient` return value(s) have been changed from `(*VPNLinkConnectionsClient)` to `(*VPNLinkConnectionsClient, error)` +- Function `*ServiceEndpointPolicyDefinitionsClient.BeginDelete` return value(s) have been changed from `(ServiceEndpointPolicyDefinitionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ServiceEndpointPolicyDefinitionsClientDeleteResponse], error)` +- Function `NewLoadBalancerBackendAddressPoolsClient` return value(s) have been changed from `(*LoadBalancerBackendAddressPoolsClient)` to `(*LoadBalancerBackendAddressPoolsClient, error)` +- Function `*LoadBalancersClient.List` return value(s) have been changed from `(*LoadBalancersClientListPager)` to `(*runtime.Pager[LoadBalancersClientListResponse])` +- Function `*VPNServerConfigurationsClient.List` return value(s) have been changed from `(*VPNServerConfigurationsClientListPager)` to `(*runtime.Pager[VPNServerConfigurationsClientListResponse])` +- Function `NewHubRouteTablesClient` return value(s) have been changed from `(*HubRouteTablesClient)` to `(*HubRouteTablesClient, error)` +- Function `*FirewallPoliciesClient.List` return value(s) have been changed from `(*FirewallPoliciesClientListPager)` to `(*runtime.Pager[FirewallPoliciesClientListResponse])` +- Function `*IPGroupsClient.BeginDelete` return value(s) have been changed from `(IPGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[IPGroupsClientDeleteResponse], error)` +- Function `*VirtualHubBgpConnectionClient.BeginDelete` return value(s) have been changed from `(VirtualHubBgpConnectionClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualHubBgpConnectionClientDeleteResponse], error)` +- Function `*ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile` return value(s) have been changed from `(ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse, error)` to `(*armruntime.Poller[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse], error)` +- Function `*InterfaceLoadBalancersClient.List` return value(s) have been changed from `(*InterfaceLoadBalancersClientListPager)` to `(*runtime.Pager[InterfaceLoadBalancersClientListResponse])` +- Function `NewFirewallPolicyIdpsSignaturesClient` return value(s) have been changed from `(*FirewallPolicyIdpsSignaturesClient)` to `(*FirewallPolicyIdpsSignaturesClient, error)` +- Function `*ServiceEndpointPoliciesClient.BeginDelete` return value(s) have been changed from `(ServiceEndpointPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ServiceEndpointPoliciesClientDeleteResponse], error)` +- Function `*ConnectionMonitorsClient.List` parameter(s) have been changed from `(context.Context, string, string, *ConnectionMonitorsClientListOptions)` to `(string, string, *ConnectionMonitorsClientListOptions)` +- Function `*ConnectionMonitorsClient.List` return value(s) have been changed from `(ConnectionMonitorsClientListResponse, error)` to `(*runtime.Pager[ConnectionMonitorsClientListResponse])` +- Function `*ExpressRoutePortsClient.BeginDelete` return value(s) have been changed from `(ExpressRoutePortsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRoutePortsClientDeleteResponse], error)` +- Function `*ExpressRouteCircuitPeeringsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteCircuitPeeringsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitPeeringsClientDeleteResponse], error)` +- Function `NewP2SVPNGatewaysClient` return value(s) have been changed from `(*P2SVPNGatewaysClient)` to `(*P2SVPNGatewaysClient, error)` +- Function `*VPNLinkConnectionsClient.BeginResetConnection` return value(s) have been changed from `(VPNLinkConnectionsClientResetConnectionPollerResponse, error)` to `(*armruntime.Poller[VPNLinkConnectionsClientResetConnectionResponse], error)` +- Function `NewVirtualNetworkGatewayNatRulesClient` return value(s) have been changed from `(*VirtualNetworkGatewayNatRulesClient)` to `(*VirtualNetworkGatewayNatRulesClient, error)` +- Function `*VPNSitesConfigurationClient.BeginDownload` return value(s) have been changed from `(VPNSitesConfigurationClientDownloadPollerResponse, error)` to `(*armruntime.Poller[VPNSitesConfigurationClientDownloadResponse], error)` +- Function `NewInterfaceIPConfigurationsClient` return value(s) have been changed from `(*InterfaceIPConfigurationsClient)` to `(*InterfaceIPConfigurationsClient, error)` +- Function `NewLoadBalancersClient` return value(s) have been changed from `(*LoadBalancersClient)` to `(*LoadBalancersClient, error)` +- Function `*HubRouteTablesClient.BeginCreateOrUpdate` return value(s) have been changed from `(HubRouteTablesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[HubRouteTablesClientCreateOrUpdateResponse], error)` +- Function `*DscpConfigurationClient.List` return value(s) have been changed from `(*DscpConfigurationClientListPager)` to `(*runtime.Pager[DscpConfigurationClientListResponse])` +- Function `*WatchersClient.ListAll` parameter(s) have been changed from `(context.Context, *WatchersClientListAllOptions)` to `(*WatchersClientListAllOptions)` +- Function `*WatchersClient.ListAll` return value(s) have been changed from `(WatchersClientListAllResponse, error)` to `(*runtime.Pager[WatchersClientListAllResponse])` +- Function `*ManagementClient.GetBastionShareableLink` return value(s) have been changed from `(*ManagementClientGetBastionShareableLinkPager)` to `(*runtime.Pager[ManagementClientGetBastionShareableLinkResponse])` +- Function `*VirtualRoutersClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualRoutersClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualRoutersClientCreateOrUpdateResponse], error)` +- Function `*PrivateEndpointsClient.List` return value(s) have been changed from `(*PrivateEndpointsClientListPager)` to `(*runtime.Pager[PrivateEndpointsClientListResponse])` +- Function `*VirtualNetworkTapsClient.ListAll` return value(s) have been changed from `(*VirtualNetworkTapsClientListAllPager)` to `(*runtime.Pager[VirtualNetworkTapsClientListAllResponse])` +- Function `*ExpressRoutePortsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRoutePortsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRoutePortsClientCreateOrUpdateResponse], error)` +- Function `NewExpressRouteCircuitsClient` return value(s) have been changed from `(*ExpressRouteCircuitsClient)` to `(*ExpressRouteCircuitsClient, error)` +- Function `*SecurityGroupsClient.BeginCreateOrUpdate` return value(s) have been changed from `(SecurityGroupsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[SecurityGroupsClientCreateOrUpdateResponse], error)` +- Function `*CustomIPPrefixesClient.BeginCreateOrUpdate` return value(s) have been changed from `(CustomIPPrefixesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[CustomIPPrefixesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginStopPacketCapture` return value(s) have been changed from `(VirtualNetworkGatewaysClientStopPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientStopPacketCaptureResponse], error)` +- Function `*VirtualApplianceSKUsClient.List` return value(s) have been changed from `(*VirtualApplianceSKUsClientListPager)` to `(*runtime.Pager[VirtualApplianceSKUsClientListResponse])` +- Function `*VirtualHubRouteTableV2SClient.List` return value(s) have been changed from `(*VirtualHubRouteTableV2SClientListPager)` to `(*runtime.Pager[VirtualHubRouteTableV2SClientListResponse])` +- Function `*ConnectionMonitorsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ConnectionMonitorsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ConnectionMonitorsClientCreateOrUpdateResponse], error)` +- Function `*VirtualApplianceSitesClient.List` return value(s) have been changed from `(*VirtualApplianceSitesClientListPager)` to `(*runtime.Pager[VirtualApplianceSitesClientListResponse])` +- Function `*PublicIPPrefixesClient.ListAll` return value(s) have been changed from `(*PublicIPPrefixesClientListAllPager)` to `(*runtime.Pager[PublicIPPrefixesClientListAllResponse])` +- Function `*VirtualHubBgpConnectionsClient.BeginListLearnedRoutes` return value(s) have been changed from `(VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse, error)` to `(*armruntime.Poller[VirtualHubBgpConnectionsClientListLearnedRoutesResponse], error)` +- Function `NewIPGroupsClient` return value(s) have been changed from `(*IPGroupsClient)` to `(*IPGroupsClient, error)` +- Function `*ExpressRouteCircuitsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteCircuitsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitsClientDeleteResponse], error)` +- Function `*ApplicationGatewaysClient.BeginStart` return value(s) have been changed from `(ApplicationGatewaysClientStartPollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientStartResponse], error)` +- Function `*AzureFirewallsClient.BeginDelete` return value(s) have been changed from `(AzureFirewallsClientDeletePollerResponse, error)` to `(*armruntime.Poller[AzureFirewallsClientDeleteResponse], error)` +- Function `*ConnectionMonitorsClient.BeginDelete` return value(s) have been changed from `(ConnectionMonitorsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ConnectionMonitorsClientDeleteResponse], error)` +- Function `*IPAllocationsClient.List` return value(s) have been changed from `(*IPAllocationsClientListPager)` to `(*runtime.Pager[IPAllocationsClientListResponse])` +- Function `*VPNConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VPNConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VPNConnectionsClientCreateOrUpdateResponse], error)` +- Function `*WatchersClient.BeginGetNetworkConfigurationDiagnostic` return value(s) have been changed from `(WatchersClientGetNetworkConfigurationDiagnosticPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetNetworkConfigurationDiagnosticResponse], error)` +- Function `NewExpressRouteServiceProvidersClient` return value(s) have been changed from `(*ExpressRouteServiceProvidersClient)` to `(*ExpressRouteServiceProvidersClient, error)` +- Function `NewPublicIPAddressesClient` return value(s) have been changed from `(*PublicIPAddressesClient)` to `(*PublicIPAddressesClient, error)` +- Function `*ApplicationGatewayPrivateEndpointConnectionsClient.List` return value(s) have been changed from `(*ApplicationGatewayPrivateEndpointConnectionsClientListPager)` to `(*runtime.Pager[ApplicationGatewayPrivateEndpointConnectionsClientListResponse])` +- Function `*DscpConfigurationClient.ListAll` return value(s) have been changed from `(*DscpConfigurationClientListAllPager)` to `(*runtime.Pager[DscpConfigurationClientListAllResponse])` +- Function `*ExpressRouteCircuitsClient.BeginListRoutesTableSummary` return value(s) have been changed from `(ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitsClientListRoutesTableSummaryResponse], error)` +- Function `*RouteFiltersClient.BeginCreateOrUpdate` return value(s) have been changed from `(RouteFiltersClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[RouteFiltersClientCreateOrUpdateResponse], error)` +- Function `*PrivateDNSZoneGroupsClient.BeginDelete` return value(s) have been changed from `(PrivateDNSZoneGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateDNSZoneGroupsClientDeleteResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginGetLearnedRoutes` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetLearnedRoutesResponse], error)` +- Function `*LocalNetworkGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(LocalNetworkGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[LocalNetworkGatewaysClientCreateOrUpdateResponse], error)` +- Function `*PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup` return value(s) have been changed from `(PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse, error)` to `(*armruntime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse], error)` +- Function `NewVirtualNetworkGatewayConnectionsClient` return value(s) have been changed from `(*VirtualNetworkGatewayConnectionsClient)` to `(*VirtualNetworkGatewayConnectionsClient, error)` +- Function `*InterfaceTapConfigurationsClient.List` return value(s) have been changed from `(*InterfaceTapConfigurationsClientListPager)` to `(*runtime.Pager[InterfaceTapConfigurationsClientListResponse])` +- Function `NewVirtualNetworkTapsClient` return value(s) have been changed from `(*VirtualNetworkTapsClient)` to `(*VirtualNetworkTapsClient, error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse], error)` +- Function `NewDdosCustomPoliciesClient` return value(s) have been changed from `(*DdosCustomPoliciesClient)` to `(*DdosCustomPoliciesClient, error)` +- Function `NewSecurityPartnerProvidersClient` return value(s) have been changed from `(*SecurityPartnerProvidersClient)` to `(*SecurityPartnerProvidersClient, error)` +- Function `*VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes` return value(s) have been changed from `(VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse, error)` to `(*armruntime.Poller[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse], error)` +- Function `*VirtualAppliancesClient.List` return value(s) have been changed from `(*VirtualAppliancesClientListPager)` to `(*runtime.Pager[VirtualAppliancesClientListResponse])` +- Function `*VirtualHubsClient.ListByResourceGroup` return value(s) have been changed from `(*VirtualHubsClientListByResourceGroupPager)` to `(*runtime.Pager[VirtualHubsClientListByResourceGroupResponse])` +- Function `*PacketCapturesClient.BeginStop` return value(s) have been changed from `(PacketCapturesClientStopPollerResponse, error)` to `(*armruntime.Poller[PacketCapturesClientStopResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse], error)` +- Function `NewNatGatewaysClient` return value(s) have been changed from `(*NatGatewaysClient)` to `(*NatGatewaysClient, error)` +- Function `*ExpressRouteCrossConnectionsClient.ListByResourceGroup` return value(s) have been changed from `(*ExpressRouteCrossConnectionsClientListByResourceGroupPager)` to `(*runtime.Pager[ExpressRouteCrossConnectionsClientListByResourceGroupResponse])` +- Function `*P2SVPNGatewaysClient.BeginUpdateTags` return value(s) have been changed from `(P2SVPNGatewaysClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientUpdateTagsResponse], error)` +- Function `*VPNLinkConnectionsClient.ListByVPNConnection` return value(s) have been changed from `(*VPNLinkConnectionsClientListByVPNConnectionPager)` to `(*runtime.Pager[VPNLinkConnectionsClientListByVPNConnectionResponse])` +- Function `NewExpressRouteCircuitConnectionsClient` return value(s) have been changed from `(*ExpressRouteCircuitConnectionsClient)` to `(*ExpressRouteCircuitConnectionsClient, error)` +- Function `*VirtualAppliancesClient.BeginDelete` return value(s) have been changed from `(VirtualAppliancesClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualAppliancesClientDeleteResponse], error)` +- Function `*P2SVPNGatewaysClient.ListByResourceGroup` return value(s) have been changed from `(*P2SVPNGatewaysClientListByResourceGroupPager)` to `(*runtime.Pager[P2SVPNGatewaysClientListByResourceGroupResponse])` +- Function `NewAzureFirewallFqdnTagsClient` return value(s) have been changed from `(*AzureFirewallFqdnTagsClient)` to `(*AzureFirewallFqdnTagsClient, error)` +- Function `*ExpressRouteCrossConnectionsClient.BeginListRoutesTable` return value(s) have been changed from `(ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableResponse], error)` +- Function `*CustomIPPrefixesClient.List` return value(s) have been changed from `(*CustomIPPrefixesClientListPager)` to `(*runtime.Pager[CustomIPPrefixesClientListResponse])` +- Function `*WatchersClient.BeginGetFlowLogStatus` return value(s) have been changed from `(WatchersClientGetFlowLogStatusPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetFlowLogStatusResponse], error)` +- Function `*WebApplicationFirewallPoliciesClient.ListAll` return value(s) have been changed from `(*WebApplicationFirewallPoliciesClientListAllPager)` to `(*runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse])` +- Function `*ExpressRouteCircuitConnectionsClient.List` return value(s) have been changed from `(*ExpressRouteCircuitConnectionsClientListPager)` to `(*runtime.Pager[ExpressRouteCircuitConnectionsClientListResponse])` +- Function `*ApplicationGatewaysClient.BeginStop` return value(s) have been changed from `(ApplicationGatewaysClientStopPollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientStopResponse], error)` +- Function `*VirtualNetworkPeeringsClient.List` return value(s) have been changed from `(*VirtualNetworkPeeringsClientListPager)` to `(*runtime.Pager[VirtualNetworkPeeringsClientListResponse])` +- Function `*ExpressRouteCrossConnectionPeeringsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionPeeringsClientDeleteResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginUpdateTags` return value(s) have been changed from `(VirtualNetworkGatewaysClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientUpdateTagsResponse], error)` +- Function `*VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway` return value(s) have been changed from `(*VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager)` to `(*runtime.Pager[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse])` +- Function `*SubnetsClient.BeginDelete` return value(s) have been changed from `(SubnetsClientDeletePollerResponse, error)` to `(*armruntime.Poller[SubnetsClientDeleteResponse], error)` +- Function `*SecurityRulesClient.List` return value(s) have been changed from `(*SecurityRulesClientListPager)` to `(*runtime.Pager[SecurityRulesClientListResponse])` +- Function `NewServiceEndpointPoliciesClient` return value(s) have been changed from `(*ServiceEndpointPoliciesClient)` to `(*ServiceEndpointPoliciesClient, error)` +- Function `*ExpressRouteCircuitsClient.BeginListArpTable` return value(s) have been changed from `(ExpressRouteCircuitsClientListArpTablePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitsClientListArpTableResponse], error)` +- Function `*VirtualApplianceSitesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualApplianceSitesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualApplianceSitesClientCreateOrUpdateResponse], error)` +- Function `*WatchersClient.BeginVerifyIPFlow` return value(s) have been changed from `(WatchersClientVerifyIPFlowPollerResponse, error)` to `(*armruntime.Poller[WatchersClientVerifyIPFlowResponse], error)` +- Function `*DdosProtectionPlansClient.BeginCreateOrUpdate` return value(s) have been changed from `(DdosProtectionPlansClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[DdosProtectionPlansClientCreateOrUpdateResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed` return value(s) have been changed from `(P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse], error)` +- Function `NewInboundNatRulesClient` return value(s) have been changed from `(*InboundNatRulesClient)` to `(*InboundNatRulesClient, error)` +- Function `*VirtualNetworksClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworksClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error)` +- Function `*VPNSitesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VPNSitesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VPNSitesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse], error)` +- Function `*SubnetsClient.BeginCreateOrUpdate` return value(s) have been changed from `(SubnetsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[SubnetsClientCreateOrUpdateResponse], error)` +- Function `NewVirtualHubIPConfigurationClient` return value(s) have been changed from `(*VirtualHubIPConfigurationClient)` to `(*VirtualHubIPConfigurationClient, error)` +- Function `*ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkPeeringsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkPeeringsClientCreateOrUpdateResponse], error)` +- Function `*InterfacesClient.List` return value(s) have been changed from `(*InterfacesClientListPager)` to `(*runtime.Pager[InterfacesClientListResponse])` +- Function `*P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections` return value(s) have been changed from `(P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse], error)` +- Function `*ExpressRouteCircuitsClient.List` return value(s) have been changed from `(*ExpressRouteCircuitsClientListPager)` to `(*runtime.Pager[ExpressRouteCircuitsClientListResponse])` +- Function `*InterfacesClient.BeginDelete` return value(s) have been changed from `(InterfacesClientDeletePollerResponse, error)` to `(*armruntime.Poller[InterfacesClientDeleteResponse], error)` +- Function `NewLoadBalancerLoadBalancingRulesClient` return value(s) have been changed from `(*LoadBalancerLoadBalancingRulesClient)` to `(*LoadBalancerLoadBalancingRulesClient, error)` +- Function `*VirtualNetworkTapsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworkTapsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkTapsClientCreateOrUpdateResponse], error)` +- Function `*RoutesClient.BeginDelete` return value(s) have been changed from `(RoutesClientDeletePollerResponse, error)` to `(*armruntime.Poller[RoutesClientDeleteResponse], error)` +- Function `*ExpressRoutePortsClient.List` return value(s) have been changed from `(*ExpressRoutePortsClientListPager)` to `(*runtime.Pager[ExpressRoutePortsClientListResponse])` +- Function `*ProfilesClient.List` return value(s) have been changed from `(*ProfilesClientListPager)` to `(*runtime.Pager[ProfilesClientListResponse])` +- Function `*ExpressRouteCircuitsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCircuitsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitsClientCreateOrUpdateResponse], error)` +- Function `NewVirtualRouterPeeringsClient` return value(s) have been changed from `(*VirtualRouterPeeringsClient)` to `(*VirtualRouterPeeringsClient, error)` +- Function `NewVirtualHubsClient` return value(s) have been changed from `(*VirtualHubsClient)` to `(*VirtualHubsClient, error)` +- Function `*VirtualHubBgpConnectionsClient.List` return value(s) have been changed from `(*VirtualHubBgpConnectionsClientListPager)` to `(*runtime.Pager[VirtualHubBgpConnectionsClientListResponse])` +- Function `*VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters` return value(s) have been changed from `(VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginStartPacketCapture` return value(s) have been changed from `(VirtualNetworkGatewaysClientStartPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientStartPacketCaptureResponse], error)` +- Function `*DdosCustomPoliciesClient.BeginDelete` return value(s) have been changed from `(DdosCustomPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[DdosCustomPoliciesClientDeleteResponse], error)` +- Function `NewBgpServiceCommunitiesClient` return value(s) have been changed from `(*BgpServiceCommunitiesClient)` to `(*BgpServiceCommunitiesClient, error)` +- Function `*ProfilesClient.ListAll` return value(s) have been changed from `(*ProfilesClientListAllPager)` to `(*runtime.Pager[ProfilesClientListAllResponse])` +- Function `*SecurityGroupsClient.ListAll` return value(s) have been changed from `(*SecurityGroupsClientListAllPager)` to `(*runtime.Pager[SecurityGroupsClientListAllResponse])` +- Function `*PrivateEndpointsClient.BeginDelete` return value(s) have been changed from `(PrivateEndpointsClientDeletePollerResponse, error)` to `(*armruntime.Poller[PrivateEndpointsClientDeleteResponse], error)` +- Function `*VPNConnectionsClient.BeginStopPacketCapture` return value(s) have been changed from `(VPNConnectionsClientStopPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VPNConnectionsClientStopPacketCaptureResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginGenerateVPNProfile` return value(s) have been changed from `(P2SVPNGatewaysClientGenerateVPNProfilePollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientGenerateVPNProfileResponse], error)` +- Function `*VPNSitesClient.List` return value(s) have been changed from `(*VPNSitesClientListPager)` to `(*runtime.Pager[VPNSitesClientListResponse])` +- Function `*PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup` return value(s) have been changed from `(*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager)` to `(*runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse])` +- Function `*HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse], error)` +- Function `*VPNServerConfigurationsClient.BeginDelete` return value(s) have been changed from `(VPNServerConfigurationsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VPNServerConfigurationsClientDeleteResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(P2SVPNGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientCreateOrUpdateResponse], error)` +- Function `*LocalNetworkGatewaysClient.BeginDelete` return value(s) have been changed from `(LocalNetworkGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[LocalNetworkGatewaysClientDeleteResponse], error)` +- Function `*VirtualRoutersClient.List` return value(s) have been changed from `(*VirtualRoutersClientListPager)` to `(*runtime.Pager[VirtualRoutersClientListResponse])` +- Function `*ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies` return value(s) have been changed from `(*ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager)` to `(*runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse])` +- Function `*ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup` return value(s) have been changed from `(*ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager)` to `(*runtime.Pager[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse])` +- Function `*DdosProtectionPlansClient.ListByResourceGroup` return value(s) have been changed from `(*DdosProtectionPlansClientListByResourceGroupPager)` to `(*runtime.Pager[DdosProtectionPlansClientListByResourceGroupResponse])` +- Function `*VPNServerConfigurationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VPNServerConfigurationsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VPNServerConfigurationsClientCreateOrUpdateResponse], error)` +- Function `*VPNGatewaysClient.BeginUpdateTags` return value(s) have been changed from `(VPNGatewaysClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientUpdateTagsResponse], error)` +- Function `*AzureFirewallsClient.BeginCreateOrUpdate` return value(s) have been changed from `(AzureFirewallsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[AzureFirewallsClientCreateOrUpdateResponse], error)` +- Function `*WatchersClient.BeginGetAzureReachabilityReport` return value(s) have been changed from `(WatchersClientGetAzureReachabilityReportPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetAzureReachabilityReportResponse], error)` +- Function `*PublicIPAddressesClient.ListAll` return value(s) have been changed from `(*PublicIPAddressesClientListAllPager)` to `(*runtime.Pager[PublicIPAddressesClientListAllResponse])` +- Function `NewApplicationGatewaysClient` return value(s) have been changed from `(*ApplicationGatewaysClient)` to `(*ApplicationGatewaysClient, error)` +- Function `*WatchersClient.BeginGetNextHop` return value(s) have been changed from `(WatchersClientGetNextHopPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetNextHopResponse], error)` +- Function `NewVirtualNetworkGatewaysClient` return value(s) have been changed from `(*VirtualNetworkGatewaysClient)` to `(*VirtualNetworkGatewaysClient, error)` +- Function `*ExpressRouteGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteGatewaysClientCreateOrUpdateResponse], error)` +- Function `NewFirewallPoliciesClient` return value(s) have been changed from `(*FirewallPoliciesClient)` to `(*FirewallPoliciesClient, error)` +- Function `NewFirewallPolicyIdpsSignaturesFilterValuesClient` return value(s) have been changed from `(*FirewallPolicyIdpsSignaturesFilterValuesClient)` to `(*FirewallPolicyIdpsSignaturesFilterValuesClient, error)` +- Function `*ApplicationGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(ApplicationGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientCreateOrUpdateResponse], error)` +- Function `*ExpressRouteCrossConnectionsClient.List` return value(s) have been changed from `(*ExpressRouteCrossConnectionsClientListPager)` to `(*runtime.Pager[ExpressRouteCrossConnectionsClientListResponse])` +- Function `*VirtualNetworkTapsClient.BeginDelete` return value(s) have been changed from `(VirtualNetworkTapsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkTapsClientDeleteResponse], error)` +- Function `*ApplicationGatewaysClient.BeginBackendHealthOnDemand` return value(s) have been changed from `(ApplicationGatewaysClientBackendHealthOnDemandPollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientBackendHealthOnDemandResponse], error)` +- Function `*ServiceEndpointPoliciesClient.List` return value(s) have been changed from `(*ServiceEndpointPoliciesClientListPager)` to `(*runtime.Pager[ServiceEndpointPoliciesClientListResponse])` +- Function `*ExpressRouteCircuitsClient.ListAll` return value(s) have been changed from `(*ExpressRouteCircuitsClientListAllPager)` to `(*runtime.Pager[ExpressRouteCircuitsClientListAllResponse])` +- Function `NewUsagesClient` return value(s) have been changed from `(*UsagesClient)` to `(*UsagesClient, error)` +- Function `*PacketCapturesClient.BeginDelete` return value(s) have been changed from `(PacketCapturesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PacketCapturesClientDeleteResponse], error)` +- Function `NewRoutesClient` return value(s) have been changed from `(*RoutesClient)` to `(*RoutesClient, error)` +- Function `*PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses` return value(s) have been changed from `(*PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager)` to `(*runtime.Pager[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse])` +- Function `*PacketCapturesClient.BeginGetStatus` return value(s) have been changed from `(PacketCapturesClientGetStatusPollerResponse, error)` to `(*armruntime.Poller[PacketCapturesClientGetStatusResponse], error)` +- Function `*PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection` return value(s) have been changed from `(PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse, error)` to `(*armruntime.Poller[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginReset` return value(s) have been changed from `(VirtualNetworkGatewaysClientResetPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientResetResponse], error)` +- Function `*PrivateDNSZoneGroupsClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PrivateDNSZoneGroupsClientCreateOrUpdateResponse], error)` +- Function `*DdosCustomPoliciesClient.BeginCreateOrUpdate` return value(s) have been changed from `(DdosCustomPoliciesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[DdosCustomPoliciesClientCreateOrUpdateResponse], error)` +- Function `*LoadBalancerBackendAddressPoolsClient.List` return value(s) have been changed from `(*LoadBalancerBackendAddressPoolsClientListPager)` to `(*runtime.Pager[LoadBalancerBackendAddressPoolsClientListResponse])` +- Function `*PublicIPPrefixesClient.List` return value(s) have been changed from `(*PublicIPPrefixesClientListPager)` to `(*runtime.Pager[PublicIPPrefixesClientListResponse])` +- Function `*BastionHostsClient.ListByResourceGroup` return value(s) have been changed from `(*BastionHostsClientListByResourceGroupPager)` to `(*runtime.Pager[BastionHostsClientListByResourceGroupResponse])` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse], error)` +- Function `*VPNGatewaysClient.BeginStartPacketCapture` return value(s) have been changed from `(VPNGatewaysClientStartPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientStartPacketCaptureResponse], error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse], error)` +- Function `*VPNLinkConnectionsClient.BeginGetIkeSas` return value(s) have been changed from `(VPNLinkConnectionsClientGetIkeSasPollerResponse, error)` to `(*armruntime.Poller[VPNLinkConnectionsClientGetIkeSasResponse], error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse], error)` +- Function `NewBastionHostsClient` return value(s) have been changed from `(*BastionHostsClient)` to `(*BastionHostsClient, error)` +- Function `*HubRouteTablesClient.List` return value(s) have been changed from `(*HubRouteTablesClientListPager)` to `(*runtime.Pager[HubRouteTablesClientListResponse])` +- Function `*VPNSiteLinksClient.ListByVPNSite` return value(s) have been changed from `(*VPNSiteLinksClientListByVPNSitePager)` to `(*runtime.Pager[VPNSiteLinksClientListByVPNSiteResponse])` +- Function `*VirtualNetworksClient.ListAll` return value(s) have been changed from `(*VirtualNetworksClientListAllPager)` to `(*runtime.Pager[VirtualNetworksClientListAllResponse])` +- Function `*FirewallPolicyRuleCollectionGroupsClient.BeginDelete` return value(s) have been changed from `(FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[FirewallPolicyRuleCollectionGroupsClientDeleteResponse], error)` +- Function `*DscpConfigurationClient.BeginDelete` return value(s) have been changed from `(DscpConfigurationClientDeletePollerResponse, error)` to `(*armruntime.Poller[DscpConfigurationClientDeleteResponse], error)` +- Function `*ExpressRouteServiceProvidersClient.List` return value(s) have been changed from `(*ExpressRouteServiceProvidersClientListPager)` to `(*runtime.Pager[ExpressRouteServiceProvidersClientListResponse])` +- Function `*WatchersClient.BeginGetVMSecurityRules` return value(s) have been changed from `(WatchersClientGetVMSecurityRulesPollerResponse, error)` to `(*armruntime.Poller[WatchersClientGetVMSecurityRulesResponse], error)` +- Function `*BastionHostsClient.BeginCreateOrUpdate` return value(s) have been changed from `(BastionHostsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[BastionHostsClientCreateOrUpdateResponse], error)` +- Function `*PrivateLinkServicesClient.List` return value(s) have been changed from `(*PrivateLinkServicesClientListPager)` to `(*runtime.Pager[PrivateLinkServicesClientListResponse])` +- Function `*InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces` return value(s) have been changed from `(*InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager)` to `(*runtime.Pager[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse])` +- Function `*ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse], error)` +- Function `*PrivateDNSZoneGroupsClient.List` return value(s) have been changed from `(*PrivateDNSZoneGroupsClientListPager)` to `(*runtime.Pager[PrivateDNSZoneGroupsClientListResponse])` +- Function `*HubVirtualNetworkConnectionsClient.BeginDelete` return value(s) have been changed from `(HubVirtualNetworkConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[HubVirtualNetworkConnectionsClientDeleteResponse], error)` +- Function `*ManagementClient.BeginDeleteBastionShareableLink` return value(s) have been changed from `(ManagementClientDeleteBastionShareableLinkPollerResponse, error)` to `(*armruntime.Poller[ManagementClientDeleteBastionShareableLinkResponse], error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginDelete` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientDeleteResponse], error)` +- Function `*AvailablePrivateEndpointTypesClient.List` return value(s) have been changed from `(*AvailablePrivateEndpointTypesClientListPager)` to `(*runtime.Pager[AvailablePrivateEndpointTypesClientListResponse])` +- Function `NewOperationsClient` return value(s) have been changed from `(*OperationsClient)` to `(*OperationsClient, error)` +- Function `*PublicIPPrefixesClient.BeginDelete` return value(s) have been changed from `(PublicIPPrefixesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PublicIPPrefixesClientDeleteResponse], error)` +- Function `NewVPNSiteLinksClient` return value(s) have been changed from `(*VPNSiteLinksClient)` to `(*VPNSiteLinksClient, error)` +- Function `NewInterfaceTapConfigurationsClient` return value(s) have been changed from `(*InterfaceTapConfigurationsClient)` to `(*InterfaceTapConfigurationsClient, error)` +- Function `*VPNGatewaysClient.BeginStopPacketCapture` return value(s) have been changed from `(VPNGatewaysClientStopPacketCapturePollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientStopPacketCaptureResponse], error)` +- Function `*DdosProtectionPlansClient.List` return value(s) have been changed from `(*DdosProtectionPlansClientListPager)` to `(*runtime.Pager[DdosProtectionPlansClientListResponse])` +- Function `NewPrivateDNSZoneGroupsClient` return value(s) have been changed from `(*PrivateDNSZoneGroupsClient)` to `(*PrivateDNSZoneGroupsClient, error)` +- Function `*ExpressRouteCircuitAuthorizationsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteCircuitAuthorizationsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCircuitAuthorizationsClientDeleteResponse], error)` +- Function `NewVPNSitesConfigurationClient` return value(s) have been changed from `(*VPNSitesConfigurationClient)` to `(*VPNSitesConfigurationClient, error)` +- Function `*VirtualNetworkGatewaysClient.ListConnections` return value(s) have been changed from `(*VirtualNetworkGatewaysClientListConnectionsPager)` to `(*runtime.Pager[VirtualNetworkGatewaysClientListConnectionsResponse])` +- Function `*SecurityGroupsClient.BeginDelete` return value(s) have been changed from `(SecurityGroupsClientDeletePollerResponse, error)` to `(*armruntime.Poller[SecurityGroupsClientDeleteResponse], error)` +- Function `*ManagementClient.BeginPutBastionShareableLink` return value(s) have been changed from `(ManagementClientPutBastionShareableLinkPollerResponse, error)` to `(*armruntime.Poller[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]], error)` +- Function `*ExpressRouteGatewaysClient.BeginUpdateTags` return value(s) have been changed from `(ExpressRouteGatewaysClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[ExpressRouteGatewaysClientUpdateTagsResponse], error)` +- Function `*VPNConnectionsClient.ListByVPNGateway` return value(s) have been changed from `(*VPNConnectionsClientListByVPNGatewayPager)` to `(*runtime.Pager[VPNConnectionsClientListByVPNGatewayResponse])` +- Function `*ExpressRouteConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ExpressRouteConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteConnectionsClientCreateOrUpdateResponse], error)` +- Function `*ApplicationGatewaysClient.ListAll` return value(s) have been changed from `(*ApplicationGatewaysClientListAllPager)` to `(*runtime.Pager[ApplicationGatewaysClientListAllResponse])` +- Function `NewApplicationGatewayPrivateLinkResourcesClient` return value(s) have been changed from `(*ApplicationGatewayPrivateLinkResourcesClient)` to `(*ApplicationGatewayPrivateLinkResourcesClient, error)` +- Function `*NatRulesClient.ListByVPNGateway` return value(s) have been changed from `(*NatRulesClientListByVPNGatewayPager)` to `(*runtime.Pager[NatRulesClientListByVPNGatewayResponse])` +- Function `NewDefaultSecurityRulesClient` return value(s) have been changed from `(*DefaultSecurityRulesClient)` to `(*DefaultSecurityRulesClient, error)` +- Function `*ExpressRouteCrossConnectionPeeringsClient.List` return value(s) have been changed from `(*ExpressRouteCrossConnectionPeeringsClientListPager)` to `(*runtime.Pager[ExpressRouteCrossConnectionPeeringsClientListResponse])` +- Function `*InterfaceTapConfigurationsClient.BeginDelete` return value(s) have been changed from `(InterfaceTapConfigurationsClientDeletePollerResponse, error)` to `(*armruntime.Poller[InterfaceTapConfigurationsClientDeleteResponse], error)` +- Function `*VirtualWansClient.List` return value(s) have been changed from `(*VirtualWansClientListPager)` to `(*runtime.Pager[VirtualWansClientListResponse])` +- Function `NewResourceNavigationLinksClient` return value(s) have been changed from `(*ResourceNavigationLinksClient)` to `(*ResourceNavigationLinksClient, error)` +- Function `*VPNServerConfigurationsClient.ListByResourceGroup` return value(s) have been changed from `(*VPNServerConfigurationsClientListByResourceGroupPager)` to `(*runtime.Pager[VPNServerConfigurationsClientListByResourceGroupResponse])` +- Function `NewInterfaceLoadBalancersClient` return value(s) have been changed from `(*InterfaceLoadBalancersClient)` to `(*InterfaceLoadBalancersClient, error)` +- Function `NewPrivateEndpointsClient` return value(s) have been changed from `(*PrivateEndpointsClient)` to `(*PrivateEndpointsClient, error)` +- Function `*RoutingIntentClient.List` return value(s) have been changed from `(*RoutingIntentClientListPager)` to `(*runtime.Pager[RoutingIntentClientListResponse])` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginDelete` return value(s) have been changed from `(P2SVPNGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientDeleteResponse], error)` +- Function `*VPNGatewaysClient.List` return value(s) have been changed from `(*VPNGatewaysClientListPager)` to `(*runtime.Pager[VPNGatewaysClientListResponse])` +- Function `*ExpressRouteConnectionsClient.BeginDelete` return value(s) have been changed from `(ExpressRouteConnectionsClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteConnectionsClientDeleteResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections` return value(s) have been changed from `(VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse], error)` +- Function `*ApplicationGatewaysClient.BeginBackendHealth` return value(s) have been changed from `(ApplicationGatewaysClientBackendHealthPollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientBackendHealthResponse], error)` +- Function `*InterfacesClient.ListAll` return value(s) have been changed from `(*InterfacesClientListAllPager)` to `(*runtime.Pager[InterfacesClientListAllResponse])` +- Function `*RouteFilterRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(RouteFilterRulesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[RouteFilterRulesClientCreateOrUpdateResponse], error)` +- Function `*VPNGatewaysClient.ListByResourceGroup` return value(s) have been changed from `(*VPNGatewaysClientListByResourceGroupPager)` to `(*runtime.Pager[VPNGatewaysClientListByResourceGroupResponse])` +- Function `*FlowLogsClient.List` return value(s) have been changed from `(*FlowLogsClientListPager)` to `(*runtime.Pager[FlowLogsClientListResponse])` +- Function `*VirtualHubIPConfigurationClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualHubIPConfigurationClientCreateOrUpdateResponse], error)` +- Function `*VirtualHubsClient.BeginDelete` return value(s) have been changed from `(VirtualHubsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualHubsClientDeleteResponse], error)` +- Function `*LoadBalancerProbesClient.List` return value(s) have been changed from `(*LoadBalancerProbesClientListPager)` to `(*runtime.Pager[LoadBalancerProbesClientListResponse])` +- Function `NewVirtualApplianceSitesClient` return value(s) have been changed from `(*VirtualApplianceSitesClient)` to `(*VirtualApplianceSitesClient, error)` +- Function `*PublicIPAddressesClient.BeginDelete` return value(s) have been changed from `(PublicIPAddressesClientDeletePollerResponse, error)` to `(*armruntime.Poller[PublicIPAddressesClientDeleteResponse], error)` +- Function `*ManagementClient.DisconnectActiveSessions` return value(s) have been changed from `(*ManagementClientDisconnectActiveSessionsPager)` to `(*runtime.Pager[ManagementClientDisconnectActiveSessionsResponse])` +- Function `NewVirtualHubBgpConnectionsClient` return value(s) have been changed from `(*VirtualHubBgpConnectionsClient)` to `(*VirtualHubBgpConnectionsClient, error)` +- Function `*ExpressRouteCrossConnectionsClient.BeginListArpTable` return value(s) have been changed from `(ExpressRouteCrossConnectionsClientListArpTablePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionsClientListArpTableResponse], error)` +- Function `*WebApplicationFirewallPoliciesClient.BeginDelete` return value(s) have been changed from `(WebApplicationFirewallPoliciesClientDeletePollerResponse, error)` to `(*armruntime.Poller[WebApplicationFirewallPoliciesClientDeleteResponse], error)` +- Function `*AzureFirewallFqdnTagsClient.ListAll` return value(s) have been changed from `(*AzureFirewallFqdnTagsClientListAllPager)` to `(*runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse])` +- Function `*InterfaceTapConfigurationsClient.BeginCreateOrUpdate` return value(s) have been changed from `(InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[InterfaceTapConfigurationsClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientCreateOrUpdateResponse], error)` +- Function `*AzureFirewallsClient.ListAll` return value(s) have been changed from `(*AzureFirewallsClientListAllPager)` to `(*runtime.Pager[AzureFirewallsClientListAllResponse])` +- Function `*InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces` return value(s) have been changed from `(*InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager)` to `(*runtime.Pager[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse])` +- Function `*BastionHostsClient.BeginUpdateTags` return value(s) have been changed from `(BastionHostsClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[BastionHostsClientUpdateTagsResponse], error)` +- Function `*AzureFirewallsClient.List` return value(s) have been changed from `(*AzureFirewallsClientListPager)` to `(*runtime.Pager[AzureFirewallsClientListResponse])` +- Function `NewVPNServerConfigurationsAssociatedWithVirtualWanClient` return value(s) have been changed from `(*VPNServerConfigurationsAssociatedWithVirtualWanClient)` to `(*VPNServerConfigurationsAssociatedWithVirtualWanClient, error)` +- Function `NewPeerExpressRouteCircuitConnectionsClient` return value(s) have been changed from `(*PeerExpressRouteCircuitConnectionsClient)` to `(*PeerExpressRouteCircuitConnectionsClient, error)` +- Function `*VirtualRouterPeeringsClient.List` return value(s) have been changed from `(*VirtualRouterPeeringsClientListPager)` to `(*runtime.Pager[VirtualRouterPeeringsClientListResponse])` +- Function `*HubVirtualNetworkConnectionsClient.List` return value(s) have been changed from `(*HubVirtualNetworkConnectionsClientListPager)` to `(*runtime.Pager[HubVirtualNetworkConnectionsClientListResponse])` +- Function `*VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage` return value(s) have been changed from `(VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse], error)` +- Function `*InboundSecurityRuleClient.BeginCreateOrUpdate` return value(s) have been changed from `(InboundSecurityRuleClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[InboundSecurityRuleClientCreateOrUpdateResponse], error)` +- Function `*ProfilesClient.BeginDelete` return value(s) have been changed from `(ProfilesClientDeletePollerResponse, error)` to `(*armruntime.Poller[ProfilesClientDeleteResponse], error)` +- Function `*LoadBalancerBackendAddressPoolsClient.BeginDelete` return value(s) have been changed from `(LoadBalancerBackendAddressPoolsClientDeletePollerResponse, error)` to `(*armruntime.Poller[LoadBalancerBackendAddressPoolsClientDeleteResponse], error)` +- Function `NewRoutingIntentClient` return value(s) have been changed from `(*RoutingIntentClient)` to `(*RoutingIntentClient, error)` +- Function `*SecurityPartnerProvidersClient.List` return value(s) have been changed from `(*SecurityPartnerProvidersClientListPager)` to `(*runtime.Pager[SecurityPartnerProvidersClientListResponse])` +- Function `*RouteTablesClient.ListAll` return value(s) have been changed from `(*RouteTablesClientListAllPager)` to `(*runtime.Pager[RouteTablesClientListAllResponse])` +- Function `NewApplicationGatewayPrivateEndpointConnectionsClient` return value(s) have been changed from `(*ApplicationGatewayPrivateEndpointConnectionsClient)` to `(*ApplicationGatewayPrivateEndpointConnectionsClient, error)` +- Function `NewExpressRoutePortsClient` return value(s) have been changed from `(*ExpressRoutePortsClient)` to `(*ExpressRoutePortsClient, error)` +- Function `*ServiceEndpointPoliciesClient.BeginCreateOrUpdate` return value(s) have been changed from `(ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ServiceEndpointPoliciesClientCreateOrUpdateResponse], error)` +- Function `*LoadBalancerLoadBalancingRulesClient.List` return value(s) have been changed from `(*LoadBalancerLoadBalancingRulesClientListPager)` to `(*runtime.Pager[LoadBalancerLoadBalancingRulesClientListResponse])` +- Function `*WatchersClient.List` parameter(s) have been changed from `(context.Context, string, *WatchersClientListOptions)` to `(string, *WatchersClientListOptions)` +- Function `*WatchersClient.List` return value(s) have been changed from `(WatchersClientListResponse, error)` to `(*runtime.Pager[WatchersClientListResponse])` +- Function `*VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey` return value(s) have been changed from `(VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse], error)` +- Function `*RoutingIntentClient.BeginCreateOrUpdate` return value(s) have been changed from `(RoutingIntentClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[RoutingIntentClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewaysClient.List` return value(s) have been changed from `(*VirtualNetworkGatewaysClientListPager)` to `(*runtime.Pager[VirtualNetworkGatewaysClientListResponse])` +- Function `NewAzureFirewallsClient` return value(s) have been changed from `(*AzureFirewallsClient)` to `(*AzureFirewallsClient, error)` +- Function `*FlowLogsClient.BeginDelete` return value(s) have been changed from `(FlowLogsClientDeletePollerResponse, error)` to `(*armruntime.Poller[FlowLogsClientDeleteResponse], error)` +- Function `*InterfacesClient.ListCloudServiceNetworkInterfaces` return value(s) have been changed from `(*InterfacesClientListCloudServiceNetworkInterfacesPager)` to `(*runtime.Pager[InterfacesClientListCloudServiceNetworkInterfacesResponse])` +- Function `*ConnectionMonitorsClient.BeginStart` return value(s) have been changed from `(ConnectionMonitorsClientStartPollerResponse, error)` to `(*armruntime.Poller[ConnectionMonitorsClientStartResponse], error)` +- Function `*ApplicationGatewayPrivateLinkResourcesClient.List` return value(s) have been changed from `(*ApplicationGatewayPrivateLinkResourcesClientListPager)` to `(*runtime.Pager[ApplicationGatewayPrivateLinkResourcesClientListResponse])` +- Function `*ApplicationSecurityGroupsClient.BeginCreateOrUpdate` return value(s) have been changed from `(ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[ApplicationSecurityGroupsClientCreateOrUpdateResponse], error)` +- Function `NewWebApplicationFirewallPoliciesClient` return value(s) have been changed from `(*WebApplicationFirewallPoliciesClient)` to `(*WebApplicationFirewallPoliciesClient, error)` +- Function `*LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate` return value(s) have been changed from `(LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse], error)` +- Function `*PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses` return value(s) have been changed from `(*PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager)` to `(*runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse])` +- Function `*VirtualNetworkTapsClient.ListByResourceGroup` return value(s) have been changed from `(*VirtualNetworkTapsClientListByResourceGroupPager)` to `(*runtime.Pager[VirtualNetworkTapsClientListByResourceGroupResponse])` +- Function `*InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces` return value(s) have been changed from `(*InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager)` to `(*runtime.Pager[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse])` +- Function `*VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse], error)` +- Function `*FlowLogsClient.BeginCreateOrUpdate` return value(s) have been changed from `(FlowLogsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[FlowLogsClientCreateOrUpdateResponse], error)` +- Function `NewInboundSecurityRuleClient` return value(s) have been changed from `(*InboundSecurityRuleClient)` to `(*InboundSecurityRuleClient, error)` +- Function `*VirtualNetworkGatewayConnectionsClient.BeginResetConnection` return value(s) have been changed from `(VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayConnectionsClientResetConnectionResponse], error)` +- Function `NewVirtualNetworksClient` return value(s) have been changed from `(*VirtualNetworksClient)` to `(*VirtualNetworksClient, error)` +- Function `*VirtualHubIPConfigurationClient.List` return value(s) have been changed from `(*VirtualHubIPConfigurationClientListPager)` to `(*runtime.Pager[VirtualHubIPConfigurationClientListResponse])` +- Function `NewAvailableDelegationsClient` return value(s) have been changed from `(*AvailableDelegationsClient)` to `(*AvailableDelegationsClient, error)` +- Function `NewExpressRouteGatewaysClient` return value(s) have been changed from `(*ExpressRouteGatewaysClient)` to `(*ExpressRouteGatewaysClient, error)` +- Function `*VirtualHubBgpConnectionClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualHubBgpConnectionClientCreateOrUpdateResponse], error)` +- Function `*ApplicationSecurityGroupsClient.ListAll` return value(s) have been changed from `(*ApplicationSecurityGroupsClientListAllPager)` to `(*runtime.Pager[ApplicationSecurityGroupsClientListAllResponse])` +- Function `*CustomIPPrefixesClient.BeginDelete` return value(s) have been changed from `(CustomIPPrefixesClientDeletePollerResponse, error)` to `(*armruntime.Poller[CustomIPPrefixesClientDeleteResponse], error)` +- Function `NewVirtualWansClient` return value(s) have been changed from `(*VirtualWansClient)` to `(*VirtualWansClient, error)` +- Function `NewVPNConnectionsClient` return value(s) have been changed from `(*VPNConnectionsClient)` to `(*VPNConnectionsClient, error)` +- Function `*RoutesClient.BeginCreateOrUpdate` return value(s) have been changed from `(RoutesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[RoutesClientCreateOrUpdateResponse], error)` +- Function `*ServiceEndpointPoliciesClient.ListByResourceGroup` return value(s) have been changed from `(*ServiceEndpointPoliciesClientListByResourceGroupPager)` to `(*runtime.Pager[ServiceEndpointPoliciesClientListByResourceGroupResponse])` +- Function `*DdosProtectionPlansClient.BeginDelete` return value(s) have been changed from `(DdosProtectionPlansClientDeletePollerResponse, error)` to `(*armruntime.Poller[DdosProtectionPlansClientDeleteResponse], error)` +- Function `*VirtualAppliancesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualAppliancesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualAppliancesClientCreateOrUpdateResponse], error)` +- Function `NewDscpConfigurationClient` return value(s) have been changed from `(*DscpConfigurationClient)` to `(*DscpConfigurationClient, error)` +- Function `*LoadBalancerNetworkInterfacesClient.List` return value(s) have been changed from `(*LoadBalancerNetworkInterfacesClientListPager)` to `(*runtime.Pager[LoadBalancerNetworkInterfacesClientListResponse])` +- Function `*BgpServiceCommunitiesClient.List` return value(s) have been changed from `(*BgpServiceCommunitiesClientListPager)` to `(*runtime.Pager[BgpServiceCommunitiesClientListResponse])` +- Function `*AvailableServiceAliasesClient.List` return value(s) have been changed from `(*AvailableServiceAliasesClientListPager)` to `(*runtime.Pager[AvailableServiceAliasesClientListResponse])` +- Function `NewVPNSiteLinkConnectionsClient` return value(s) have been changed from `(*VPNSiteLinkConnectionsClient)` to `(*VPNSiteLinkConnectionsClient, error)` +- Function `*ExpressRoutePortsClient.ListByResourceGroup` return value(s) have been changed from `(*ExpressRoutePortsClientListByResourceGroupPager)` to `(*runtime.Pager[ExpressRoutePortsClientListByResourceGroupResponse])` +- Function `*DefaultSecurityRulesClient.List` return value(s) have been changed from `(*DefaultSecurityRulesClientListPager)` to `(*runtime.Pager[DefaultSecurityRulesClientListResponse])` +- Function `*PacketCapturesClient.BeginCreate` return value(s) have been changed from `(PacketCapturesClientCreatePollerResponse, error)` to `(*armruntime.Poller[PacketCapturesClientCreateResponse], error)` +- Function `*WatchersClient.BeginListAvailableProviders` return value(s) have been changed from `(WatchersClientListAvailableProvidersPollerResponse, error)` to `(*armruntime.Poller[WatchersClientListAvailableProvidersResponse], error)` +- Function `NewServiceTagInformationClient` return value(s) have been changed from `(*ServiceTagInformationClient)` to `(*ServiceTagInformationClient, error)` +- Function `NewManagementClient` return value(s) have been changed from `(*ManagementClient)` to `(*ManagementClient, error)` +- Function `*VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse], error)` +- Function `*ApplicationGatewaysClient.List` return value(s) have been changed from `(*ApplicationGatewaysClientListPager)` to `(*runtime.Pager[ApplicationGatewaysClientListResponse])` +- Function `*ExpressRouteCircuitAuthorizationsClient.List` return value(s) have been changed from `(*ExpressRouteCircuitAuthorizationsClientListPager)` to `(*runtime.Pager[ExpressRouteCircuitAuthorizationsClientListResponse])` +- Function `*FirewallPolicyRuleCollectionGroupsClient.List` return value(s) have been changed from `(*FirewallPolicyRuleCollectionGroupsClientListPager)` to `(*runtime.Pager[FirewallPolicyRuleCollectionGroupsClientListResponse])` +- Function `*ConnectionMonitorsClient.BeginQuery` return value(s) have been changed from `(ConnectionMonitorsClientQueryPollerResponse, error)` to `(*armruntime.Poller[ConnectionMonitorsClientQueryResponse], error)` +- Function `*ConnectionMonitorsClient.BeginStop` return value(s) have been changed from `(ConnectionMonitorsClientStopPollerResponse, error)` to `(*armruntime.Poller[ConnectionMonitorsClientStopResponse], error)` +- Function `*VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse], error)` +- Function `*VirtualRouterPeeringsClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualRouterPeeringsClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualRouterPeeringsClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkPeeringsClient.BeginDelete` return value(s) have been changed from `(VirtualNetworkPeeringsClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkPeeringsClientDeleteResponse], error)` +- Function `*RoutesClient.List` return value(s) have been changed from `(*RoutesClientListPager)` to `(*runtime.Pager[RoutesClientListResponse])` +- Function `*VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes` return value(s) have been changed from `(VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse, error)` to `(*armruntime.Poller[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse], error)` +- Function `*PrivateLinkServicesClient.BeginCreateOrUpdate` return value(s) have been changed from `(PrivateLinkServicesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[PrivateLinkServicesClientCreateOrUpdateResponse], error)` +- Function `*VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes` return value(s) have been changed from `(VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse, error)` to `(*armruntime.Poller[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse], error)` +- Function `*InboundNatRulesClient.BeginDelete` return value(s) have been changed from `(InboundNatRulesClientDeletePollerResponse, error)` to `(*armruntime.Poller[InboundNatRulesClientDeleteResponse], error)` +- Function `NewVirtualRoutersClient` return value(s) have been changed from `(*VirtualRoutersClient)` to `(*VirtualRoutersClient, error)` +- Function `*AzureFirewallsClient.BeginUpdateTags` return value(s) have been changed from `(AzureFirewallsClientUpdateTagsPollerResponse, error)` to `(*armruntime.Poller[AzureFirewallsClientUpdateTagsResponse], error)` +- Function `*VPNGatewaysClient.BeginReset` return value(s) have been changed from `(VPNGatewaysClientResetPollerResponse, error)` to `(*armruntime.Poller[VPNGatewaysClientResetResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginReset` return value(s) have been changed from `(P2SVPNGatewaysClientResetPollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientResetResponse], error)` +- Function `NewVirtualApplianceSKUsClient` return value(s) have been changed from `(*VirtualApplianceSKUsClient)` to `(*VirtualApplianceSKUsClient, error)` +- Function `*InterfacesClient.BeginCreateOrUpdate` return value(s) have been changed from `(InterfacesClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[InterfacesClientCreateOrUpdateResponse], error)` +- Function `*WatchersClient.BeginDelete` return value(s) have been changed from `(WatchersClientDeletePollerResponse, error)` to `(*armruntime.Poller[WatchersClientDeleteResponse], error)` +- Function `*VirtualNetworksClient.List` return value(s) have been changed from `(*VirtualNetworksClientListPager)` to `(*runtime.Pager[VirtualNetworksClientListResponse])` +- Function `*VirtualWansClient.BeginCreateOrUpdate` return value(s) have been changed from `(VirtualWansClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[VirtualWansClientCreateOrUpdateResponse], error)` +- Function `*VPNSitesClient.ListByResourceGroup` return value(s) have been changed from `(*VPNSitesClientListByResourceGroupPager)` to `(*runtime.Pager[VPNSitesClientListByResourceGroupResponse])` +- Function `NewAvailableServiceAliasesClient` return value(s) have been changed from `(*AvailableServiceAliasesClient)` to `(*AvailableServiceAliasesClient, error)` +- Function `NewWatchersClient` return value(s) have been changed from `(*WatchersClient)` to `(*WatchersClient, error)` +- Function `NewLoadBalancerProbesClient` return value(s) have been changed from `(*LoadBalancerProbesClient)` to `(*LoadBalancerProbesClient, error)` +- Function `*NatRulesClient.BeginDelete` return value(s) have been changed from `(NatRulesClientDeletePollerResponse, error)` to `(*armruntime.Poller[NatRulesClientDeleteResponse], error)` +- Function `*P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth` return value(s) have been changed from `(P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse, error)` to `(*armruntime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse], error)` +- Function `*SubnetsClient.List` return value(s) have been changed from `(*SubnetsClientListPager)` to `(*runtime.Pager[SubnetsClientListResponse])` +- Function `*ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary` return value(s) have been changed from `(ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse, error)` to `(*armruntime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse], error)` +- Function `*ApplicationGatewaysClient.BeginDelete` return value(s) have been changed from `(ApplicationGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[ApplicationGatewaysClientDeleteResponse], error)` +- Function `*LoadBalancerFrontendIPConfigurationsClient.List` return value(s) have been changed from `(*LoadBalancerFrontendIPConfigurationsClientListPager)` to `(*runtime.Pager[LoadBalancerFrontendIPConfigurationsClientListResponse])` +- Function `NewExpressRoutePortsLocationsClient` return value(s) have been changed from `(*ExpressRoutePortsLocationsClient)` to `(*ExpressRoutePortsLocationsClient, error)` +- Function `*PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses` return value(s) have been changed from `(*PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager)` to `(*runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse])` +- Function `*LoadBalancersClient.ListAll` return value(s) have been changed from `(*LoadBalancersClientListAllPager)` to `(*runtime.Pager[LoadBalancersClientListAllResponse])` +- Function `*SecurityPartnerProvidersClient.BeginCreateOrUpdate` return value(s) have been changed from `(SecurityPartnerProvidersClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[SecurityPartnerProvidersClientCreateOrUpdateResponse], error)` +- Function `*VirtualWansClient.BeginDelete` return value(s) have been changed from `(VirtualWansClientDeletePollerResponse, error)` to `(*armruntime.Poller[VirtualWansClientDeleteResponse], error)` +- Function `*WatchersClient.BeginCheckConnectivity` return value(s) have been changed from `(WatchersClientCheckConnectivityPollerResponse, error)` to `(*armruntime.Poller[WatchersClientCheckConnectivityResponse], error)` +- Function `NewApplicationSecurityGroupsClient` return value(s) have been changed from `(*ApplicationSecurityGroupsClient)` to `(*ApplicationSecurityGroupsClient, error)` +- Function `*ExpressRouteGatewaysClient.BeginDelete` return value(s) have been changed from `(ExpressRouteGatewaysClientDeletePollerResponse, error)` to `(*armruntime.Poller[ExpressRouteGatewaysClientDeleteResponse], error)` +- Function `*VirtualHubsClient.List` return value(s) have been changed from `(*VirtualHubsClientListPager)` to `(*runtime.Pager[VirtualHubsClientListResponse])` +- Function `*LoadBalancersClient.BeginCreateOrUpdate` return value(s) have been changed from `(LoadBalancersClientCreateOrUpdatePollerResponse, error)` to `(*armruntime.Poller[LoadBalancersClientCreateOrUpdateResponse], error)` +- Function `*RouteFiltersClient.List` return value(s) have been changed from `(*RouteFiltersClientListPager)` to `(*runtime.Pager[RouteFiltersClientListResponse])` +- Function `NewVPNGatewaysClient` return value(s) have been changed from `(*VPNGatewaysClient)` to `(*VPNGatewaysClient, error)` +- Function `NewPrivateLinkServicesClient` return value(s) have been changed from `(*PrivateLinkServicesClient)` to `(*PrivateLinkServicesClient, error)` +- Function `*SecurityGroupsClient.List` return value(s) have been changed from `(*SecurityGroupsClientListPager)` to `(*runtime.Pager[SecurityGroupsClientListResponse])` +- Function `NewPacketCapturesClient` return value(s) have been changed from `(*PacketCapturesClient)` to `(*PacketCapturesClient, error)` +- Function `*InboundNatRulesClient.List` return value(s) have been changed from `(*InboundNatRulesClientListPager)` to `(*runtime.Pager[InboundNatRulesClientListResponse])` +- Function `*WebCategoriesClient.ListBySubscription` return value(s) have been changed from `(*WebCategoriesClientListBySubscriptionPager)` to `(*runtime.Pager[WebCategoriesClientListBySubscriptionResponse])` +- Function `NewPublicIPPrefixesClient` return value(s) have been changed from `(*PublicIPPrefixesClient)` to `(*PublicIPPrefixesClient, error)` +- Function `*RouteFilterRulesClient.ListByRouteFilter` return value(s) have been changed from `(*RouteFilterRulesClientListByRouteFilterPager)` to `(*runtime.Pager[RouteFilterRulesClientListByRouteFilterResponse])` +- Function `*RouteFiltersClient.ListByResourceGroup` return value(s) have been changed from `(*RouteFiltersClientListByResourceGroupPager)` to `(*runtime.Pager[RouteFiltersClientListByResourceGroupResponse])` +- Function `*RoutingIntentClient.BeginDelete` return value(s) have been changed from `(RoutingIntentClientDeletePollerResponse, error)` to `(*armruntime.Poller[RoutingIntentClientDeleteResponse], error)` +- Function `*SubnetsClient.BeginPrepareNetworkPolicies` return value(s) have been changed from `(SubnetsClientPrepareNetworkPoliciesPollerResponse, error)` to `(*armruntime.Poller[SubnetsClientPrepareNetworkPoliciesResponse], error)` +- Type of `BastionActiveSession.StartTime` has been changed from `map[string]interface{}` to `interface{}` +- Function `ApplicationGatewayLoadDistributionAlgorithm.ToPtr` has been removed +- Function `*ServiceEndpointPoliciesClientListByResourceGroupPager.Err` has been removed +- Function `*ApplicationGatewaysClientStartPoller.ResumeToken` has been removed +- Function `ApplicationGatewayCustomErrorStatusCode.ToPtr` has been removed +- Function `*VirtualHubIPConfigurationClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTablePoller.Done` has been removed +- Function `*PublicIPPrefixesClientListAllPager.PageResponse` has been removed +- Function `ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PublicIPAddressesClientDeletePoller.Done` has been removed +- Function `*VirtualNetworksClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `ServiceProviderProvisioningState.ToPtr` has been removed +- Function `*InterfaceTapConfigurationsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientDeletePoller.Done` has been removed +- Function `*VirtualHubBgpConnectionsClientListLearnedRoutesPoller.FinalResponse` has been removed +- Function `*RoutingIntentClientCreateOrUpdatePoller.Done` has been removed +- Function `*SecurityPartnerProvidersClientCreateOrUpdatePoller.Poll` has been removed +- Function `DdosCustomPoliciesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTablePoller.Done` has been removed +- Function `*RouteFiltersClientListPager.Err` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ManagementClientGetBastionShareableLinkPager.NextPage` has been removed +- Function `*VPNSitesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualAppliancesClientDeletePoller.Poll` has been removed +- Function `*VirtualWansClientDeletePoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitPeeringsClientDeletePoller.ResumeToken` has been removed +- Function `*PublicIPAddressesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*FirewallPoliciesClientListAllPager.PageResponse` has been removed +- Function `AzureFirewallNatRCActionType.ToPtr` has been removed +- Function `*PublicIPAddressesClientCreateOrUpdatePoller.Done` has been removed +- Function `*ExpressRouteGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller.Poll` has been removed +- Function `*P2SVPNGatewaysClientListByResourceGroupPager.Err` has been removed +- Function `*PrivateLinkServicesClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientListPager.PageResponse` has been removed +- Function `*ProfilesClientListPager.PageResponse` has been removed +- Function `*InboundSecurityRuleClientCreateOrUpdatePoller.Done` has been removed +- Function `PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ExpressRouteGatewaysClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*RoutesClientDeletePoller.FinalResponse` has been removed +- Function `*VPNConnectionsClientListByVPNGatewayPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientDeletePoller.ResumeToken` has been removed +- Function `*IPGroupsClientListPager.PageResponse` has been removed +- Function `*WatchersClientGetTroubleshootingPoller.Done` has been removed +- Function `*ExpressRouteCircuitsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*CustomIPPrefixesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*NatGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `VirtualHubIPConfigurationClientDeletePollerResponse.PollUntilDone` has been removed +- Function `LoadBalancersClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*HubRouteTablesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ServiceEndpointPoliciesClientDeletePoller.FinalResponse` has been removed +- Function `*RouteTablesClientListAllPager.PageResponse` has been removed +- Function `*SecurityPartnerProvidersClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualAppliancesClientListPager.PageResponse` has been removed +- Function `*ExpressRoutePortsClientDeletePollerResponse.Resume` has been removed +- Function `*VPNSiteLinksClientListByVPNSitePager.PageResponse` has been removed +- Function `*AvailablePrivateEndpointTypesClientListPager.Err` has been removed +- Function `*AzureFirewallsClientUpdateTagsPoller.Poll` has been removed +- Function `*VPNSiteLinksClientListByVPNSitePager.NextPage` has been removed +- Function `*PublicIPPrefixesClientDeletePoller.FinalResponse` has been removed +- Function `LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PacketCapturesClientDeletePoller.Poll` has been removed +- Function `*ApplicationGatewaysClientBackendHealthPollerResponse.Resume` has been removed +- Function `*PrivateEndpointsClientDeletePollerResponse.Resume` has been removed +- Function `ApplicationGatewaySSLPolicyName.ToPtr` has been removed +- Function `*OperationsClientListPager.PageResponse` has been removed +- Function `*NatRulesClientDeletePoller.Done` has been removed +- Function `VirtualAppliancesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `RoutingIntentClientDeletePollerResponse.PollUntilDone` has been removed +- Function `ProvisioningState.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller.Done` has been removed +- Function `NatGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `VirtualNetworkGatewaysClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubIPConfigurationClientListPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTablePoller.Poll` has been removed +- Function `*HubRouteTablesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ManagedRuleEnabledState.ToPtr` has been removed +- Function `*VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*NatGatewaysClientDeletePoller.Done` has been removed +- Function `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PeerExpressRouteCircuitConnectionsClientListPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*PublicIPAddressesClientDeletePoller.FinalResponse` has been removed +- Function `*VPNSitesClientDeletePoller.Done` has been removed +- Function `*ApplicationSecurityGroupsClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientStartPacketCapturePoller.Poll` has been removed +- Function `*VPNGatewaysClientStartPacketCapturePoller.ResumeToken` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientListPager.Err` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse.Resume` has been removed +- Function `*WatchersClientGetFlowLogStatusPoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*RoutesClientListPager.Err` has been removed +- Function `*SubnetsClientUnprepareNetworkPoliciesPoller.FinalResponse` has been removed +- Function `*ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller.ResumeToken` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ProfilesClientDeletePollerResponse.Resume` has been removed +- Function `*VPNConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `*WatchersClientCheckConnectivityPoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `RoutingIntentClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DscpConfigurationClientDeletePoller.Poll` has been removed +- Function `*InterfacesClientGetEffectiveRouteTablePoller.ResumeToken` has been removed +- Function `*PublicIPPrefixesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager.Err` has been removed +- Function `*HubRouteTablesClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VPNGatewaysClientDeletePoller.Poll` has been removed +- Function `*ApplicationGatewaysClientListAllPager.PageResponse` has been removed +- Function `P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse.PollUntilDone` has been removed +- Function `*VirtualRouterPeeringsClientListPager.NextPage` has been removed +- Function `*VPNServerConfigurationsClientListPager.NextPage` has been removed +- Function `SecurityProviderName.ToPtr` has been removed +- Function `*NatGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ApplicationGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `*FlowLogsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*BastionHostsClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*InterfaceTapConfigurationsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*AvailableDelegationsClientListPager.Err` has been removed +- Function `*HubVirtualNetworkConnectionsClientDeletePoller.Poll` has been removed +- Function `*VirtualHubsClientGetEffectiveVirtualHubRoutesPoller.Done` has been removed +- Function `BastionHostsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `RouteTablesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientListPager.NextPage` has been removed +- Function `*RouteFilterRulesClientListByRouteFilterPager.Err` has been removed +- Function `*WebApplicationFirewallPoliciesClientDeletePoller.Done` has been removed +- Function `VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse.PollUntilDone` has been removed +- Function `VPNSitesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkTapsClientListAllPager.PageResponse` has been removed +- Function `CustomIPPrefixesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `ExpressRouteCircuitSKUFamily.ToPtr` has been removed +- Function `*DscpConfigurationClientListPager.Err` has been removed +- Function `*ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ApplicationSecurityGroupsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*LoadBalancersClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `VirtualApplianceSitesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `TunnelConnectionStatus.ToPtr` has been removed +- Function `*ExpressRouteGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualApplianceSitesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VPNConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*FlowLogsClientListPager.NextPage` has been removed +- Function `*PacketCapturesClientGetStatusPoller.ResumeToken` has been removed +- Function `*ApplicationSecurityGroupsClientCreateOrUpdatePoller.Done` has been removed +- Function `*IPGroupsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCrossConnectionsClientListArpTablePoller.Poll` has been removed +- Function `*WatchersClientGetNextHopPoller.Poll` has been removed +- Function `*VirtualNetworkTapsClientListAllPager.Err` has been removed +- Function `*RouteFiltersClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*VirtualNetworksClientListPager.NextPage` has been removed +- Function `*DscpConfigurationClientListPager.PageResponse` has been removed +- Function `*RouteTablesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientListAllPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller.Poll` has been removed +- Function `*LoadBalancersClientDeletePoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientStopPacketCapturePoller.FinalResponse` has been removed +- Function `*PrivateLinkServicesClientListPrivateEndpointConnectionsPager.Err` has been removed +- Function `*DscpConfigurationClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*NatRulesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `DdosCustomPoliciesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*IPGroupsClientDeletePoller.Done` has been removed +- Function `*InterfacesClientListEffectiveNetworkSecurityGroupsPoller.Poll` has been removed +- Function `VPNLinkConnectionsClientResetConnectionPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller.FinalResponse` has been removed +- Function `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse.PollUntilDone` has been removed +- Function `VirtualNetworkTapsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller.Poll` has been removed +- Function `IPAllocationMethod.ToPtr` has been removed +- Function `*NatRulesClientListByVPNGatewayPager.NextPage` has been removed +- Function `*ExpressRouteGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*LoadBalancerLoadBalancingRulesClientListPager.PageResponse` has been removed +- Function `*InterfacesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `RouteNextHopType.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller.FinalResponse` has been removed +- Function `*VirtualHubsClientListByResourceGroupPager.NextPage` has been removed +- Function `*ExpressRouteCircuitConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `BgpPeerState.ToPtr` has been removed +- Function `*VPNSitesConfigurationClientDownloadPoller.ResumeToken` has been removed +- Function `*VirtualHubsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualRouterPeeringsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientGetBgpPeerStatusPoller.Poll` has been removed +- Function `DscpConfigurationClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ConnectionMonitorsClientStopPoller.ResumeToken` has been removed +- Function `*HubVirtualNetworkConnectionsClientListPager.NextPage` has been removed +- Function `*RouteFiltersClientDeletePoller.Poll` has been removed +- Function `*VirtualHubRouteTableV2SClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*OperationsClientListPager.Err` has been removed +- Function `*NatGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `*NatRulesClientListByVPNGatewayPager.Err` has been removed +- Function `*VirtualRouterPeeringsClientListPager.Err` has been removed +- Function `*LoadBalancerLoadBalancingRulesClientListPager.Err` has been removed +- Function `*VirtualHubRouteTableV2SClientDeletePoller.Done` has been removed +- Function `*WatchersClientSetFlowLogConfigurationPoller.Done` has been removed +- Function `*PrivateDNSZoneGroupsClientListPager.Err` has been removed +- Function `DeleteOptions.ToPtr` has been removed +- Function `*DdosCustomPoliciesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller.ResumeToken` has been removed +- Function `*PublicIPPrefixesClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller.ResumeToken` has been removed +- Function `*VPNServerConfigurationsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualNetworksClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*P2SVPNGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCrossConnectionsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*NatGatewaysClientDeletePoller.Poll` has been removed +- Function `ApplicationGatewayRedirectType.ToPtr` has been removed +- Function `*VPNGatewaysClientStopPacketCapturePoller.FinalResponse` has been removed +- Function `*RoutesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*PacketCapturesClientGetStatusPoller.Done` has been removed +- Function `*VPNServerConfigurationsClientDeletePoller.Done` has been removed +- Function `AssociationType.ToPtr` has been removed +- Function `*InterfacesClientListCloudServiceNetworkInterfacesPager.PageResponse` has been removed +- Function `*BastionHostsClientDeletePoller.Done` has been removed +- Function `*LoadBalancerFrontendIPConfigurationsClientListPager.NextPage` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager.PageResponse` has been removed +- Function `*InboundNatRulesClientDeletePollerResponse.Resume` has been removed +- Function `FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*AzureFirewallsClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientListBySubscriptionPager.NextPage` has been removed +- Function `*DdosCustomPoliciesClientDeletePollerResponse.Resume` has been removed +- Function `RouteTablesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller.Done` has been removed +- Function `*PacketCapturesClientDeletePollerResponse.Resume` has been removed +- Function `Origin.ToPtr` has been removed +- Function `*FirewallPoliciesClientListAllPager.NextPage` has been removed +- Function `*ExpressRouteCircuitPeeringsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller.ResumeToken` has been removed +- Function `*InterfaceIPConfigurationsClientListPager.PageResponse` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*PrivateEndpointsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `IPFlowProtocol.ToPtr` has been removed +- Function `*ConnectionMonitorsClientStopPoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientGenerateVPNProfilePoller.ResumeToken` has been removed +- Function `*SecurityPartnerProvidersClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PacketCapturesClientDeletePoller.ResumeToken` has been removed +- Function `*VPNGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `*PublicIPAddressesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitsClientListArpTablePoller.Poll` has been removed +- Function `*AvailableResourceGroupDelegationsClientListPager.NextPage` has been removed +- Function `*ExpressRoutePortsLocationsClientListPager.Err` has been removed +- Function `*ApplicationGatewaysClientStopPoller.Poll` has been removed +- Function `FirewallPolicyFilterRuleCollectionActionType.ToPtr` has been removed +- Function `*ApplicationGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `LoadBalancersClientSwapPublicIPAddressesPollerResponse.PollUntilDone` has been removed +- Function `*VPNGatewaysClientDeletePoller.Done` has been removed +- Function `*RouteFilterRulesClientDeletePoller.ResumeToken` has been removed +- Function `*BastionHostsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitsClientCreateOrUpdatePoller.Poll` has been removed +- Function `ExtendedLocationTypes.ToPtr` has been removed +- Function `*ProfilesClientListPager.Err` has been removed +- Function `*SecurityPartnerProvidersClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*AzureFirewallsClientListAllPager.Err` has been removed +- Function `*AvailableServiceAliasesClientListPager.Err` has been removed +- Function `*ExpressRouteServiceProvidersClientListPager.PageResponse` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientDeletePoller.Done` has been removed +- Function `*PublicIPAddressesClientDeletePoller.ResumeToken` has been removed +- Function `ExpressRoutePortsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PrivateDNSZoneGroupsClientDeletePoller.Poll` has been removed +- Function `*VPNLinkConnectionsClientGetIkeSasPoller.Done` has been removed +- Function `*HubVirtualNetworkConnectionsClientListPager.Err` has been removed +- Function `*P2SVPNGatewaysClientResetPoller.Poll` has been removed +- Function `*VPNGatewaysClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*VirtualNetworksClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `*IPAllocationsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*PacketCapturesClientStopPoller.Done` has been removed +- Function `ConnectionMonitorsClientStopPollerResponse.PollUntilDone` has been removed +- Function `VirtualRoutersClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller.Poll` has been removed +- Function `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse.PollUntilDone` has been removed +- Function `*FirewallPoliciesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualNetworksClientListUsagePager.PageResponse` has been removed +- Function `*ConnectionMonitorsClientDeletePoller.Done` has been removed +- Function `*SubnetsClientUnprepareNetworkPoliciesPoller.Done` has been removed +- Function `ProtocolType.ToPtr` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller.Done` has been removed +- Function `*WatchersClientGetNetworkConfigurationDiagnosticPoller.Poll` has been removed +- Function `*VirtualHubBgpConnectionsClientListPager.PageResponse` has been removed +- Function `VirtualHubRouteTableV2SClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*RouteTablesClientDeletePoller.ResumeToken` has been removed +- Function `*RouteTablesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*NatGatewaysClientListPager.NextPage` has been removed +- Function `ExpressRouteGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientGetVMSecurityRulesPollerResponse.Resume` has been removed +- Function `*P2SVPNGatewaysClientUpdateTagsPoller.Done` has been removed +- Function `*RouteFiltersClientListPager.PageResponse` has been removed +- Function `*DefaultSecurityRulesClientListPager.NextPage` has been removed +- Function `*ApplicationGatewaysClientStartPoller.FinalResponse` has been removed +- Function `HTTPConfigurationMethod.ToPtr` has been removed +- Function `*VirtualRouterPeeringsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*WatchersClientVerifyIPFlowPoller.FinalResponse` has been removed +- Function `*ApplicationGatewaysClientDeletePoller.Done` has been removed +- Function `*VirtualWansClientCreateOrUpdatePoller.Done` has been removed +- Function `*ServiceTagInformationClientListPager.NextPage` has been removed +- Function `PublicIPPrefixSKUTier.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientDeletePoller.Poll` has been removed +- Function `VirtualNetworkEncryptionEnforcement.ToPtr` has been removed +- Function `*BastionHostsClientListPager.NextPage` has been removed +- Function `*AzureFirewallsClientCreateOrUpdatePoller.Done` has been removed +- Function `VPNAuthenticationType.ToPtr` has been removed +- Function `*ApplicationGatewaysClientListPager.Err` has been removed +- Function `*ExpressRouteCircuitsClientDeletePoller.Done` has been removed +- Function `*VirtualApplianceSitesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*NatRulesClientDeletePoller.ResumeToken` has been removed +- Function `P2SVPNGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*FirewallPoliciesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualRouterPeeringsClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `*SecurityGroupsClientListPager.NextPage` has been removed +- Function `*VirtualNetworkPeeringsClientListPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller.FinalResponse` has been removed +- Function `*HubVirtualNetworkConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse.Resume` has been removed +- Function `*LoadBalancerNetworkInterfacesClientListPager.Err` has been removed +- Function `PcError.ToPtr` has been removed +- Function `WebApplicationFirewallOperator.ToPtr` has been removed +- Function `*HubVirtualNetworkConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `*RouteFiltersClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNGatewaysClientResetPollerResponse.Resume` has been removed +- Function `*VPNLinkConnectionsClientResetConnectionPoller.FinalResponse` has been removed +- Function `RoutesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VPNLinkConnectionsClientResetConnectionPoller.Done` has been removed +- Function `*VirtualApplianceSitesClientDeletePoller.Poll` has been removed +- Function `*SecurityRulesClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientResetPollerResponse.Resume` has been removed +- Function `*PrivateEndpointsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*DdosProtectionPlansClientDeletePoller.Done` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller.FinalResponse` has been removed +- Function `ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*RouteTablesClientCreateOrUpdatePoller.Done` has been removed +- Function `*ExpressRouteCircuitsClientListAllPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientListPager.PageResponse` has been removed +- Function `*BastionHostsClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientStartPacketCapturePollerResponse.Resume` has been removed +- Function `*IPAllocationsClientDeletePoller.Poll` has been removed +- Function `IkeEncryption.ToPtr` has been removed +- Function `*LocalNetworkGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*AvailableServiceAliasesClientListByResourceGroupPager.NextPage` has been removed +- Function `*VirtualRouterPeeringsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGenerateVPNProfilePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller.FinalResponse` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientListPager.PageResponse` has been removed +- Function `ManagementClientPutBastionShareableLinkPollerResponse.PollUntilDone` has been removed +- Function `SecurityPartnerProviderConnectionStatus.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientListPager.PageResponse` has been removed +- Function `*WebApplicationFirewallPoliciesClientListAllPager.NextPage` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller.Done` has been removed +- Function `FirewallPolicyRuleCollectionType.ToPtr` has been removed +- Function `P2SVPNGatewaysClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubIPConfigurationClientDeletePoller.FinalResponse` has been removed +- Function `*RouteFiltersClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*NatRulesClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller.Done` has been removed +- Function `*ApplicationGatewaysClientBackendHealthOnDemandPoller.Done` has been removed +- Function `*AzureFirewallsClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*LocalNetworkGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `FirewallPolicyRuleApplicationProtocolType.ToPtr` has been removed +- Function `*SecurityGroupsClientListAllPager.Err` has been removed +- Function `*PrivateLinkServicesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse.Resume` has been removed +- Function `*RouteFiltersClientDeletePoller.ResumeToken` has been removed +- Function `EvaluationState.ToPtr` has been removed +- Function `*ServiceEndpointPoliciesClientListPager.Err` has been removed +- Function `*DscpConfigurationClientListAllPager.NextPage` has been removed +- Function `*VirtualRouterPeeringsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*WatchersClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse.Resume` has been removed +- Function `VirtualApplianceSitesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse.Resume` has been removed +- Function `ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*PublicIPPrefixesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientListPager.Err` has been removed +- Function `VerbosityLevel.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientGenerateVPNProfilePoller.Done` has been removed +- Function `*InterfaceTapConfigurationsClientListPager.PageResponse` has been removed +- Function `PublicIPPrefixSKUName.ToPtr` has been removed +- Function `*PublicIPPrefixesClientListAllPager.NextPage` has been removed +- Function `*PrivateLinkServicesClientDeletePollerResponse.Resume` has been removed +- Function `*P2SVPNGatewaysClientResetPoller.FinalResponse` has been removed +- Function `*FlowLogsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientStopPacketCapturePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller.Done` has been removed +- Function `*VirtualApplianceSitesClientListPager.PageResponse` has been removed +- Function `*BastionHostsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientStopPacketCapturePoller.ResumeToken` has been removed +- Function `SecurityPartnerProvidersClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*LocalNetworkGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `VPNGatewaysClientStartPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager.Err` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller.FinalResponse` has been removed +- Function `BastionHostsClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse.PollUntilDone` has been removed +- Function `VPNGatewaysClientStopPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworksClientListAllPager.NextPage` has been removed +- Function `*SecurityGroupsClientDeletePoller.FinalResponse` has been removed +- Function `*WatchersClientListAvailableProvidersPoller.Done` has been removed +- Function `*VPNLinkConnectionsClientGetIkeSasPoller.FinalResponse` has been removed +- Function `*LoadBalancerProbesClientListPager.PageResponse` has been removed +- Function `ApplicationGatewaysClientStartPollerResponse.PollUntilDone` has been removed +- Function `*VPNGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*InterfaceTapConfigurationsClientListPager.Err` has been removed +- Function `*LoadBalancersClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ServiceEndpointPoliciesClientCreateOrUpdatePoller.Done` has been removed +- Function `*NatGatewaysClientListAllPager.PageResponse` has been removed +- Function `VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `VirtualNetworkGatewaysClientStopPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager.NextPage` has been removed +- Function `*WatchersClientGetAzureReachabilityReportPollerResponse.Resume` has been removed +- Function `ExpressRouteLinkMacSecCipher.ToPtr` has been removed +- Function `*IPGroupsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller.FinalResponse` has been removed +- Function `*VPNGatewaysClientResetPoller.Done` has been removed +- Function `SecurityRuleDirection.ToPtr` has been removed +- Function `PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientDeletePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*ServiceEndpointPoliciesClientListPager.NextPage` has been removed +- Function `*ApplicationGatewaysClientStopPoller.Done` has been removed +- Function `*ApplicationSecurityGroupsClientDeletePoller.Done` has been removed +- Function `*VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller.FinalResponse` has been removed +- Function `*LoadBalancersClientListPager.Err` has been removed +- Function `*FlowLogsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkPeeringsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualWansClientListByResourceGroupPager.PageResponse` has been removed +- Function `*BastionHostsClientListByResourceGroupPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientStartPollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientListConnectionsPager.NextPage` has been removed +- Function `*InterfacesClientListAllPager.NextPage` has been removed +- Function `*WatchersClientGetAzureReachabilityReportPoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller.Done` has been removed +- Function `WatchersClientListAvailableProvidersPollerResponse.PollUntilDone` has been removed +- Function `*SecurityRulesClientDeletePoller.Poll` has been removed +- Function `*AvailableEndpointServicesClientListPager.PageResponse` has been removed +- Function `*AvailablePrivateEndpointTypesClientListPager.PageResponse` has been removed +- Function `*InterfacesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualRoutersClientListByResourceGroupPager.Err` has been removed +- Function `*FirewallPoliciesClientListPager.PageResponse` has been removed +- Function `*VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller.Done` has been removed +- Function `*RouteFiltersClientDeletePoller.FinalResponse` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse.Resume` has been removed +- Function `VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PacketCapturesClientCreatePoller.Poll` has been removed +- Function `*ManagementClientDeleteBastionShareableLinkPollerResponse.Resume` has been removed +- Function `RoutingState.ToPtr` has been removed +- Function `*RoutesClientDeletePoller.Poll` has been removed +- Function `*ServiceEndpointPoliciesClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkGatewaysClientStartPacketCapturePoller.FinalResponse` has been removed +- Function `WatchersClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VPNGatewaysClientStopPacketCapturePollerResponse.Resume` has been removed +- Function `P2SVPNGatewaysClientResetPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubRouteTableV2SClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ConnectionMonitorsClientDeletePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientListPager.NextPage` has been removed +- Function `*VirtualNetworksClientDeletePoller.ResumeToken` has been removed +- Function `LoadBalancersClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*FlowLogsClientCreateOrUpdatePoller.Done` has been removed +- Function `InboundSecurityRuleClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientGetTroubleshootingPoller.Poll` has been removed +- Function `*ApplicationGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager.PageResponse` has been removed +- Function `ProfilesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*AvailablePrivateEndpointTypesClientListByResourceGroupPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse.Resume` has been removed +- Function `*VirtualRoutersClientDeletePoller.Done` has been removed +- Function `*VPNConnectionsClientDeletePoller.Done` has been removed +- Function `*VPNConnectionsClientListByVPNGatewayPager.PageResponse` has been removed +- Function `*ExpressRouteCrossConnectionsClientListPager.NextPage` has been removed +- Function `*SecurityRulesClientListPager.PageResponse` has been removed +- Function `*PrivateEndpointsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PrivateEndpointsClientListPager.Err` has been removed +- Function `*P2SVPNGatewaysClientGenerateVPNProfilePollerResponse.Resume` has been removed +- Function `*VPNConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*SecurityGroupsClientDeletePoller.Done` has been removed +- Function `*ApplicationGatewaysClientListAllPager.Err` has been removed +- Function `VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListPager.Err` has been removed +- Function `*InboundSecurityRuleClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `VirtualNetworkPeeringLevel.ToPtr` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientDeletePoller.ResumeToken` has been removed +- Function `*ApplicationGatewaysClientStartPollerResponse.Resume` has been removed +- Function `IssueType.ToPtr` has been removed +- Function `*VirtualWansClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualHubBgpConnectionClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*FlowLogsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*AzureFirewallsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualWansClientListPager.PageResponse` has been removed +- Function `*WebCategoriesClientListBySubscriptionPager.PageResponse` has been removed +- Function `AzureFirewallsClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*VPNConnectionsClientStartPacketCapturePoller.FinalResponse` has been removed +- Function `*PrivateDNSZoneGroupsClientListPager.PageResponse` has been removed +- Function `*VirtualApplianceSKUsClientListPager.PageResponse` has been removed +- Function `*PeerExpressRouteCircuitConnectionsClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager.PageResponse` has been removed +- Function `*WebApplicationFirewallPoliciesClientListAllPager.PageResponse` has been removed +- Function `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRoutePortsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `DdosCustomPolicyProtocol.ToPtr` has been removed +- Function `*VirtualRoutersClientCreateOrUpdatePoller.Poll` has been removed +- Function `*NatGatewaysClientListAllPager.Err` has been removed +- Function `*ExpressRouteCrossConnectionsClientListArpTablePoller.FinalResponse` has been removed +- Function `*VirtualHubBgpConnectionClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientDeletePoller.ResumeToken` has been removed +- Function `InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VPNServerConfigurationsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ManagementClientGetActiveSessionsPoller.Done` has been removed +- Function `SecurityRulesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `FirewallPoliciesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*LoadBalancersClientListAllPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientGetBgpPeerStatusPoller.FinalResponse` has been removed +- Function `*ExpressRouteConnectionsClientDeletePoller.Done` has been removed +- Function `*AzureFirewallsClientDeletePoller.Done` has been removed +- Function `ApplicationGatewayBackendHealthServerHealth.ToPtr` has been removed +- Function `*RouteFiltersClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualApplianceSitesClientDeletePoller.ResumeToken` has been removed +- Function `ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `VPNSitesConfigurationClientDownloadPollerResponse.PollUntilDone` has been removed +- Function `*IPAllocationsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*ExpressRouteCircuitsClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientUpdateTagsPoller.Poll` has been removed +- Function `*ManagementClientDisconnectActiveSessionsPager.Err` has been removed +- Function `*RouteFiltersClientListPager.NextPage` has been removed +- Function `*DscpConfigurationClientListAllPager.Err` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller.Done` has been removed +- Function `ExpressRoutePeeringType.ToPtr` has been removed +- Function `*RouteFilterRulesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*LoadBalancersClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkTapsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `ExpressRouteLinkConnectorType.ToPtr` has been removed +- Function `*RoutingIntentClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*PrivateEndpointsClientCreateOrUpdatePoller.Done` has been removed +- Function `VirtualNetworkGatewaysClientResetPollerResponse.PollUntilDone` has been removed +- Function `*VPNSitesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualAppliancesClientListByResourceGroupPager.NextPage` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientDeletePoller.Poll` has been removed +- Function `CustomIPPrefixesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ManagementClientGetActiveSessionsPollerResponse.PollUntilDone` has been removed +- Function `*InterfaceTapConfigurationsClientListPager.NextPage` has been removed +- Function `*VPNSitesConfigurationClientDownloadPoller.Poll` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager.NextPage` has been removed +- Function `*ExpressRouteCircuitPeeringsClientDeletePoller.FinalResponse` has been removed +- Function `EndpointType.ToPtr` has been removed +- Function `*NatRulesClientListByVPNGatewayPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientResetPoller.Poll` has been removed +- Function `*VirtualHubBgpConnectionsClientListLearnedRoutesPoller.ResumeToken` has been removed +- Function `VPNSitesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VPNLinkConnectionsClientGetIkeSasPoller.Poll` has been removed +- Function `ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.ToPtr` has been removed +- Function `*DdosProtectionPlansClientCreateOrUpdatePoller.Poll` has been removed +- Function `*PrivateEndpointsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualApplianceSitesClientDeletePoller.FinalResponse` has been removed +- Function `*ProfilesClientDeletePoller.FinalResponse` has been removed +- Function `*PublicIPAddressesClientListCloudServicePublicIPAddressesPager.NextPage` has been removed +- Function `*ServiceEndpointPoliciesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ConnectionMonitorsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientGetNetworkConfigurationDiagnosticPoller.FinalResponse` has been removed +- Function `*ManagementClientDeleteBastionShareableLinkPoller.Poll` has been removed +- Function `*NatRulesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ServiceEndpointPoliciesClientListByResourceGroupPager.NextPage` has been removed +- Function `*VPNServerConfigurationsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller.Poll` has been removed +- Function `PublicIPAddressesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitsClientListArpTablePoller.ResumeToken` has been removed +- Function `*AzureFirewallsClientListPager.NextPage` has been removed +- Function `*VPNLinkConnectionsClientResetConnectionPollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `ConnectionMonitorsClientQueryPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitPeeringsClientDeletePoller.Done` has been removed +- Function `*VirtualWansClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ExpressRouteCircuitsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse.Resume` has been removed +- Function `*PublicIPAddressesClientListPager.Err` has been removed +- Function `*ApplicationGatewaysClientBackendHealthPoller.Poll` has been removed +- Function `PacketCapturesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ServiceEndpointPoliciesClientDeletePollerResponse.Resume` has been removed +- Function `*ManagementClientDeleteBastionShareableLinkPoller.Done` has been removed +- Function `*VirtualNetworkTapsClientListByResourceGroupPager.Err` has been removed +- Function `*WebApplicationFirewallPoliciesClientListAllPager.Err` has been removed +- Function `LocalNetworkGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*AzureFirewallsClientCreateOrUpdatePoller.Poll` has been removed +- Function `InterfacesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*SubnetsClientUnprepareNetworkPoliciesPoller.ResumeToken` has been removed +- Function `*PrivateEndpointsClientListBySubscriptionPager.Err` has been removed +- Function `*IPGroupsClientDeletePollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller.Done` has been removed +- Function `SubnetsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `FlowLogFormatType.ToPtr` has been removed +- Function `*ManagementClientGetActiveSessionsPager.PageResponse` has been removed +- Function `*VPNSitesClientListByResourceGroupPager.Err` has been removed +- Function `VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*CustomIPPrefixesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCrossConnectionsClientListByResourceGroupPager.NextPage` has been removed +- Function `*ExpressRouteCircuitPeeringsClientListPager.NextPage` has been removed +- Function `ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancersClientListPager.PageResponse` has been removed +- Function `FirewallPoliciesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*HubRouteTablesClientDeletePoller.ResumeToken` has been removed +- Function `*PrivateEndpointsClientListPager.NextPage` has been removed +- Function `*VirtualHubBgpConnectionsClientListLearnedRoutesPoller.Done` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller.Poll` has been removed +- Function `*VirtualRoutersClientListPager.PageResponse` has been removed +- Function `*AzureFirewallsClientDeletePollerResponse.Resume` has been removed +- Function `LoadDistribution.ToPtr` has been removed +- Function `*PublicIPAddressesClientListAllPager.NextPage` has been removed +- Function `*ManagementClientGetActiveSessionsPager.NextPage` has been removed +- Function `ExpressRouteConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitPeeringsClientListPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientStartPacketCapturePollerResponse.Resume` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager.PageResponse` has been removed +- Function `*LoadBalancersClientSwapPublicIPAddressesPoller.FinalResponse` has been removed +- Function `SecurityGroupsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ExpressRouteCircuitAuthorizationsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `AzureFirewallsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VPNSitesClientDeletePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientListByResourceGroupPager.PageResponse` has been removed +- Function `VPNServerConfigurationsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*HubRouteTablesClientListPager.PageResponse` has been removed +- Function `*VPNServerConfigurationsClientListPager.PageResponse` has been removed +- Function `*DdosCustomPoliciesClientDeletePoller.Done` has been removed +- Function `*VPNLinkConnectionsClientListByVPNConnectionPager.NextPage` has been removed +- Function `*VirtualNetworkTapsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualNetworksClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualRouterPeeringsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*RoutesClientDeletePoller.Done` has been removed +- Function `*OperationsClientListPager.NextPage` has been removed +- Function `*NatGatewaysClientListPager.Err` has been removed +- Function `DdosProtectionPlansClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*SecurityRulesClientListPager.Err` has been removed +- Function `*DefaultSecurityRulesClientListPager.PageResponse` has been removed +- Function `*NatGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitConnectionsClientListPager.Err` has been removed +- Function `*VirtualApplianceSKUsClientListPager.Err` has been removed +- Function `*DscpConfigurationClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller.ResumeToken` has been removed +- Function `Severity.ToPtr` has been removed +- Function `*AzureFirewallsClientListPager.PageResponse` has been removed +- Function `ApplicationGatewayCookieBasedAffinity.ToPtr` has been removed +- Function `*P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller.Done` has been removed +- Function `*AvailablePrivateEndpointTypesClientListPager.NextPage` has been removed +- Function `*ApplicationSecurityGroupsClientListPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller.Done` has been removed +- Function `*WebApplicationFirewallPoliciesClientListPager.Err` has been removed +- Function `*ManagementClientDeleteBastionShareableLinkPoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientDeletePoller.Poll` has been removed +- Function `*RouteFilterRulesClientDeletePollerResponse.Resume` has been removed +- Function `*HubRouteTablesClientDeletePoller.FinalResponse` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientDeletePollerResponse.Resume` has been removed +- Function `*PacketCapturesClientStopPollerResponse.Resume` has been removed +- Function `*InterfacesClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitConnectionsClientDeletePoller.Done` has been removed +- Function `ExpressRouteCircuitPeeringState.ToPtr` has been removed +- Function `*WatchersClientDeletePoller.ResumeToken` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse.Resume` has been removed +- Function `*RoutingIntentClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkPeeringsClientListPager.Err` has been removed +- Function `*InterfaceTapConfigurationsClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCircuitConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualRoutersClientCreateOrUpdatePoller.Done` has been removed +- Function `*LoadBalancersClientSwapPublicIPAddressesPollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse.Resume` has been removed +- Function `*VirtualApplianceSitesClientDeletePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller.FinalResponse` has been removed +- Function `*WatchersClientCheckConnectivityPoller.ResumeToken` has been removed +- Function `*NatGatewaysClientListAllPager.NextPage` has been removed +- Function `*PrivateLinkServicesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse.Resume` has been removed +- Function `*VPNSitesClientListByResourceGroupPager.PageResponse` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualWansClientDeletePoller.FinalResponse` has been removed +- Function `ApplicationGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*InterfaceTapConfigurationsClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse.Resume` has been removed +- Function `*VirtualRoutersClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*HubVirtualNetworkConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `BastionHostsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller.FinalResponse` has been removed +- Function `*WatchersClientGetNextHopPoller.FinalResponse` has been removed +- Function `*RoutingIntentClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualHubsClientDeletePoller.FinalResponse` has been removed +- Function `*PrivateLinkServicesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ManagementClientPutBastionShareableLinkPoller.Poll` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager.PageResponse` has been removed +- Function `HubVirtualNetworkConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse.Resume` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller.FinalResponse` has been removed +- Function `RouteFiltersClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*AvailableServiceAliasesClientListByResourceGroupPager.PageResponse` has been removed +- Function `*SecurityRulesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*LocalNetworkGatewaysClientListPager.Err` has been removed +- Function `*VirtualHubRouteTableV2SClientListPager.Err` has been removed +- Function `*SubnetsClientUnprepareNetworkPoliciesPoller.Poll` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller.ResumeToken` has been removed +- Function `*FirewallPoliciesClientDeletePoller.Done` has been removed +- Function `*CustomIPPrefixesClientDeletePoller.Done` has been removed +- Function `*PublicIPAddressesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTablePollerResponse.Resume` has been removed +- Function `*WatchersClientGetTroubleshootingResultPollerResponse.Resume` has been removed +- Function `*VPNSitesClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTableSummaryPoller.Poll` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager.NextPage` has been removed +- Function `ExpressRoutePeeringState.ToPtr` has been removed +- Function `*VirtualHubsClientGetEffectiveVirtualHubRoutesPoller.Poll` has been removed +- Function `AuthorizationUseStatus.ToPtr` has been removed +- Function `SubnetsClientUnprepareNetworkPoliciesPollerResponse.PollUntilDone` has been removed +- Function `*AvailableEndpointServicesClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientListBySubscriptionPager.PageResponse` has been removed +- Function `*SecurityPartnerProvidersClientCreateOrUpdatePoller.Done` has been removed +- Function `*ExpressRouteCircuitsClientDeletePollerResponse.Resume` has been removed +- Function `*SubnetsClientDeletePollerResponse.Resume` has been removed +- Function `*NatRulesClientCreateOrUpdatePoller.Done` has been removed +- Function `*WatchersClientGetAzureReachabilityReportPoller.FinalResponse` has been removed +- Function `*VirtualNetworkPeeringsClientDeletePoller.Done` has been removed +- Function `*InterfacesClientGetEffectiveRouteTablePollerResponse.Resume` has been removed +- Function `*HubRouteTablesClientDeletePollerResponse.Resume` has been removed +- Function `*CustomIPPrefixesClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller.ResumeToken` has been removed +- Function `*ExpressRouteGatewaysClientUpdateTagsPoller.Done` has been removed +- Function `*P2SVPNGatewaysClientResetPoller.ResumeToken` has been removed +- Function `*PublicIPAddressesClientListAllPager.Err` has been removed +- Function `*ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller.Done` has been removed +- Function `*InterfaceTapConfigurationsClientDeletePoller.FinalResponse` has been removed +- Function `AzureFirewallApplicationRuleProtocolType.ToPtr` has been removed +- Function `ExpressRouteLinkMacSecSciState.ToPtr` has been removed +- Function `*SecurityPartnerProvidersClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientDeletePoller.Done` has been removed +- Function `*ConnectionMonitorsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualApplianceSitesClientListPager.Err` has been removed +- Function `*VirtualNetworkTapsClientCreateOrUpdatePoller.Done` has been removed +- Function `*WatchersClientGetTroubleshootingResultPoller.Done` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller.Poll` has been removed +- Function `SingleQueryResultMode.ToPtr` has been removed +- Function `*WatchersClientSetFlowLogConfigurationPoller.Poll` has been removed +- Function `*VirtualHubRouteTableV2SClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteGatewaysClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager.PageResponse` has been removed +- Function `*RouteTablesClientListAllPager.Err` has been removed +- Function `*ExpressRoutePortsClientListByResourceGroupPager.NextPage` has been removed +- Function `*NatGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse.PollUntilDone` has been removed +- Function `*VPNServerConfigurationsClientDeletePollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller.ResumeToken` has been removed +- Function `*PublicIPAddressesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteGatewaysClientDeletePoller.Done` has been removed +- Function `*VirtualNetworksClientDeletePoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `*RouteFiltersClientCreateOrUpdatePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientGenerateVPNProfilePoller.Poll` has been removed +- Function `WatchersClientCheckConnectivityPollerResponse.PollUntilDone` has been removed +- Function `VPNType.ToPtr` has been removed +- Function `*SecurityGroupsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*DscpConfigurationClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*LoadBalancersClientListInboundNatRulePortMappingsPollerResponse.Resume` has been removed +- Function `*ManagementClientDisconnectActiveSessionsPager.PageResponse` has been removed +- Function `ApplicationGatewaysClientStopPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientGenerateVPNProfilePoller.FinalResponse` has been removed +- Function `*CustomIPPrefixesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VPNSiteLinksClientListByVPNSitePager.Err` has been removed +- Function `*PublicIPAddressesClientListPager.NextPage` has been removed +- Function `SubnetsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse.Resume` has been removed +- Function `*PacketCapturesClientCreatePoller.FinalResponse` has been removed +- Function `*SecurityPartnerProvidersClientListPager.PageResponse` has been removed +- Function `*PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager.Err` has been removed +- Function `*ServiceTagInformationClientListPager.Err` has been removed +- Function `*LoadBalancersClientDeletePollerResponse.Resume` has been removed +- Function `VirtualNetworkPeeringState.ToPtr` has been removed +- Function `PrivateDNSZoneGroupsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*InterfaceTapConfigurationsClientDeletePoller.ResumeToken` has been removed +- Function `*NatRulesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*LoadBalancerFrontendIPConfigurationsClientListPager.Err` has been removed +- Function `*VPNConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualHubsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworksClientListPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTablePoller.FinalResponse` has been removed +- Function `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse.PollUntilDone` has been removed +- Function `*SubnetsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller.Done` has been removed +- Function `*VirtualRouterPeeringsClientDeletePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientResetPoller.Done` has been removed +- Function `*VPNGatewaysClientListByResourceGroupPager.NextPage` has been removed +- Function `FirewallPolicyIntrusionDetectionStateType.ToPtr` has been removed +- Function `*AvailableResourceGroupDelegationsClientListPager.Err` has been removed +- Function `ApplicationGatewaySSLCipherSuite.ToPtr` has been removed +- Function `*VirtualHubRouteTableV2SClientDeletePollerResponse.Resume` has been removed +- Function `*ManagementClientPutBastionShareableLinkPoller.ResumeToken` has been removed +- Function `ResourceIdentityType.ToPtr` has been removed +- Function `*PublicIPAddressesClientListAllPager.PageResponse` has been removed +- Function `*WatchersClientCheckConnectivityPollerResponse.Resume` has been removed +- Function `*VirtualNetworkPeeringsClientDeletePoller.ResumeToken` has been removed +- Function `*HubRouteTablesClientDeletePoller.Poll` has been removed +- Function `*InterfaceTapConfigurationsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VPNGatewaysClientStartPacketCapturePoller.Done` has been removed +- Function `*LoadBalancersClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ManagementClientGetActiveSessionsPollerResponse.Resume` has been removed +- Function `*SubnetsClientUnprepareNetworkPoliciesPollerResponse.Resume` has been removed +- Function `*SubnetsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*CustomIPPrefixesClientListPager.NextPage` has been removed +- Function `*PacketCapturesClientStopPoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*IPGroupsClientCreateOrUpdatePoller.Poll` has been removed +- Function `InboundNatRulesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*AzureFirewallsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*WatchersClientGetNextHopPollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `ConnectionMonitorsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRoutePortsClientListPager.PageResponse` has been removed +- Function `*PublicIPAddressesClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkPeeringsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkTapsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller.Poll` has been removed +- Function `ExpressRouteCircuitsClientListRoutesTablePollerResponse.PollUntilDone` has been removed +- Function `*SecurityPartnerProvidersClientDeletePoller.FinalResponse` has been removed +- Function `*LoadBalancersClientListAllPager.NextPage` has been removed +- Function `*SecurityRulesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `VirtualNetworkGatewaySKUTier.ToPtr` has been removed +- Function `*ExpressRoutePortsClientDeletePoller.Poll` has been removed +- Function `*RoutesClientDeletePoller.ResumeToken` has been removed +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller.ResumeToken` has been removed +- Function `AzureFirewallSKUName.ToPtr` has been removed +- Function `*VirtualNetworkTapsClientDeletePoller.ResumeToken` has been removed +- Function `VPNConnectionsClientStartPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*VirtualAppliancesClientDeletePoller.Done` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientDeletePoller.FinalResponse` has been removed +- Function `*VPNGatewaysClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*FirewallPoliciesClientDeletePoller.Poll` has been removed +- Function `*AvailableResourceGroupDelegationsClientListPager.PageResponse` has been removed +- Function `*CustomIPPrefixesClientDeletePoller.Poll` has been removed +- Function `OutputType.ToPtr` has been removed +- Function `*ExpressRoutePortsClientCreateOrUpdatePoller.Done` has been removed +- Function `*PacketCapturesClientDeletePoller.Done` has been removed +- Function `*RoutingIntentClientDeletePoller.Poll` has been removed +- Function `*DdosProtectionPlansClientListByResourceGroupPager.Err` has been removed +- Function `*WatchersClientGetVMSecurityRulesPoller.ResumeToken` has been removed +- Function `*VPNLinkConnectionsClientGetIkeSasPollerResponse.Resume` has been removed +- Function `*DdosProtectionPlansClientDeletePoller.Poll` has been removed +- Function `*PrivateEndpointsClientListBySubscriptionPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientDeletePoller.FinalResponse` has been removed +- Function `PrivateLinkServicesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteServiceProvidersClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller.FinalResponse` has been removed +- Function `*CustomIPPrefixesClientListAllPager.NextPage` has been removed +- Function `HubBgpConnectionStatus.ToPtr` has been removed +- Function `*VirtualAppliancesClientDeletePollerResponse.Resume` has been removed +- Function `*WebApplicationFirewallPoliciesClientListPager.NextPage` has been removed +- Function `*RouteTablesClientListPager.Err` has been removed +- Function `*VirtualHubBgpConnectionClientDeletePollerResponse.Resume` has been removed +- Function `*RouteTablesClientListPager.PageResponse` has been removed +- Function `*WebApplicationFirewallPoliciesClientDeletePoller.ResumeToken` has been removed +- Function `P2SVPNGatewaysClientGenerateVPNProfilePollerResponse.PollUntilDone` has been removed +- Function `*ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `ApplicationGatewayRequestRoutingRuleType.ToPtr` has been removed +- Function `*LoadBalancersClientSwapPublicIPAddressesPoller.Done` has been removed +- Function `*ManagementClientDisconnectActiveSessionsPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `AzureFirewallNetworkRuleProtocol.ToPtr` has been removed +- Function `*WatchersClientCheckConnectivityPoller.Poll` has been removed +- Function `*IPAllocationsClientDeletePoller.FinalResponse` has been removed +- Function `*PrivateDNSZoneGroupsClientDeletePollerResponse.Resume` has been removed +- Function `*PublicIPPrefixesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller.FinalResponse` has been removed +- Function `*VirtualApplianceSitesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `VirtualHubsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*RouteFilterRulesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientListPager.Err` has been removed +- Function `*BastionHostsClientListPager.Err` has been removed +- Function `WebApplicationFirewallRuleType.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller.FinalResponse` has been removed +- Function `*ExpressRoutePortsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `EffectiveRouteState.ToPtr` has been removed +- Function `*ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualAppliancesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `DestinationPortBehavior.ToPtr` has been removed +- Function `*FirewallPoliciesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteGatewaysClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*BgpServiceCommunitiesClientListPager.NextPage` has been removed +- Function `*FlowLogsClientDeletePoller.Poll` has been removed +- Function `*VirtualHubRouteTableV2SClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteLinksClientListPager.PageResponse` has been removed +- Function `*ExpressRouteCircuitsClientListPager.NextPage` has been removed +- Function `*VirtualWansClientListPager.Err` has been removed +- Function `*ExpressRouteLinksClientListPager.NextPage` has been removed +- Function `*PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualNetworksClientListAllPager.Err` has been removed +- Function `*ManagementClientPutBastionShareableLinkPollerResponse.Resume` has been removed +- Function `*ProfilesClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse.Resume` has been removed +- Function `*VirtualNetworkTapsClientCreateOrUpdatePoller.Poll` has been removed +- Function `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse.PollUntilDone` has been removed +- Function `BastionConnectProtocol.ToPtr` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse.Resume` has been removed +- Function `*SecurityPartnerProvidersClientDeletePoller.ResumeToken` has been removed +- Function `VPNGatewaysClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubRouteTableV2SClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `CoverageLevel.ToPtr` has been removed +- Function `NextHopType.ToPtr` has been removed +- Function `*InterfaceLoadBalancersClientListPager.Err` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager.NextPage` has been removed +- Function `*VirtualRoutersClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualAppliancesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*UsagesClientListPager.Err` has been removed +- Function `*VirtualNetworkPeeringsClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRoutePortsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*ProfilesClientDeletePoller.Poll` has been removed +- Function `IkeIntegrity.ToPtr` has been removed +- Function `VPNLinkConnectionsClientGetIkeSasPollerResponse.PollUntilDone` has been removed +- Function `ExpressRouteLinkAdminState.ToPtr` has been removed +- Function `*LoadBalancerNetworkInterfacesClientListPager.PageResponse` has been removed +- Function `*InboundSecurityRuleClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager.Err` has been removed +- Function `*VPNServerConfigurationsClientDeletePoller.ResumeToken` has been removed +- Function `*ConnectionMonitorsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PacketCapturesClientCreatePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientResetPoller.ResumeToken` has been removed +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTablePoller.ResumeToken` has been removed +- Function `*InterfacesClientGetEffectiveRouteTablePoller.Poll` has been removed +- Function `NatRulesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `VPNGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VPNConnectionsClientStartPacketCapturePoller.Done` has been removed +- Function `*ExpressRoutePortsClientDeletePoller.ResumeToken` has been removed +- Function `*RouteTablesClientDeletePollerResponse.Resume` has been removed +- Function `*RouteTablesClientCreateOrUpdatePoller.Poll` has been removed +- Function `WebApplicationFirewallMatchVariable.ToPtr` has been removed +- Function `*VPNGatewaysClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*CustomIPPrefixesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientListPager.PageResponse` has been removed +- Function `FlowLogsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `LoadBalancersClientListInboundNatRulePortMappingsPollerResponse.PollUntilDone` has been removed +- Function `*SubnetsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientStopPacketCapturePollerResponse.Resume` has been removed +- Function `*LoadBalancersClientListInboundNatRulePortMappingsPoller.ResumeToken` has been removed +- Function `CircuitConnectionStatus.ToPtr` has been removed +- Function `*LoadBalancerProbesClientListPager.NextPage` has been removed +- Function `*WebCategoriesClientListBySubscriptionPager.NextPage` has been removed +- Function `ProbeProtocol.ToPtr` has been removed +- Function `*WatchersClientSetFlowLogConfigurationPollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewayConnectionMode.ToPtr` has been removed +- Function `*VirtualWansClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*RoutingIntentClientListPager.NextPage` has been removed +- Function `*IPGroupsClientDeletePoller.ResumeToken` has been removed +- Function `*ApplicationGatewayPrivateLinkResourcesClientListPager.Err` has been removed +- Function `PublicIPPrefixesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*SubnetsClientPrepareNetworkPoliciesPoller.Done` has been removed +- Function `*VPNServerConfigurationsClientDeletePoller.Poll` has been removed +- Function `VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitsClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller.ResumeToken` has been removed +- Function `*NatGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualRoutersClientListByResourceGroupPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientQueryPoller.FinalResponse` has been removed +- Function `*ConnectionMonitorsClientStartPoller.FinalResponse` has been removed +- Function `*AvailablePrivateEndpointTypesClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualHubRouteTableV2SClientDeletePoller.Poll` has been removed +- Function `*VirtualWansClientCreateOrUpdatePoller.Poll` has been removed +- Function `*P2SVPNGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualNetworksClientListAllPager.PageResponse` has been removed +- Function `*IPGroupsClientDeletePoller.FinalResponse` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*LoadBalancerFrontendIPConfigurationsClientListPager.PageResponse` has been removed +- Function `VirtualNetworkGatewayNatRulesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTablePoller.FinalResponse` has been removed +- Function `*ExpressRouteConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `RouteFilterRuleType.ToPtr` has been removed +- Function `TransportProtocol.ToPtr` has been removed +- Function `*DdosProtectionPlansClientListPager.PageResponse` has been removed +- Function `VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse.PollUntilDone` has been removed +- Function `*UsagesClientListPager.PageResponse` has been removed +- Function `InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientGetNetworkConfigurationDiagnosticPoller.ResumeToken` has been removed +- Function `*LoadBalancersClientListInboundNatRulePortMappingsPoller.Done` has been removed +- Function `GatewayLoadBalancerTunnelInterfaceType.ToPtr` has been removed +- Function `VirtualNetworkGatewayConnectionProtocol.ToPtr` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager.Err` has been removed +- Function `*FirewallPoliciesClientDeletePollerResponse.Resume` has been removed +- Function `*WatchersClientListAvailableProvidersPoller.Poll` has been removed +- Function `*InterfaceLoadBalancersClientListPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionsClientListArpTablePollerResponse.Resume` has been removed +- Function `WebApplicationFirewallEnabledState.ToPtr` has been removed +- Function `*VirtualWansClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientListPager.NextPage` has been removed +- Function `*AvailableServiceAliasesClientListPager.PageResponse` has been removed +- Function `*ApplicationGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `*IPAllocationsClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientUpdateTagsPoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientDeletePoller.FinalResponse` has been removed +- Function `*InboundNatRulesClientListPager.NextPage` has been removed +- Function `*ServiceEndpointPoliciesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller.Done` has been removed +- Function `*WatchersClientGetNextHopPoller.ResumeToken` has been removed +- Function `*ExpressRouteGatewaysClientDeletePoller.Poll` has been removed +- Function `*ApplicationGatewayPrivateLinkResourcesClientListPager.NextPage` has been removed +- Function `OwaspCrsExclusionEntrySelectorMatchOperator.ToPtr` has been removed +- Function `*ApplicationGatewayPrivateLinkResourcesClientListPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `AzureFirewallThreatIntelMode.ToPtr` has been removed +- Function `*ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller.Done` has been removed +- Function `ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientDeletePoller.Poll` has been removed +- Function `VPNConnectionStatus.ToPtr` has been removed +- Function `*ManagementClientPutBastionShareableLinkPager.Err` has been removed +- Function `*ConnectionMonitorsClientQueryPoller.Poll` has been removed +- Function `*P2SVPNGatewaysClientGenerateVPNProfilePoller.FinalResponse` has been removed +- Function `*AzureFirewallsClientListAllPager.NextPage` has been removed +- Function `*WatchersClientGetTroubleshootingPoller.ResumeToken` has been removed +- Function `*VirtualHubBgpConnectionsClientListPager.NextPage` has been removed +- Function `*PrivateLinkServicesClientListPager.Err` has been removed +- Function `NetworkInterfaceNicType.ToPtr` has been removed +- Function `PrivateEndpointsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `FirewallPolicyIntrusionDetectionProtocol.ToPtr` has been removed +- Function `*WebCategoriesClientListBySubscriptionPager.Err` has been removed +- Function `Protocol.ToPtr` has been removed +- Function `*PacketCapturesClientGetStatusPollerResponse.Resume` has been removed +- Function `*HubVirtualNetworkConnectionsClientListPager.PageResponse` has been removed +- Function `VirtualNetworkGatewaysClientStartPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientGetEffectiveRouteTablePoller.Done` has been removed +- Function `*RoutesClientListPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientQueryPollerResponse.Resume` has been removed +- Function `*PacketCapturesClientStopPoller.ResumeToken` has been removed +- Function `ExpressRouteCircuitSKUTier.ToPtr` has been removed +- Function `*WatchersClientGetNextHopPoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller.ResumeToken` has been removed +- Function `*SubnetsClientPrepareNetworkPoliciesPollerResponse.Resume` has been removed +- Function `*ServiceEndpointPoliciesClientDeletePoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientStartPacketCapturePoller.Poll` has been removed +- Function `*InterfacesClientListEffectiveNetworkSecurityGroupsPoller.FinalResponse` has been removed +- Function `*FirewallPoliciesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*SecurityGroupsClientCreateOrUpdatePoller.Done` has been removed +- Function `*DscpConfigurationClientListPager.NextPage` has been removed +- Function `*BastionHostsClientDeletePollerResponse.Resume` has been removed +- Function `*SecurityRulesClientDeletePoller.Done` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*FlowLogsClientListPager.Err` has been removed +- Function `*LocalNetworkGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager.Err` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientDeletePoller.Done` has been removed +- Function `*PrivateEndpointsClientDeletePoller.Done` has been removed +- Function `ExpressRouteCrossConnectionsClientListArpTablePollerResponse.PollUntilDone` has been removed +- Function `*IPAllocationsClientDeletePoller.ResumeToken` has been removed +- Function `*DdosCustomPoliciesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*DdosProtectionPlansClientListByResourceGroupPager.NextPage` has been removed +- Function `*PrivateLinkServicesClientDeletePoller.ResumeToken` has been removed +- Function `*RoutingIntentClientListPager.PageResponse` has been removed +- Function `*VPNConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller.Poll` has been removed +- Function `*PacketCapturesClientGetStatusPoller.Poll` has been removed +- Function `VirtualHubsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*RouteTablesClientListAllPager.NextPage` has been removed +- Function `SecurityRuleAccess.ToPtr` has been removed +- Function `VirtualNetworkGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualRouterPeeringsClientListPager.PageResponse` has been removed +- Function `*IPGroupsClientListByResourceGroupPager.Err` has been removed +- Function `*DdosCustomPoliciesClientDeletePoller.Poll` has been removed +- Function `InterfacesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*RoutesClientListPager.PageResponse` has been removed +- Function `*ConnectionMonitorsClientStartPoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller.Done` has been removed +- Function `*LoadBalancersClientListInboundNatRulePortMappingsPoller.Poll` has been removed +- Function `ExpressRoutePortsEncapsulation.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientGetLearnedRoutesPoller.FinalResponse` has been removed +- Function `*PublicIPAddressesClientListCloudServicePublicIPAddressesPager.Err` has been removed +- Function `*P2SVPNGatewaysClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller.ResumeToken` has been removed +- Function `*RouteTablesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualWansClientListPager.NextPage` has been removed +- Function `VirtualRoutersClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ConnectionMonitorsClientQueryPoller.Done` has been removed +- Function `*PrivateDNSZoneGroupsClientCreateOrUpdatePoller.Done` has been removed +- Function `WatchersClientGetAzureReachabilityReportPollerResponse.PollUntilDone` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller.ResumeToken` has been removed +- Function `*VPNSitesClientListPager.NextPage` has been removed +- Function `*ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `*ApplicationSecurityGroupsClientListAllPager.NextPage` has been removed +- Function `VirtualWansClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller.Done` has been removed +- Function `*VPNGatewaysClientResetPoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller.Done` has been removed +- Function `*PublicIPPrefixesClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientGetBgpPeerStatusPoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionsClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientUpdateTagsPoller.Done` has been removed +- Function `VirtualRouterPeeringsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*CustomIPPrefixesClientListAllPager.PageResponse` has been removed +- Function `VPNConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ApplicationGatewaysClientBackendHealthPoller.FinalResponse` has been removed +- Function `*IPGroupsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*PrivateDNSZoneGroupsClientListPager.NextPage` has been removed +- Function `VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancersClientSwapPublicIPAddressesPoller.Poll` has been removed +- Function `*PrivateLinkServicesClientListBySubscriptionPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse.Resume` has been removed +- Function `VPNLinkConnectionMode.ToPtr` has been removed +- Function `IPAllocationsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListPager.NextPage` has been removed +- Function `*InterfacesClientDeletePoller.Poll` has been removed +- Function `ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse.PollUntilDone` has been removed +- Function `ConnectionMonitorEndpointFilterType.ToPtr` has been removed +- Function `*ExpressRoutePortsClientListPager.Err` has been removed +- Function `*ExpressRouteLinksClientListPager.Err` has been removed +- Function `*PrivateDNSZoneGroupsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetLearnedRoutesPoller.Poll` has been removed +- Function `*BastionHostsClientDeletePoller.FinalResponse` has been removed +- Function `*LoadBalancersClientListInboundNatRulePortMappingsPoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller.ResumeToken` has been removed +- Function `*VPNLinkConnectionsClientGetIkeSasPoller.ResumeToken` has been removed +- Function `VirtualNetworkPeeringsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `IPSecIntegrity.ToPtr` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*InterfacesClientListAllPager.PageResponse` has been removed +- Function `*VirtualHubsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*DscpConfigurationClientListAllPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientDeletePoller.ResumeToken` has been removed +- Function `*InterfacesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientStartPacketCapturePoller.ResumeToken` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualHubIPConfigurationClientDeletePoller.Done` has been removed +- Function `*IPAllocationsClientDeletePollerResponse.Resume` has been removed +- Function `*PacketCapturesClientGetStatusPoller.FinalResponse` has been removed +- Function `VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse.PollUntilDone` has been removed +- Function `*VPNSitesClientListPager.Err` has been removed +- Function `DhGroup.ToPtr` has been removed +- Function `*VPNLinkConnectionsClientResetConnectionPoller.ResumeToken` has been removed +- Function `*VPNGatewaysClientStartPacketCapturePollerResponse.Resume` has been removed +- Function `*FlowLogsClientDeletePoller.Done` has been removed +- Function `*PrivateLinkServicesClientListPrivateEndpointConnectionsPager.NextPage` has been removed +- Function `*FirewallPoliciesClientCreateOrUpdatePoller.Done` has been removed +- Function `VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientListConnectionsPager.PageResponse` has been removed +- Function `*DdosProtectionPlansClientListPager.NextPage` has been removed +- Function `*ExpressRouteCircuitConnectionsClientDeletePoller.Poll` has been removed +- Function `*InboundNatRulesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ServiceTagInformationClientListPager.PageResponse` has been removed +- Function `*VirtualAppliancesClientListPager.Err` has been removed +- Function `*VirtualNetworkGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNConnectionsClientStartPacketCapturePoller.Poll` has been removed +- Function `*CustomIPPrefixesClientListPager.PageResponse` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller.FinalResponse` has been removed +- Function `*InboundSecurityRuleClientCreateOrUpdatePoller.Poll` has been removed +- Function `*PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager.NextPage` has been removed +- Function `*ApplicationSecurityGroupsClientListPager.PageResponse` has been removed +- Function `*RouteFilterRulesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*FirewallPoliciesClientDeletePoller.ResumeToken` has been removed +- Function `*BastionHostsClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*VirtualNetworksClientDeletePoller.Poll` has been removed +- Function `*PublicIPPrefixesClientCreateOrUpdatePoller.Done` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*FirewallPoliciesClientListAllPager.Err` has been removed +- Function `WatchersClientVerifyIPFlowPollerResponse.PollUntilDone` has been removed +- Function `*FlowLogsClientDeletePoller.ResumeToken` has been removed +- Function `*P2SVPNGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `AzureFirewallRCActionType.ToPtr` has been removed +- Function `*PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*SecurityPartnerProvidersClientDeletePoller.Done` has been removed +- Function `*ManagementClientGetBastionShareableLinkPager.PageResponse` has been removed +- Function `*InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager.NextPage` has been removed +- Function `*LocalNetworkGatewaysClientCreateOrUpdatePoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*WatchersClientGetTroubleshootingPoller.FinalResponse` has been removed +- Function `*ProfilesClientDeletePoller.Done` has been removed +- Function `RouteFiltersClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualRouterPeeringsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientGetIkeSasPoller.ResumeToken` has been removed +- Function `*PrivateEndpointsClientDeletePoller.FinalResponse` has been removed +- Function `P2SVPNGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*IPAllocationsClientDeletePoller.Done` has been removed +- Function `*VirtualHubIPConfigurationClientListPager.PageResponse` has been removed +- Function `*SecurityRulesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `UsageUnit.ToPtr` has been removed +- Function `*WatchersClientGetTroubleshootingPollerResponse.Resume` has been removed +- Function `*VirtualApplianceSitesClientListPager.NextPage` has been removed +- Function `*InterfacesClientListEffectiveNetworkSecurityGroupsPoller.Done` has been removed +- Function `*VirtualHubBgpConnectionClientCreateOrUpdatePoller.Poll` has been removed +- Function `ExpressRouteCircuitPeeringsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `WatchersClientGetNextHopPollerResponse.PollUntilDone` has been removed +- Function `*RoutingIntentClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworksClientListUsagePager.Err` has been removed +- Function `*VirtualHubIPConfigurationClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ServiceEndpointPoliciesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*IPGroupsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetLearnedRoutesPoller.ResumeToken` has been removed +- Function `*RoutingIntentClientListPager.Err` has been removed +- Function `ConnectionMonitorSourceStatus.ToPtr` has been removed +- Function `*P2SVPNGatewaysClientGenerateVPNProfilePoller.ResumeToken` has been removed +- Function `VirtualNetworkPrivateEndpointNetworkPolicies.ToPtr` has been removed +- Function `*VirtualHubBgpConnectionClientDeletePoller.Done` has been removed +- Function `*IPGroupsClientListPager.Err` has been removed +- Function `*VirtualHubBgpConnectionsClientListPager.Err` has been removed +- Function `IPGroupsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*InboundNatRulesClientDeletePoller.Done` has been removed +- Function `HubRouteTablesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DscpConfigurationClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientDeletePoller.ResumeToken` has been removed +- Function `*DscpConfigurationClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ConnectionMonitorsClientStopPoller.FinalResponse` has been removed +- Function `*HubRouteTablesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewayConnectionType.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientUpdateTagsPoller.Done` has been removed +- Function `*VPNConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ManagementClientDeleteBastionShareableLinkPoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitsClientListPager.PageResponse` has been removed +- Function `VirtualAppliancesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientGetIkeSasPoller.FinalResponse` has been removed +- Function `*VirtualHubsClientListPager.PageResponse` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager.Err` has been removed +- Function `*LoadBalancersClientSwapPublicIPAddressesPoller.ResumeToken` has been removed +- Function `VirtualWanSecurityProviderType.ToPtr` has been removed +- Function `*SubnetsClientPrepareNetworkPoliciesPoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualHubRouteTableV2SClientCreateOrUpdatePoller.Done` has been removed +- Function `*AzureFirewallsClientDeletePoller.ResumeToken` has been removed +- Function `*SubnetsClientListPager.NextPage` has been removed +- Function `*RoutingIntentClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientListPager.Err` has been removed +- Function `*SecurityRulesClientDeletePoller.FinalResponse` has been removed +- Function `*WatchersClientDeletePoller.Done` has been removed +- Function `*WatchersClientListAvailableProvidersPoller.FinalResponse` has been removed +- Function `IPGroupsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*DdosProtectionPlansClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*SubnetsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualWansClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkPeeringsClientListPager.NextPage` has been removed +- Function `*VirtualHubsClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `PublicIPPrefixesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `WebApplicationFirewallAction.ToPtr` has been removed +- Function `ConnectionMonitorTestConfigurationProtocol.ToPtr` has been removed +- Function `*InterfacesClientGetEffectiveRouteTablePoller.FinalResponse` has been removed +- Function `*VirtualHubsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualHubRouteTableV2SClientListPager.PageResponse` has been removed +- Function `*InboundNatRulesClientCreateOrUpdatePoller.Done` has been removed +- Function `*RouteFiltersClientDeletePoller.Done` has been removed +- Function `*IPGroupsClientListPager.NextPage` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNConnectionsClientStopPacketCapturePoller.Poll` has been removed +- Function `EffectiveRouteSource.ToPtr` has been removed +- Function `*ApplicationGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*VPNServerConfigurationsClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkTapsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkTapsClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VPNConnectionsClientStopPacketCapturePoller.ResumeToken` has been removed +- Function `*SubnetsClientListPager.Err` has been removed +- Function `*ExpressRouteCrossConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ApplicationGatewaysClientBackendHealthPoller.Done` has been removed +- Function `*PrivateLinkServicesClientListPager.PageResponse` has been removed +- Function `*ExpressRoutePortsClientDeletePoller.FinalResponse` has been removed +- Function `*BastionHostsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse.Resume` has been removed +- Function `*VirtualRoutersClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualRoutersClientListByResourceGroupPager.PageResponse` has been removed +- Function `*RouteFilterRulesClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetConnectionPoller.Done` has been removed +- Function `*PrivateEndpointsClientListPager.PageResponse` has been removed +- Function `*PublicIPPrefixesClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `ManagementClientDeleteBastionShareableLinkPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientUpdateTagsPoller.Poll` has been removed +- Function `*BastionHostsClientDeletePoller.Poll` has been removed +- Function `VPNConnectionsClientStopPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller.ResumeToken` has been removed +- Function `DscpConfigurationClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `PreferredRoutingGateway.ToPtr` has been removed +- Function `RouteFilterRulesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `SecurityPartnerProvidersClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkTapsClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `*WebApplicationFirewallPoliciesClientDeletePoller.FinalResponse` has been removed +- Function `ApplicationGatewaysClientBackendHealthPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRoutePortsLocationsClientListPager.NextPage` has been removed +- Function `SingleQueryResultSeverity.ToPtr` has been removed +- Function `*PrivateLinkServicesClientListPrivateEndpointConnectionsPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller.Done` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `ExpressRoutePortsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientListPager.Err` has been removed +- Function `*WatchersClientCheckConnectivityPoller.Done` has been removed +- Function `*WatchersClientGetFlowLogStatusPoller.FinalResponse` has been removed +- Function `*ExpressRouteCrossConnectionsClientListByResourceGroupPager.Err` has been removed +- Function `*ApplicationGatewaysClientBackendHealthOnDemandPollerResponse.Resume` has been removed +- Function `*LocalNetworkGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteConnectionsClientDeletePoller.Poll` has been removed +- Function `*RoutesClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller.Poll` has been removed +- Function `*NatRulesClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCrossConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientGetIkeSasPoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientGetBgpPeerStatusPoller.ResumeToken` has been removed +- Function `*VPNLinkConnectionsClientListByVPNConnectionPager.PageResponse` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualHubIPConfigurationClientCreateOrUpdatePoller.Done` has been removed +- Function `*DdosCustomPoliciesClientDeletePoller.ResumeToken` has been removed +- Function `*InboundNatRulesClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse.Resume` has been removed +- Function `ApplicationGatewayTier.ToPtr` has been removed +- Function `RouteFilterRulesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `WatchersClientGetTroubleshootingPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteGatewaysClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*VirtualAppliancesClientDeletePoller.FinalResponse` has been removed +- Function `*InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager.Err` has been removed +- Function `*VirtualNetworksClientDeletePollerResponse.Resume` has been removed +- Function `ApplicationGatewaySSLProtocol.ToPtr` has been removed +- Function `*VPNSitesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `OwaspCrsExclusionEntryMatchVariable.ToPtr` has been removed +- Function `*VPNServerConfigurationsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*ApplicationGatewaysClientStartPoller.Done` has been removed +- Function `*VirtualApplianceSitesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager.PageResponse` has been removed +- Function `*WatchersClientGetAzureReachabilityReportPoller.Poll` has been removed +- Function `*LoadBalancersClientListAllPager.PageResponse` has been removed +- Function `*ExpressRouteConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNGatewaysClientStopPacketCapturePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientListPager.PageResponse` has been removed +- Function `VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ConnectionMonitorsClientStopPoller.Poll` has been removed +- Function `*ApplicationGatewaysClientStopPoller.ResumeToken` has been removed +- Function `*AzureFirewallsClientDeletePoller.Poll` has been removed +- Function `SyncRemoteAddressSpace.ToPtr` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientStopPacketCapturePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientGenerateVPNProfilePoller.Done` has been removed +- Function `FlowLogsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*BastionHostsClientCreateOrUpdatePoller.Done` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `VPNNatRuleType.ToPtr` has been removed +- Function `*BastionHostsClientUpdateTagsPoller.Done` has been removed +- Function `*RouteTablesClientListPager.NextPage` has been removed +- Function `*ProfilesClientListAllPager.PageResponse` has been removed +- Function `*VPNSitesClientDeletePoller.ResumeToken` has been removed +- Function `*ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientListPager.Err` has been removed +- Function `*AvailableDelegationsClientListPager.NextPage` has been removed +- Function `VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientListAvailableProvidersPollerResponse.Resume` has been removed +- Function `*VirtualHubBgpConnectionClientDeletePoller.FinalResponse` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientListPager.NextPage` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTablePoller.Poll` has been removed +- Function `SubnetsClientPrepareNetworkPoliciesPollerResponse.PollUntilDone` has been removed +- Function `ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller.FinalResponse` has been removed +- Function `*ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse.Resume` has been removed +- Function `*AzureFirewallFqdnTagsClientListAllPager.PageResponse` has been removed +- Function `*ExpressRouteCircuitsClientListAllPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller.Done` has been removed +- Function `*WatchersClientSetFlowLogConfigurationPoller.FinalResponse` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller.Poll` has been removed +- Function `*VirtualNetworkGatewaysClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*VirtualHubIPConfigurationClientDeletePollerResponse.Resume` has been removed +- Function `*NatGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualHubsClientDeletePoller.Poll` has been removed +- Function `*WatchersClientGetVMSecurityRulesPoller.Done` has been removed +- Function `*PacketCapturesClientStopPoller.FinalResponse` has been removed +- Function `*InterfacesClientDeletePoller.Done` has been removed +- Function `*VirtualWansClientDeletePoller.Done` has been removed +- Function `*RouteFiltersClientListByResourceGroupPager.NextPage` has been removed +- Function `*P2SVPNGatewaysClientListPager.Err` has been removed +- Function `ExpressRouteCircuitConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetConnectionPoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*PrivateEndpointsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `AuthenticationMethod.ToPtr` has been removed +- Function `ConnectionMonitorType.ToPtr` has been removed +- Function `*InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager.PageResponse` has been removed +- Function `VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse.PollUntilDone` has been removed +- Function `*WatchersClientGetVMSecurityRulesPoller.FinalResponse` has been removed +- Function `*SecurityRulesClientListPager.NextPage` has been removed +- Function `VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse.PollUntilDone` has been removed +- Function `*DscpConfigurationClientDeletePoller.ResumeToken` has been removed +- Function `HubRouteTablesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller.Poll` has been removed +- Function `*PacketCapturesClientCreatePoller.ResumeToken` has been removed +- Function `*RouteFilterRulesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VPNLinkConnectionsClientResetConnectionPoller.Poll` has been removed +- Function `*WatchersClientVerifyIPFlowPollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetConnectionPoller.FinalResponse` has been removed +- Function `*VPNGatewaysClientResetPoller.Poll` has been removed +- Function `*InterfaceTapConfigurationsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualRoutersClientDeletePollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewaySKUName.ToPtr` has been removed +- Function `*AzureFirewallsClientUpdateTagsPollerResponse.Resume` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager.NextPage` has been removed +- Function `*InboundNatRulesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `LoadBalancerBackendAddressPoolsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*AvailableServiceAliasesClientListByResourceGroupPager.Err` has been removed +- Function `*ManagementClientPutBastionShareableLinkPager.NextPage` has been removed +- Function `*InterfacesClientDeletePoller.ResumeToken` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller.Done` has been removed +- Function `*CustomIPPrefixesClientDeletePoller.ResumeToken` has been removed +- Function `VPNGatewayGeneration.ToPtr` has been removed +- Function `*VirtualHubsClientGetEffectiveVirtualHubRoutesPoller.FinalResponse` has been removed +- Function `*NatGatewaysClientListPager.PageResponse` has been removed +- Function `ServiceEndpointPolicyDefinitionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubsClientListPager.NextPage` has been removed +- Function `*ApplicationGatewaysClientBackendHealthOnDemandPoller.FinalResponse` has been removed +- Function `*LocalNetworkGatewaysClientDeletePoller.Done` has been removed +- Function `InboundSecurityRulesProtocol.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller.Done` has been removed +- Function `ApplicationGatewaysClientBackendHealthOnDemandPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller.Poll` has been removed +- Function `*AzureFirewallFqdnTagsClientListAllPager.NextPage` has been removed +- Function `*InboundNatRulesClientListPager.Err` has been removed +- Function `*ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager.Err` has been removed +- Function `*VirtualHubIPConfigurationClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*RouteFilterRulesClientListByRouteFilterPager.PageResponse` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager.Err` has been removed +- Function `PacketCapturesClientGetStatusPollerResponse.PollUntilDone` has been removed +- Function `*P2SVPNGatewaysClientDeletePoller.Done` has been removed +- Function `*ExpressRouteCircuitsClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTablePoller.ResumeToken` has been removed +- Function `*PublicIPPrefixesClientListAllPager.Err` has been removed +- Function `*WatchersClientSetFlowLogConfigurationPoller.ResumeToken` has been removed +- Function `*IPGroupsClientListByResourceGroupPager.NextPage` has been removed +- Function `*VirtualAppliancesClientDeletePoller.ResumeToken` has been removed +- Function `*DdosProtectionPlansClientDeletePoller.FinalResponse` has been removed +- Function `VPNServerConfigurationsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*PrivateDNSZoneGroupsClientDeletePoller.ResumeToken` has been removed +- Function `*CustomIPPrefixesClientListAllPager.Err` has been removed +- Function `WebApplicationFirewallTransform.ToPtr` has been removed +- Function `*AvailablePrivateEndpointTypesClientListByResourceGroupPager.NextPage` has been removed +- Function `WatchersClientSetFlowLogConfigurationPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubRouteTableV2SClientListPager.NextPage` has been removed +- Function `ApplicationGatewaySSLPolicyType.ToPtr` has been removed +- Function `ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `VirtualNetworkGatewayConnectionStatus.ToPtr` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkPeeringsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCrossConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualNetworkPeeringsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTableSummaryPoller.FinalResponse` has been removed +- Function `*VirtualHubsClientListByResourceGroupPager.Err` has been removed +- Function `*AzureFirewallFqdnTagsClientListAllPager.Err` has been removed +- Function `*RouteFiltersClientListByResourceGroupPager.Err` has been removed +- Function `*DdosCustomPoliciesClientCreateOrUpdatePoller.Poll` has been removed +- Function `HubVirtualNetworkConnectionStatus.ToPtr` has been removed +- Function `*RouteFiltersClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientStopPacketCapturePollerResponse.Resume` has been removed +- Function `*AzureFirewallsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*SecurityGroupsClientListPager.PageResponse` has been removed +- Function `*VirtualRoutersClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientCreateOrUpdatePoller.Done` has been removed +- Function `ConnectionMonitorEndpointFilterItemType.ToPtr` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*BgpServiceCommunitiesClientListPager.Err` has been removed +- Function `*SecurityGroupsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientListConnectionsPager.Err` has been removed +- Function `*RoutesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualNetworkPeeringsClientDeletePollerResponse.Resume` has been removed +- Function `*DdosProtectionPlansClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientDeletePoller.Poll` has been removed +- Function `RoutesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `PublicIPAddressesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ConnectionMonitorsClientStartPollerResponse.PollUntilDone` has been removed +- Function `*DdosCustomPoliciesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientListPager.PageResponse` has been removed +- Function `*PacketCapturesClientDeletePoller.FinalResponse` has been removed +- Function `*ApplicationSecurityGroupsClientDeletePollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientStartPacketCapturePoller.FinalResponse` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientDeletePoller.Poll` has been removed +- Function `*WatchersClientGetTroubleshootingResultPoller.ResumeToken` has been removed +- Function `*ApplicationSecurityGroupsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*LoadBalancerOutboundRulesClientListPager.NextPage` has been removed +- Function `*WatchersClientDeletePoller.Poll` has been removed +- Function `*VPNSitesConfigurationClientDownloadPoller.FinalResponse` has been removed +- Function `*PublicIPPrefixesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `PacketCapturesClientCreatePollerResponse.PollUntilDone` has been removed +- Function `VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ConnectionStatus.ToPtr` has been removed +- Function `*ConnectionMonitorsClientQueryPoller.ResumeToken` has been removed +- Function `*VPNGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse.Resume` has been removed +- Function `*P2SVPNGatewaysClientListByResourceGroupPager.NextPage` has been removed +- Function `*VirtualRouterPeeringsClientDeletePoller.ResumeToken` has been removed +- Function `VirtualNetworkGatewayType.ToPtr` has been removed +- Function `*InterfacesClientListPager.PageResponse` has been removed +- Function `*WatchersClientVerifyIPFlowPoller.Poll` has been removed +- Function `*VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller.Poll` has been removed +- Function `*ManagementClientPutBastionShareableLinkPoller.FinalResponse` has been removed +- Function `*WatchersClientGetFlowLogStatusPollerResponse.Resume` has been removed +- Function `InboundNatRulesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancerOutboundRulesClientListPager.PageResponse` has been removed +- Function `InterfacesClientGetEffectiveRouteTablePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListEffectiveNetworkSecurityGroupsPoller.ResumeToken` has been removed +- Function `*UsagesClientListPager.NextPage` has been removed +- Function `ApplicationGatewayFirewallMode.ToPtr` has been removed +- Function `FirewallPolicyNatRuleCollectionActionType.ToPtr` has been removed +- Function `*LoadBalancersClientListPager.NextPage` has been removed +- Function `*PrivateDNSZoneGroupsClientDeletePoller.FinalResponse` has been removed +- Function `*InterfaceIPConfigurationsClientListPager.Err` has been removed +- Function `*VirtualHubsClientDeletePoller.ResumeToken` has been removed +- Function `*DefaultSecurityRulesClientListPager.Err` has been removed +- Function `*ProfilesClientDeletePoller.ResumeToken` has been removed +- Function `*InboundNatRulesClientDeletePoller.ResumeToken` has been removed +- Function `*SubnetsClientDeletePoller.Poll` has been removed +- Function `*ConnectionMonitorsClientCreateOrUpdatePoller.Done` has been removed +- Function `AzureFirewallSKUTier.ToPtr` has been removed +- Function `LocalNetworkGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancersClientDeletePoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientResetPoller.FinalResponse` has been removed +- Function `*DdosCustomPoliciesClientDeletePoller.FinalResponse` has been removed +- Function `*LoadBalancerNetworkInterfacesClientListPager.NextPage` has been removed +- Function `*ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller.FinalResponse` has been removed +- Function `*VirtualAppliancesClientListByResourceGroupPager.Err` has been removed +- Function `ProcessorArchitecture.ToPtr` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientListPager.NextPage` has been removed +- Function `VirtualNetworkTapsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*PeerExpressRouteCircuitConnectionsClientListPager.NextPage` has been removed +- Function `*PrivateDNSZoneGroupsClientCreateOrUpdatePoller.Poll` has been removed +- Function `IPAllocationsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubsClientCreateOrUpdatePoller.Done` has been removed +- Function `ExpressRouteCircuitsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `SingleQueryResultDirection.ToPtr` has been removed +- Function `SecurityRulesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*NatGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNSitesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNSitesClientListByResourceGroupPager.NextPage` has been removed +- Function `*SecurityGroupsClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*PublicIPPrefixesClientListPager.NextPage` has been removed +- Function `*VirtualHubBgpConnectionClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientDeletePoller.FinalResponse` has been removed +- Function `VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteGatewaysClientUpdateTagsPoller.Poll` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientDeletePollerResponse.Resume` has been removed +- Function `ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkTapsClientDeletePollerResponse.Resume` has been removed +- Function `*InterfaceLoadBalancersClientListPager.PageResponse` has been removed +- Function `*RoutesClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualWansClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientDeletePollerResponse.Resume` has been removed +- Function `*LoadBalancersClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller.FinalResponse` has been removed +- Function `*ProfilesClientListAllPager.Err` has been removed +- Function `*VPNSitesConfigurationClientDownloadPollerResponse.Resume` has been removed +- Function `*WatchersClientGetFlowLogStatusPoller.Poll` has been removed +- Function `*WebApplicationFirewallPoliciesClientDeletePoller.Poll` has been removed +- Function `*SubnetsClientPrepareNetworkPoliciesPoller.FinalResponse` has been removed +- Function `VirtualHubBgpConnectionClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientListPager.PageResponse` has been removed +- Function `*ExpressRoutePortsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualApplianceSitesClientDeletePollerResponse.Resume` has been removed +- Function `*PrivateLinkServicesClientDeletePoller.Poll` has been removed +- Function `*SecurityGroupsClientListAllPager.NextPage` has been removed +- Function `ApplicationGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `ApplicationSecurityGroupsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `VirtualWansClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientGetLearnedRoutesPoller.Done` has been removed +- Function `*BastionHostsClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualNetworksClientListUsagePager.NextPage` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `EffectiveSecurityRuleProtocol.ToPtr` has been removed +- Function `*SecurityRulesClientCreateOrUpdatePoller.Done` has been removed +- Function `*DdosProtectionPlansClientCreateOrUpdatePoller.Done` has been removed +- Function `*CustomIPPrefixesClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `VirtualNetworksClientDeletePollerResponse.PollUntilDone` has been removed +- Function `BastionHostSKUName.ToPtr` has been removed +- Function `*DdosProtectionPlansClientListPager.Err` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientListPager.NextPage` has been removed +- Function `*HubRouteTablesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*RouteFilterRulesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteCircuitPeeringsClientDeletePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteGatewaysClientDeletePollerResponse.Resume` has been removed +- Function `*SecurityGroupsClientDeletePollerResponse.Resume` has been removed +- Function `*ManagementClientGetActiveSessionsPoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTableSummaryPoller.ResumeToken` has been removed +- Function `*ApplicationGatewaysClientStopPollerResponse.Resume` has been removed +- Function `*VirtualNetworkPeeringsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*InterfacesClientListCloudServiceNetworkInterfacesPager.Err` has been removed +- Function `*BastionHostsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*SubnetsClientPrepareNetworkPoliciesPoller.Poll` has been removed +- Function `*LocalNetworkGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `AzureFirewallsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VPNConnectionsClientStartPacketCapturePoller.ResumeToken` has been removed +- Function `*VirtualAppliancesClientCreateOrUpdatePoller.Done` has been removed +- Function `*FirewallPoliciesClientListPager.Err` has been removed +- Function `*BastionHostsClientUpdateTagsPoller.Poll` has been removed +- Function `*FlowLogsClientDeletePoller.FinalResponse` has been removed +- Function `*RoutingIntentClientDeletePollerResponse.Resume` has been removed +- Function `*RoutingIntentClientCreateOrUpdatePoller.Poll` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientListPager.PageResponse` has been removed +- Function `*InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager.Err` has been removed +- Function `*AzureFirewallsClientDeletePoller.FinalResponse` has been removed +- Function `*ExpressRouteCrossConnectionsClientListPager.PageResponse` has been removed +- Function `*PublicIPAddressesClientListCloudServicePublicIPAddressesPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientDeletePoller.Poll` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse.Resume` has been removed +- Function `DdosCustomPolicyTriggerSensitivityOverride.ToPtr` has been removed +- Function `*ManagementClientPutBastionShareableLinkPager.PageResponse` has been removed +- Function `*VPNServerConfigurationsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*SecurityGroupsClientDeletePoller.Poll` has been removed +- Function `ApplicationGatewaySKUName.ToPtr` has been removed +- Function `*VirtualRoutersClientDeletePoller.Poll` has been removed +- Function `*WatchersClientGetVMSecurityRulesPoller.Poll` has been removed +- Function `*ApplicationGatewaysClientBackendHealthPoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientDeletePoller.Poll` has been removed +- Function `*P2SVPNGatewaysClientListPager.NextPage` has been removed +- Function `*ManagementClientGetActiveSessionsPoller.Poll` has been removed +- Function `*VirtualHubIPConfigurationClientDeletePoller.ResumeToken` has been removed +- Function `*ManagementClientGetActiveSessionsPoller.FinalResponse` has been removed +- Function `ApplicationGatewayProtocol.ToPtr` has been removed +- Function `*VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller.Done` has been removed +- Function `VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse.PollUntilDone` has been removed +- Function `VPNGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller.Poll` has been removed +- Function `VPNGatewayTunnelingProtocol.ToPtr` has been removed +- Function `VPNConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*SecurityPartnerProvidersClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `WatchersClientGetNetworkConfigurationDiagnosticPollerResponse.PollUntilDone` has been removed +- Function `*IPAllocationsClientCreateOrUpdatePoller.Poll` has been removed +- Function `VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse.PollUntilDone` has been removed +- Function `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse.PollUntilDone` has been removed +- Function `*P2SVPNGatewaysClientResetPollerResponse.Resume` has been removed +- Function `Access.ToPtr` has been removed +- Function `*VirtualHubBgpConnectionClientDeletePoller.ResumeToken` has been removed +- Function `*SecurityPartnerProvidersClientListPager.Err` has been removed +- Function `*LocalNetworkGatewaysClientDeletePoller.Poll` has been removed +- Function `VPNClientProtocol.ToPtr` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*ExpressRouteConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*SecurityPartnerProvidersClientDeletePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientBackendHealthOnDemandPoller.ResumeToken` has been removed +- Function `*HubRouteTablesClientListPager.NextPage` has been removed +- Function `*DdosProtectionPlansClientDeletePoller.ResumeToken` has been removed +- Function `PrivateLinkServicesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VPNSitesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubIPConfigurationClientDeletePoller.Poll` has been removed +- Function `VirtualNetworkPrivateLinkServiceNetworkPolicies.ToPtr` has been removed +- Function `*DdosProtectionPlansClientDeletePollerResponse.Resume` has been removed +- Function `*SubnetsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*IPGroupsClientCreateOrUpdatePoller.Done` has been removed +- Function `*ApplicationGatewaysClientStartPoller.Poll` has been removed +- Function `*LocalNetworkGatewaysClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager.NextPage` has been removed +- Function `*ApplicationGatewaysClientBackendHealthOnDemandPoller.Poll` has been removed +- Function `*AvailableServiceAliasesClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientGetIkeSasPoller.Poll` has been removed +- Function `*ManagementClientPutBastionShareableLinkPoller.Done` has been removed +- Function `PcProtocol.ToPtr` has been removed +- Function `*P2SVPNGatewaysClientListByResourceGroupPager.PageResponse` has been removed +- Function `WatchersClientGetFlowLogStatusPollerResponse.PollUntilDone` has been removed +- Function `*ApplicationGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse.Resume` has been removed +- Function `*SecurityGroupsClientListAllPager.PageResponse` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*RouteFilterRulesClientListByRouteFilterPager.NextPage` has been removed +- Function `*RouteFilterRulesClientDeletePoller.Poll` has been removed +- Function `*VirtualRoutersClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VirtualHubsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VPNConnectionsClientStopPacketCapturePoller.Done` has been removed +- Function `*SecurityPartnerProvidersClientListByResourceGroupPager.PageResponse` has been removed +- Function `NetworkInterfaceMigrationPhase.ToPtr` has been removed +- Function `*SubnetsClientDeletePoller.FinalResponse` has been removed +- Function `*BgpServiceCommunitiesClientListPager.PageResponse` has been removed +- Function `*LocalNetworkGatewaysClientListPager.PageResponse` has been removed +- Function `*HubVirtualNetworkConnectionsClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientStopPacketCapturePoller.Poll` has been removed +- Function `*ServiceEndpointPoliciesClientDeletePoller.Done` has been removed +- Function `*InterfaceTapConfigurationsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `VirtualRouterPeeringsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ConnectionMonitorsClientStopPollerResponse.Resume` has been removed +- Function `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse.PollUntilDone` has been removed +- Function `*DscpConfigurationClientDeletePoller.FinalResponse` has been removed +- Function `*HubVirtualNetworkConnectionsClientDeletePoller.Done` has been removed +- Function `*HubVirtualNetworkConnectionsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*RoutesClientCreateOrUpdatePoller.Poll` has been removed +- Function `SecurityRuleProtocol.ToPtr` has been removed +- Function `OfficeTrafficCategory.ToPtr` has been removed +- Function `*ApplicationSecurityGroupsClientListAllPager.PageResponse` has been removed +- Function `*PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientUpdateTagsPoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientDeletePoller.FinalResponse` has been removed +- Function `*PublicIPAddressesClientListPager.PageResponse` has been removed +- Function `CommissionedState.ToPtr` has been removed +- Function `*InboundNatRulesClientListPager.PageResponse` has been removed +- Function `*CustomIPPrefixesClientListPager.Err` has been removed +- Function `LoadBalancerSKUTier.ToPtr` has been removed +- Function `FirewallPolicyRuleType.ToPtr` has been removed +- Function `ExpressRouteConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `PfsGroup.ToPtr` has been removed +- Function `*NatRulesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ServiceEndpointPoliciesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VPNGatewaysClientUpdateTagsPollerResponse.Resume` has been removed +- Function `DdosSettingsProtectionCoverage.ToPtr` has been removed +- Function `*SecurityGroupsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*InterfacesClientDeletePollerResponse.Resume` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientDeletePoller.ResumeToken` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager.PageResponse` has been removed +- Function `*ConnectionMonitorsClientStartPoller.Done` has been removed +- Function `*VirtualNetworksClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualAppliancesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `DdosProtectionPlansClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualAppliancesClientListByResourceGroupPager.PageResponse` has been removed +- Function `*PrivateEndpointsClientDeletePoller.ResumeToken` has been removed +- Function `PublicIPAddressMigrationPhase.ToPtr` has been removed +- Function `*VirtualAppliancesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*WatchersClientVerifyIPFlowPoller.Done` has been removed +- Function `*FlowLogsClientListPager.PageResponse` has been removed +- Function `*RouteTablesClientDeletePoller.Poll` has been removed +- Function `*InterfaceIPConfigurationsClientListPager.NextPage` has been removed +- Function `*FirewallPoliciesClientListPager.NextPage` has been removed +- Function `*WatchersClientGetTroubleshootingResultPoller.FinalResponse` has been removed +- Function `*VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientStopPacketCapturePoller.Done` has been removed +- Function `*ExpressRouteCrossConnectionsClientListArpTablePoller.ResumeToken` has been removed +- Function `SecurityGroupsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ManagementClientGetActiveSessionsPager.Err` has been removed +- Function `*HubVirtualNetworkConnectionsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualNetworkGatewaysClientDeletePoller.ResumeToken` has been removed +- Function `PublicIPAddressSKUName.ToPtr` has been removed +- Function `*ExpressRouteCircuitPeeringsClientListPager.Err` has been removed +- Function `WebApplicationFirewallPoliciesClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller.ResumeToken` has been removed +- Function `*ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*NatRulesClientDeletePoller.Poll` has been removed +- Function `*InboundNatRulesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse.Resume` has been removed +- Function `*RouteFiltersClientListByResourceGroupPager.PageResponse` has been removed +- Function `HTTPMethod.ToPtr` has been removed +- Function `*CustomIPPrefixesClientCreateOrUpdatePoller.Done` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller.FinalResponse` has been removed +- Function `*LoadBalancerLoadBalancingRulesClientListPager.NextPage` has been removed +- Function `*VPNGatewaysClientStopPacketCapturePoller.ResumeToken` has been removed +- Function `VirtualNetworksClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `PacketCapturesClientStopPollerResponse.PollUntilDone` has been removed +- Function `*LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller.Done` has been removed +- Function `*SecurityRulesClientCreateOrUpdatePoller.Poll` has been removed +- Function `FirewallPolicySKUTier.ToPtr` has been removed +- Function `*VirtualApplianceSKUsClientListPager.NextPage` has been removed +- Function `*PrivateDNSZoneGroupsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNSitesClientDeletePoller.Poll` has been removed +- Function `*WebApplicationFirewallPoliciesClientDeletePollerResponse.Resume` has been removed +- Function `*ApplicationGatewaysClientListAllPager.NextPage` has been removed +- Function `VPNNatRuleMode.ToPtr` has been removed +- Function `*ExpressRoutePortsClientListByResourceGroupPager.Err` has been removed +- Function `*DscpConfigurationClientDeletePollerResponse.Resume` has been removed +- Function `*ExpressRouteConnectionsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*LoadBalancersClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualHubBgpConnectionsClientListLearnedRoutesPoller.Poll` has been removed +- Function `*VPNGatewaysClientListPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientUpdateTagsPoller.Poll` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller.Done` has been removed +- Function `*VirtualHubsClientGetEffectiveVirtualHubRoutesPoller.ResumeToken` has been removed +- Function `*SubnetsClientCreateOrUpdatePoller.Done` has been removed +- Function `OrderByOrder.ToPtr` has been removed +- Function `*ExpressRouteCircuitsClientListRoutesTableSummaryPoller.Done` has been removed +- Function `*DdosProtectionPlansClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitConnectionsClientListPager.NextPage` has been removed +- Function `ConnectionState.ToPtr` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse.Resume` has been removed +- Function `*ApplicationSecurityGroupsClientListPager.Err` has been removed +- Function `*IPAllocationsClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualRouterPeeringsClientCreateOrUpdatePoller.Done` has been removed +- Function `*WatchersClientVerifyIPFlowPoller.ResumeToken` has been removed +- Function `VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRouteCircuitsClientListArpTablePoller.FinalResponse` has been removed +- Function `*ExpressRouteCircuitsClientListArpTablePoller.Done` has been removed +- Function `*ExpressRouteGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `GatewayLoadBalancerTunnelProtocol.ToPtr` has been removed +- Function `*HubRouteTablesClientCreateOrUpdatePoller.Done` has been removed +- Function `*WatchersClientGetNetworkConfigurationDiagnosticPoller.Done` has been removed +- Function `*PublicIPPrefixesClientListPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientResetPoller.ResumeToken` has been removed +- Function `*VirtualRoutersClientListPager.NextPage` has been removed +- Function `*IPAllocationsClientListPager.Err` has been removed +- Function `*ExpressRouteCircuitAuthorizationsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteCrossConnectionPeeringsClientDeletePoller.Poll` has been removed +- Function `*InboundNatRulesClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VirtualNetworkTapsClientListByResourceGroupPager.NextPage` has been removed +- Function `*VirtualAppliancesClientListPager.NextPage` has been removed +- Function `*WatchersClientDeletePollerResponse.Resume` has been removed +- Function `*LoadBalancerProbesClientListPager.Err` has been removed +- Function `FirewallPolicyRuleNetworkProtocol.ToPtr` has been removed +- Function `*InboundSecurityRuleClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `IPSecEncryption.ToPtr` has been removed +- Function `*VPNGatewaysClientListPager.NextPage` has been removed +- Function `*WatchersClientListAvailableProvidersPoller.ResumeToken` has been removed +- Function `*PublicIPPrefixesClientListPager.Err` has been removed +- Function `*ExpressRouteCircuitConnectionsClientListPager.PageResponse` has been removed +- Function `*VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller.Poll` has been removed +- Function `*ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager.NextPage` has been removed +- Function `*ConnectionMonitorsClientStartPoller.ResumeToken` has been removed +- Function `*VPNSitesClientListPager.PageResponse` has been removed +- Function `PublicIPAddressSKUTier.ToPtr` has been removed +- Function `*DdosProtectionPlansClientListByResourceGroupPager.PageResponse` has been removed +- Function `*IPAllocationsClientListByResourceGroupPager.NextPage` has been removed +- Function `VirtualNetworkGatewayConnectionsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*RouteTablesClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller.ResumeToken` has been removed +- Function `ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*ConnectionMonitorsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ApplicationSecurityGroupsClientListAllPager.Err` has been removed +- Function `*RouteFilterRulesClientDeletePoller.Done` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse.Resume` has been removed +- Function `*ProfilesClientListAllPager.NextPage` has been removed +- Function `*SecurityPartnerProvidersClientListByResourceGroupPager.NextPage` has been removed +- Function `*IPAllocationsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `IPAllocationType.ToPtr` has been removed +- Function `*WatchersClientGetTroubleshootingResultPoller.Poll` has been removed +- Function `*ExpressRouteServiceProvidersClientListPager.NextPage` has been removed +- Function `LoadBalancerSKUName.ToPtr` has been removed +- Function `*RoutesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*DdosCustomPoliciesClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*SubnetsClientListPager.PageResponse` has been removed +- Function `*VirtualNetworksClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `ExpressRouteGatewaysClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `PcStatus.ToPtr` has been removed +- Function `*FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*VPNConnectionsClientListByVPNGatewayPager.Err` has been removed +- Function `*ExpressRoutePortsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*VPNLinkConnectionsClientListByVPNConnectionPager.Err` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller.Poll` has been removed +- Function `*VPNServerConfigurationsClientListByResourceGroupPager.NextPage` has been removed +- Function `ExpressRouteCircuitsClientListArpTablePollerResponse.PollUntilDone` has been removed +- Function `*ConnectionMonitorsClientDeletePoller.FinalResponse` has been removed +- Function `*SecurityGroupsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller.ResumeToken` has been removed +- Function `LoadBalancerOutboundRuleProtocol.ToPtr` has been removed +- Function `VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse.PollUntilDone` has been removed +- Function `*ServiceEndpointPolicyDefinitionsClientDeletePoller.FinalResponse` has been removed +- Function `*VPNGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*BastionHostsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*IPAllocationsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VirtualHubIPConfigurationClientListPager.Err` has been removed +- Function `*ServiceEndpointPoliciesClientListPager.PageResponse` has been removed +- Function `VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse.PollUntilDone` has been removed +- Function `*WebApplicationFirewallPoliciesClientListPager.PageResponse` has been removed +- Function `*BastionHostsClientListPager.PageResponse` has been removed +- Function `*ApplicationGatewaysClientCreateOrUpdatePoller.Poll` has been removed +- Function `*VirtualHubsClientListPager.Err` has been removed +- Function `WebApplicationFirewallMode.ToPtr` has been removed +- Function `*PacketCapturesClientCreatePoller.Done` has been removed +- Function `*IPGroupsClientDeletePoller.Poll` has been removed +- Function `*FirewallPoliciesClientDeletePoller.FinalResponse` has been removed +- Function `*VPNGatewaysClientUpdateTagsPoller.Done` has been removed +- Function `VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse.PollUntilDone` has been removed +- Function `*RoutingIntentClientDeletePoller.ResumeToken` has been removed +- Function `*VirtualApplianceSitesClientCreateOrUpdatePoller.Poll` has been removed +- Function `*RouteTablesClientDeletePoller.Done` has been removed +- Function `*AzureFirewallsClientListPager.Err` has been removed +- Function `*InboundNatRulesClientDeletePoller.Poll` has been removed +- Function `*VPNGatewaysClientUpdateTagsPoller.Poll` has been removed +- Function `*VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller.Poll` has been removed +- Function `*AvailableEndpointServicesClientListPager.Err` has been removed +- Function `*ExpressRoutePortsClientListPager.NextPage` has been removed +- Function `*SubnetsClientDeletePoller.Done` has been removed +- Function `*PrivateEndpointsClientListBySubscriptionPager.NextPage` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller.Poll` has been removed +- Function `*ExpressRouteGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*BastionHostsClientCreateOrUpdatePoller.Poll` has been removed +- Function `*ExpressRoutePortsLocationsClientListPager.PageResponse` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller.Poll` has been removed +- Function `*SecurityPartnerProvidersClientListPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller.Done` has been removed +- Function `*VirtualNetworkGatewaysClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `InterfaceTapConfigurationsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*InterfacesClientListCloudServiceNetworkInterfacesPager.NextPage` has been removed +- Function `*DscpConfigurationClientCreateOrUpdatePoller.Done` has been removed +- Function `*ManagementClientGetBastionShareableLinkPager.Err` has been removed +- Function `*FlowLogsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `VPNGatewaysClientResetPollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse.Resume` has been removed +- Function `*VPNGatewaysClientListPager.Err` has been removed +- Function `*ExpressRouteCrossConnectionsClientListArpTablePoller.Done` has been removed +- Function `*ApplicationSecurityGroupsClientDeletePoller.ResumeToken` has been removed +- Function `NatRulesClientCreateOrUpdatePollerResponse.PollUntilDone` has been removed +- Function `*VirtualHubBgpConnectionClientDeletePoller.Poll` has been removed +- Function `*InterfacesClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `ApplicationGatewayOperationalState.ToPtr` has been removed +- Function `*VirtualNetworkGatewaysClientDeletePoller.FinalResponse` has been removed +- Function `*VirtualNetworkGatewayNatRulesClientDeletePoller.Poll` has been removed +- Function `*WatchersClientGetAzureReachabilityReportPoller.ResumeToken` has been removed +- Function `*VirtualNetworkGatewaysClientStartPacketCapturePoller.Done` has been removed +- Function `*AzureFirewallsClientListAllPager.PageResponse` has been removed +- Function `*ServiceEndpointPoliciesClientListByResourceGroupPager.PageResponse` has been removed +- Function `WatchersClientGetTroubleshootingResultPollerResponse.PollUntilDone` has been removed +- Function `*ExpressRouteConnectionsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ExpressRouteCircuitsClientListArpTablePollerResponse.Resume` has been removed +- Function `*LoadBalancerOutboundRulesClientListPager.Err` has been removed +- Function `IPVersion.ToPtr` has been removed +- Function `*PrivateDNSZoneGroupsClientDeletePoller.Done` has been removed +- Function `*HubVirtualNetworkConnectionsClientCreateOrUpdatePoller.Done` has been removed +- Function `*VPNGatewaysClientListByResourceGroupPager.Err` has been removed +- Function `*WatchersClientGetFlowLogStatusPoller.Done` has been removed +- Function `*ApplicationGatewayPrivateEndpointConnectionsClientListPager.Err` has been removed +- Function `*P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller.ResumeToken` has been removed +- Function `*HubRouteTablesClientListPager.Err` has been removed +- Function `*PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager.NextPage` has been removed +- Function `*VirtualNetworkGatewaysClientResetPoller.Done` has been removed +- Function `*VirtualNetworkTapsClientListAllPager.NextPage` has been removed +- Function `*ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller.Poll` has been removed +- Function `WebApplicationFirewallPolicyResourceState.ToPtr` has been removed +- Function `PreferredIPVersion.ToPtr` has been removed +- Function `*VirtualNetworkTapsClientDeletePoller.Poll` has been removed +- Function `*InterfacesClientListAllPager.Err` has been removed +- Function `*LocalNetworkGatewaysClientListPager.NextPage` has been removed +- Function `*VPNServerConfigurationsClientListPager.Err` has been removed +- Function `*WatchersClientGetNetworkConfigurationDiagnosticPollerResponse.Resume` has been removed +- Function `Direction.ToPtr` has been removed +- Function `*VirtualNetworksClientDeletePoller.Done` has been removed +- Function `*InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*PublicIPAddressesClientDeletePollerResponse.Resume` has been removed +- Function `*LoadBalancersClientDeletePoller.Poll` has been removed +- Function `PrivateEndpointsClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*IPAllocationsClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*ApplicationSecurityGroupsClientCreateOrUpdatePoller.ResumeToken` has been removed +- Function `*SecurityGroupsClientListPager.Err` has been removed +- Function `NatGatewaySKUName.ToPtr` has been removed +- Function `*VirtualRoutersClientListPager.Err` has been removed +- Function `*VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse.Resume` has been removed +- Function `*VPNSitesConfigurationClientDownloadPoller.Done` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller.ResumeToken` has been removed +- Function `*VPNServerConfigurationsClientListByResourceGroupPager.Err` has been removed +- Function `*VirtualHubsClientListByResourceGroupPager.PageResponse` has been removed +- Function `*PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller.FinalResponse` has been removed +- Function `*SecurityRulesClientDeletePollerResponse.Resume` has been removed +- Function `*VirtualNetworkGatewayConnectionsClientResetConnectionPoller.Poll` has been removed +- Function `*IPAllocationsClientListPager.PageResponse` has been removed +- Function `*AvailableDelegationsClientListPager.PageResponse` has been removed +- Function `*PublicIPPrefixesClientDeletePollerResponse.Resume` has been removed +- Function `NetworkOperationStatus.ToPtr` has been removed +- Function `*VirtualWansClientListByResourceGroupPager.NextPage` has been removed +- Function `*ApplicationSecurityGroupsClientDeletePoller.Poll` has been removed +- Function `NatGatewaysClientDeletePollerResponse.PollUntilDone` has been removed +- Function `*ApplicationGatewaysClientStopPoller.FinalResponse` has been removed +- Function `*P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller.FinalResponse` has been removed +- Function `*ExpressRoutePortsClientDeletePoller.Done` has been removed +- Function `*AzureFirewallsClientUpdateTagsPoller.Done` has been removed +- Function `*VPNServerConfigurationsClientCreateOrUpdatePoller.FinalResponse` has been removed +- Function `WatchersClientGetVMSecurityRulesPollerResponse.PollUntilDone` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientGetResult` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientListPager` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientListResult` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse` has been removed +- Struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult` has been removed +- Struct `ApplicationGatewayPrivateLinkResourcesClientListPager` has been removed +- Struct `ApplicationGatewayPrivateLinkResourcesClientListResult` has been removed +- Struct `ApplicationGatewaysClientBackendHealthOnDemandPoller` has been removed +- Struct `ApplicationGatewaysClientBackendHealthOnDemandPollerResponse` has been removed +- Struct `ApplicationGatewaysClientBackendHealthOnDemandResult` has been removed +- Struct `ApplicationGatewaysClientBackendHealthPoller` has been removed +- Struct `ApplicationGatewaysClientBackendHealthPollerResponse` has been removed +- Struct `ApplicationGatewaysClientBackendHealthResult` has been removed +- Struct `ApplicationGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `ApplicationGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `ApplicationGatewaysClientCreateOrUpdateResult` has been removed +- Struct `ApplicationGatewaysClientDeletePoller` has been removed +- Struct `ApplicationGatewaysClientDeletePollerResponse` has been removed +- Struct `ApplicationGatewaysClientGetResult` has been removed +- Struct `ApplicationGatewaysClientGetSSLPredefinedPolicyResult` has been removed +- Struct `ApplicationGatewaysClientListAllPager` has been removed +- Struct `ApplicationGatewaysClientListAllResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableRequestHeadersResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableResponseHeadersResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableSSLOptionsResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager` has been removed +- Struct `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableServerVariablesResult` has been removed +- Struct `ApplicationGatewaysClientListAvailableWafRuleSetsResult` has been removed +- Struct `ApplicationGatewaysClientListPager` has been removed +- Struct `ApplicationGatewaysClientListResult` has been removed +- Struct `ApplicationGatewaysClientStartPoller` has been removed +- Struct `ApplicationGatewaysClientStartPollerResponse` has been removed +- Struct `ApplicationGatewaysClientStopPoller` has been removed +- Struct `ApplicationGatewaysClientStopPollerResponse` has been removed +- Struct `ApplicationGatewaysClientUpdateTagsResult` has been removed +- Struct `ApplicationSecurityGroupsClientCreateOrUpdatePoller` has been removed +- Struct `ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ApplicationSecurityGroupsClientCreateOrUpdateResult` has been removed +- Struct `ApplicationSecurityGroupsClientDeletePoller` has been removed +- Struct `ApplicationSecurityGroupsClientDeletePollerResponse` has been removed +- Struct `ApplicationSecurityGroupsClientGetResult` has been removed +- Struct `ApplicationSecurityGroupsClientListAllPager` has been removed +- Struct `ApplicationSecurityGroupsClientListAllResult` has been removed +- Struct `ApplicationSecurityGroupsClientListPager` has been removed +- Struct `ApplicationSecurityGroupsClientListResult` has been removed +- Struct `ApplicationSecurityGroupsClientUpdateTagsResult` has been removed +- Struct `AvailableDelegationsClientListPager` has been removed +- Struct `AvailableDelegationsClientListResult` has been removed +- Struct `AvailableEndpointServicesClientListPager` has been removed +- Struct `AvailableEndpointServicesClientListResult` has been removed +- Struct `AvailablePrivateEndpointTypesClientListByResourceGroupPager` has been removed +- Struct `AvailablePrivateEndpointTypesClientListByResourceGroupResult` has been removed +- Struct `AvailablePrivateEndpointTypesClientListPager` has been removed +- Struct `AvailablePrivateEndpointTypesClientListResult` has been removed +- Struct `AvailableResourceGroupDelegationsClientListPager` has been removed +- Struct `AvailableResourceGroupDelegationsClientListResult` has been removed +- Struct `AvailableServiceAliasesClientListByResourceGroupPager` has been removed +- Struct `AvailableServiceAliasesClientListByResourceGroupResult` has been removed +- Struct `AvailableServiceAliasesClientListPager` has been removed +- Struct `AvailableServiceAliasesClientListResult` has been removed +- Struct `AzureFirewallFqdnTagsClientListAllPager` has been removed +- Struct `AzureFirewallFqdnTagsClientListAllResult` has been removed +- Struct `AzureFirewallsClientCreateOrUpdatePoller` has been removed +- Struct `AzureFirewallsClientCreateOrUpdatePollerResponse` has been removed +- Struct `AzureFirewallsClientCreateOrUpdateResult` has been removed +- Struct `AzureFirewallsClientDeletePoller` has been removed +- Struct `AzureFirewallsClientDeletePollerResponse` has been removed +- Struct `AzureFirewallsClientGetResult` has been removed +- Struct `AzureFirewallsClientListAllPager` has been removed +- Struct `AzureFirewallsClientListAllResult` has been removed +- Struct `AzureFirewallsClientListPager` has been removed +- Struct `AzureFirewallsClientListResult` has been removed +- Struct `AzureFirewallsClientUpdateTagsPoller` has been removed +- Struct `AzureFirewallsClientUpdateTagsPollerResponse` has been removed +- Struct `AzureFirewallsClientUpdateTagsResult` has been removed +- Struct `BastionHostsClientCreateOrUpdatePoller` has been removed +- Struct `BastionHostsClientCreateOrUpdatePollerResponse` has been removed +- Struct `BastionHostsClientCreateOrUpdateResult` has been removed +- Struct `BastionHostsClientDeletePoller` has been removed +- Struct `BastionHostsClientDeletePollerResponse` has been removed +- Struct `BastionHostsClientGetResult` has been removed +- Struct `BastionHostsClientListByResourceGroupPager` has been removed +- Struct `BastionHostsClientListByResourceGroupResult` has been removed +- Struct `BastionHostsClientListPager` has been removed +- Struct `BastionHostsClientListResult` has been removed +- Struct `BastionHostsClientUpdateTagsPoller` has been removed +- Struct `BastionHostsClientUpdateTagsPollerResponse` has been removed +- Struct `BastionHostsClientUpdateTagsResult` has been removed +- Struct `BgpServiceCommunitiesClientListPager` has been removed +- Struct `BgpServiceCommunitiesClientListResult` has been removed +- Struct `ConnectionMonitorsClientCreateOrUpdatePoller` has been removed +- Struct `ConnectionMonitorsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ConnectionMonitorsClientCreateOrUpdateResult` has been removed +- Struct `ConnectionMonitorsClientDeletePoller` has been removed +- Struct `ConnectionMonitorsClientDeletePollerResponse` has been removed +- Struct `ConnectionMonitorsClientGetResult` has been removed +- Struct `ConnectionMonitorsClientListResult` has been removed +- Struct `ConnectionMonitorsClientQueryPoller` has been removed +- Struct `ConnectionMonitorsClientQueryPollerResponse` has been removed +- Struct `ConnectionMonitorsClientQueryResult` has been removed +- Struct `ConnectionMonitorsClientStartPoller` has been removed +- Struct `ConnectionMonitorsClientStartPollerResponse` has been removed +- Struct `ConnectionMonitorsClientStopPoller` has been removed +- Struct `ConnectionMonitorsClientStopPollerResponse` has been removed +- Struct `ConnectionMonitorsClientUpdateTagsResult` has been removed +- Struct `CustomIPPrefixesClientCreateOrUpdatePoller` has been removed +- Struct `CustomIPPrefixesClientCreateOrUpdatePollerResponse` has been removed +- Struct `CustomIPPrefixesClientCreateOrUpdateResult` has been removed +- Struct `CustomIPPrefixesClientDeletePoller` has been removed +- Struct `CustomIPPrefixesClientDeletePollerResponse` has been removed +- Struct `CustomIPPrefixesClientGetResult` has been removed +- Struct `CustomIPPrefixesClientListAllPager` has been removed +- Struct `CustomIPPrefixesClientListAllResult` has been removed +- Struct `CustomIPPrefixesClientListPager` has been removed +- Struct `CustomIPPrefixesClientListResult` has been removed +- Struct `CustomIPPrefixesClientUpdateTagsResult` has been removed +- Struct `DdosCustomPoliciesClientCreateOrUpdatePoller` has been removed +- Struct `DdosCustomPoliciesClientCreateOrUpdatePollerResponse` has been removed +- Struct `DdosCustomPoliciesClientCreateOrUpdateResult` has been removed +- Struct `DdosCustomPoliciesClientDeletePoller` has been removed +- Struct `DdosCustomPoliciesClientDeletePollerResponse` has been removed +- Struct `DdosCustomPoliciesClientGetResult` has been removed +- Struct `DdosCustomPoliciesClientUpdateTagsResult` has been removed +- Struct `DdosProtectionPlansClientCreateOrUpdatePoller` has been removed +- Struct `DdosProtectionPlansClientCreateOrUpdatePollerResponse` has been removed +- Struct `DdosProtectionPlansClientCreateOrUpdateResult` has been removed +- Struct `DdosProtectionPlansClientDeletePoller` has been removed +- Struct `DdosProtectionPlansClientDeletePollerResponse` has been removed +- Struct `DdosProtectionPlansClientGetResult` has been removed +- Struct `DdosProtectionPlansClientListByResourceGroupPager` has been removed +- Struct `DdosProtectionPlansClientListByResourceGroupResult` has been removed +- Struct `DdosProtectionPlansClientListPager` has been removed +- Struct `DdosProtectionPlansClientListResult` has been removed +- Struct `DdosProtectionPlansClientUpdateTagsResult` has been removed +- Struct `DefaultSecurityRulesClientGetResult` has been removed +- Struct `DefaultSecurityRulesClientListPager` has been removed +- Struct `DefaultSecurityRulesClientListResult` has been removed +- Struct `DscpConfigurationClientCreateOrUpdatePoller` has been removed +- Struct `DscpConfigurationClientCreateOrUpdatePollerResponse` has been removed +- Struct `DscpConfigurationClientCreateOrUpdateResult` has been removed +- Struct `DscpConfigurationClientDeletePoller` has been removed +- Struct `DscpConfigurationClientDeletePollerResponse` has been removed +- Struct `DscpConfigurationClientGetResult` has been removed +- Struct `DscpConfigurationClientListAllPager` has been removed +- Struct `DscpConfigurationClientListAllResult` has been removed +- Struct `DscpConfigurationClientListPager` has been removed +- Struct `DscpConfigurationClientListResult` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientDeletePoller` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientGetResult` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientListPager` has been removed +- Struct `ExpressRouteCircuitAuthorizationsClientListResult` has been removed +- Struct `ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCircuitConnectionsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCircuitConnectionsClientDeletePoller` has been removed +- Struct `ExpressRouteCircuitConnectionsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteCircuitConnectionsClientGetResult` has been removed +- Struct `ExpressRouteCircuitConnectionsClientListPager` has been removed +- Struct `ExpressRouteCircuitConnectionsClientListResult` has been removed +- Struct `ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCircuitPeeringsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCircuitPeeringsClientDeletePoller` has been removed +- Struct `ExpressRouteCircuitPeeringsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteCircuitPeeringsClientGetResult` has been removed +- Struct `ExpressRouteCircuitPeeringsClientListPager` has been removed +- Struct `ExpressRouteCircuitPeeringsClientListResult` has been removed +- Struct `ExpressRouteCircuitsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCircuitsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCircuitsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCircuitsClientDeletePoller` has been removed +- Struct `ExpressRouteCircuitsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteCircuitsClientGetPeeringStatsResult` has been removed +- Struct `ExpressRouteCircuitsClientGetResult` has been removed +- Struct `ExpressRouteCircuitsClientGetStatsResult` has been removed +- Struct `ExpressRouteCircuitsClientListAllPager` has been removed +- Struct `ExpressRouteCircuitsClientListAllResult` has been removed +- Struct `ExpressRouteCircuitsClientListArpTablePoller` has been removed +- Struct `ExpressRouteCircuitsClientListArpTablePollerResponse` has been removed +- Struct `ExpressRouteCircuitsClientListArpTableResult` has been removed +- Struct `ExpressRouteCircuitsClientListPager` has been removed +- Struct `ExpressRouteCircuitsClientListResult` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTablePoller` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTablePollerResponse` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTableResult` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTableSummaryPoller` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse` has been removed +- Struct `ExpressRouteCircuitsClientListRoutesTableSummaryResult` has been removed +- Struct `ExpressRouteCircuitsClientUpdateTagsResult` has been removed +- Struct `ExpressRouteConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteConnectionsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteConnectionsClientDeletePoller` has been removed +- Struct `ExpressRouteConnectionsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteConnectionsClientGetResult` has been removed +- Struct `ExpressRouteConnectionsClientListResult` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientDeletePoller` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientGetResult` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientListPager` has been removed +- Struct `ExpressRouteCrossConnectionPeeringsClientListResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientGetResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientListArpTablePoller` has been removed +- Struct `ExpressRouteCrossConnectionsClientListArpTablePollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionsClientListArpTableResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientListByResourceGroupPager` has been removed +- Struct `ExpressRouteCrossConnectionsClientListByResourceGroupResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientListPager` has been removed +- Struct `ExpressRouteCrossConnectionsClientListResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTablePoller` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTableResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse` has been removed +- Struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult` has been removed +- Struct `ExpressRouteCrossConnectionsClientUpdateTagsResult` has been removed +- Struct `ExpressRouteGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRouteGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRouteGatewaysClientCreateOrUpdateResult` has been removed +- Struct `ExpressRouteGatewaysClientDeletePoller` has been removed +- Struct `ExpressRouteGatewaysClientDeletePollerResponse` has been removed +- Struct `ExpressRouteGatewaysClientGetResult` has been removed +- Struct `ExpressRouteGatewaysClientListByResourceGroupResult` has been removed +- Struct `ExpressRouteGatewaysClientListBySubscriptionResult` has been removed +- Struct `ExpressRouteGatewaysClientUpdateTagsPoller` has been removed +- Struct `ExpressRouteGatewaysClientUpdateTagsPollerResponse` has been removed +- Struct `ExpressRouteGatewaysClientUpdateTagsResult` has been removed +- Struct `ExpressRouteLinksClientGetResult` has been removed +- Struct `ExpressRouteLinksClientListPager` has been removed +- Struct `ExpressRouteLinksClientListResult` has been removed +- Struct `ExpressRoutePortsClientCreateOrUpdatePoller` has been removed +- Struct `ExpressRoutePortsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ExpressRoutePortsClientCreateOrUpdateResult` has been removed +- Struct `ExpressRoutePortsClientDeletePoller` has been removed +- Struct `ExpressRoutePortsClientDeletePollerResponse` has been removed +- Struct `ExpressRoutePortsClientGenerateLOAResult` has been removed +- Struct `ExpressRoutePortsClientGetResult` has been removed +- Struct `ExpressRoutePortsClientListByResourceGroupPager` has been removed +- Struct `ExpressRoutePortsClientListByResourceGroupResult` has been removed +- Struct `ExpressRoutePortsClientListPager` has been removed +- Struct `ExpressRoutePortsClientListResult` has been removed +- Struct `ExpressRoutePortsClientUpdateTagsResult` has been removed +- Struct `ExpressRoutePortsLocationsClientGetResult` has been removed +- Struct `ExpressRoutePortsLocationsClientListPager` has been removed +- Struct `ExpressRoutePortsLocationsClientListResult` has been removed +- Struct `ExpressRouteServiceProvidersClientListPager` has been removed +- Struct `ExpressRouteServiceProvidersClientListResult` has been removed +- Struct `FirewallPoliciesClientCreateOrUpdatePoller` has been removed +- Struct `FirewallPoliciesClientCreateOrUpdatePollerResponse` has been removed +- Struct `FirewallPoliciesClientCreateOrUpdateResult` has been removed +- Struct `FirewallPoliciesClientDeletePoller` has been removed +- Struct `FirewallPoliciesClientDeletePollerResponse` has been removed +- Struct `FirewallPoliciesClientGetResult` has been removed +- Struct `FirewallPoliciesClientListAllPager` has been removed +- Struct `FirewallPoliciesClientListAllResult` has been removed +- Struct `FirewallPoliciesClientListPager` has been removed +- Struct `FirewallPoliciesClientListResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesClientListResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesFilterValuesClientListResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesOverridesClientGetResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesOverridesClientListResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesOverridesClientPatchResult` has been removed +- Struct `FirewallPolicyIdpsSignaturesOverridesClientPutResult` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientDeletePoller` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientGetResult` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientListPager` has been removed +- Struct `FirewallPolicyRuleCollectionGroupsClientListResult` has been removed +- Struct `FlowLogsClientCreateOrUpdatePoller` has been removed +- Struct `FlowLogsClientCreateOrUpdatePollerResponse` has been removed +- Struct `FlowLogsClientCreateOrUpdateResult` has been removed +- Struct `FlowLogsClientDeletePoller` has been removed +- Struct `FlowLogsClientDeletePollerResponse` has been removed +- Struct `FlowLogsClientGetResult` has been removed +- Struct `FlowLogsClientListPager` has been removed +- Struct `FlowLogsClientListResult` has been removed +- Struct `FlowLogsClientUpdateTagsResult` has been removed +- Struct `HubRouteTablesClientCreateOrUpdatePoller` has been removed +- Struct `HubRouteTablesClientCreateOrUpdatePollerResponse` has been removed +- Struct `HubRouteTablesClientCreateOrUpdateResult` has been removed +- Struct `HubRouteTablesClientDeletePoller` has been removed +- Struct `HubRouteTablesClientDeletePollerResponse` has been removed +- Struct `HubRouteTablesClientGetResult` has been removed +- Struct `HubRouteTablesClientListPager` has been removed +- Struct `HubRouteTablesClientListResult` has been removed +- Struct `HubVirtualNetworkConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `HubVirtualNetworkConnectionsClientCreateOrUpdateResult` has been removed +- Struct `HubVirtualNetworkConnectionsClientDeletePoller` has been removed +- Struct `HubVirtualNetworkConnectionsClientDeletePollerResponse` has been removed +- Struct `HubVirtualNetworkConnectionsClientGetResult` has been removed +- Struct `HubVirtualNetworkConnectionsClientListPager` has been removed +- Struct `HubVirtualNetworkConnectionsClientListResult` has been removed +- Struct `IPAllocationsClientCreateOrUpdatePoller` has been removed +- Struct `IPAllocationsClientCreateOrUpdatePollerResponse` has been removed +- Struct `IPAllocationsClientCreateOrUpdateResult` has been removed +- Struct `IPAllocationsClientDeletePoller` has been removed +- Struct `IPAllocationsClientDeletePollerResponse` has been removed +- Struct `IPAllocationsClientGetResult` has been removed +- Struct `IPAllocationsClientListByResourceGroupPager` has been removed +- Struct `IPAllocationsClientListByResourceGroupResult` has been removed +- Struct `IPAllocationsClientListPager` has been removed +- Struct `IPAllocationsClientListResult` has been removed +- Struct `IPAllocationsClientUpdateTagsResult` has been removed +- Struct `IPGroupsClientCreateOrUpdatePoller` has been removed +- Struct `IPGroupsClientCreateOrUpdatePollerResponse` has been removed +- Struct `IPGroupsClientCreateOrUpdateResult` has been removed +- Struct `IPGroupsClientDeletePoller` has been removed +- Struct `IPGroupsClientDeletePollerResponse` has been removed +- Struct `IPGroupsClientGetResult` has been removed +- Struct `IPGroupsClientListByResourceGroupPager` has been removed +- Struct `IPGroupsClientListByResourceGroupResult` has been removed +- Struct `IPGroupsClientListPager` has been removed +- Struct `IPGroupsClientListResult` has been removed +- Struct `IPGroupsClientUpdateGroupsResult` has been removed +- Struct `InboundNatRulesClientCreateOrUpdatePoller` has been removed +- Struct `InboundNatRulesClientCreateOrUpdatePollerResponse` has been removed +- Struct `InboundNatRulesClientCreateOrUpdateResult` has been removed +- Struct `InboundNatRulesClientDeletePoller` has been removed +- Struct `InboundNatRulesClientDeletePollerResponse` has been removed +- Struct `InboundNatRulesClientGetResult` has been removed +- Struct `InboundNatRulesClientListPager` has been removed +- Struct `InboundNatRulesClientListResult` has been removed +- Struct `InboundSecurityRuleClientCreateOrUpdatePoller` has been removed +- Struct `InboundSecurityRuleClientCreateOrUpdatePollerResponse` has been removed +- Struct `InboundSecurityRuleClientCreateOrUpdateResult` has been removed +- Struct `InterfaceIPConfigurationsClientGetResult` has been removed +- Struct `InterfaceIPConfigurationsClientListPager` has been removed +- Struct `InterfaceIPConfigurationsClientListResult` has been removed +- Struct `InterfaceLoadBalancersClientListPager` has been removed +- Struct `InterfaceLoadBalancersClientListResult` has been removed +- Struct `InterfaceTapConfigurationsClientCreateOrUpdatePoller` has been removed +- Struct `InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse` has been removed +- Struct `InterfaceTapConfigurationsClientCreateOrUpdateResult` has been removed +- Struct `InterfaceTapConfigurationsClientDeletePoller` has been removed +- Struct `InterfaceTapConfigurationsClientDeletePollerResponse` has been removed +- Struct `InterfaceTapConfigurationsClientGetResult` has been removed +- Struct `InterfaceTapConfigurationsClientListPager` has been removed +- Struct `InterfaceTapConfigurationsClientListResult` has been removed +- Struct `InterfacesClientCreateOrUpdatePoller` has been removed +- Struct `InterfacesClientCreateOrUpdatePollerResponse` has been removed +- Struct `InterfacesClientCreateOrUpdateResult` has been removed +- Struct `InterfacesClientDeletePoller` has been removed +- Struct `InterfacesClientDeletePollerResponse` has been removed +- Struct `InterfacesClientGetCloudServiceNetworkInterfaceResult` has been removed +- Struct `InterfacesClientGetEffectiveRouteTablePoller` has been removed +- Struct `InterfacesClientGetEffectiveRouteTablePollerResponse` has been removed +- Struct `InterfacesClientGetEffectiveRouteTableResult` has been removed +- Struct `InterfacesClientGetResult` has been removed +- Struct `InterfacesClientGetVirtualMachineScaleSetIPConfigurationResult` has been removed +- Struct `InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult` has been removed +- Struct `InterfacesClientListAllPager` has been removed +- Struct `InterfacesClientListAllResult` has been removed +- Struct `InterfacesClientListCloudServiceNetworkInterfacesPager` has been removed +- Struct `InterfacesClientListCloudServiceNetworkInterfacesResult` has been removed +- Struct `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager` has been removed +- Struct `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResult` has been removed +- Struct `InterfacesClientListEffectiveNetworkSecurityGroupsPoller` has been removed +- Struct `InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse` has been removed +- Struct `InterfacesClientListEffectiveNetworkSecurityGroupsResult` has been removed +- Struct `InterfacesClientListPager` has been removed +- Struct `InterfacesClientListResult` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetIPConfigurationsResult` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResult` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager` has been removed +- Struct `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResult` has been removed +- Struct `InterfacesClientUpdateTagsResult` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientDeletePoller` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientDeletePollerResponse` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientGetResult` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientListPager` has been removed +- Struct `LoadBalancerBackendAddressPoolsClientListResult` has been removed +- Struct `LoadBalancerFrontendIPConfigurationsClientGetResult` has been removed +- Struct `LoadBalancerFrontendIPConfigurationsClientListPager` has been removed +- Struct `LoadBalancerFrontendIPConfigurationsClientListResult` has been removed +- Struct `LoadBalancerLoadBalancingRulesClientGetResult` has been removed +- Struct `LoadBalancerLoadBalancingRulesClientListPager` has been removed +- Struct `LoadBalancerLoadBalancingRulesClientListResult` has been removed +- Struct `LoadBalancerNetworkInterfacesClientListPager` has been removed +- Struct `LoadBalancerNetworkInterfacesClientListResult` has been removed +- Struct `LoadBalancerOutboundRulesClientGetResult` has been removed +- Struct `LoadBalancerOutboundRulesClientListPager` has been removed +- Struct `LoadBalancerOutboundRulesClientListResult` has been removed +- Struct `LoadBalancerProbesClientGetResult` has been removed +- Struct `LoadBalancerProbesClientListPager` has been removed +- Struct `LoadBalancerProbesClientListResult` has been removed +- Struct `LoadBalancersClientCreateOrUpdatePoller` has been removed +- Struct `LoadBalancersClientCreateOrUpdatePollerResponse` has been removed +- Struct `LoadBalancersClientCreateOrUpdateResult` has been removed +- Struct `LoadBalancersClientDeletePoller` has been removed +- Struct `LoadBalancersClientDeletePollerResponse` has been removed +- Struct `LoadBalancersClientGetResult` has been removed +- Struct `LoadBalancersClientListAllPager` has been removed +- Struct `LoadBalancersClientListAllResult` has been removed +- Struct `LoadBalancersClientListInboundNatRulePortMappingsPoller` has been removed +- Struct `LoadBalancersClientListInboundNatRulePortMappingsPollerResponse` has been removed +- Struct `LoadBalancersClientListInboundNatRulePortMappingsResult` has been removed +- Struct `LoadBalancersClientListPager` has been removed +- Struct `LoadBalancersClientListResult` has been removed +- Struct `LoadBalancersClientSwapPublicIPAddressesPoller` has been removed +- Struct `LoadBalancersClientSwapPublicIPAddressesPollerResponse` has been removed +- Struct `LoadBalancersClientUpdateTagsResult` has been removed +- Struct `LocalNetworkGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `LocalNetworkGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `LocalNetworkGatewaysClientCreateOrUpdateResult` has been removed +- Struct `LocalNetworkGatewaysClientDeletePoller` has been removed +- Struct `LocalNetworkGatewaysClientDeletePollerResponse` has been removed +- Struct `LocalNetworkGatewaysClientGetResult` has been removed +- Struct `LocalNetworkGatewaysClientListPager` has been removed +- Struct `LocalNetworkGatewaysClientListResult` has been removed +- Struct `LocalNetworkGatewaysClientUpdateTagsResult` has been removed +- Struct `ManagementClientCheckDNSNameAvailabilityResult` has been removed +- Struct `ManagementClientDeleteBastionShareableLinkPoller` has been removed +- Struct `ManagementClientDeleteBastionShareableLinkPollerResponse` has been removed +- Struct `ManagementClientDisconnectActiveSessionsPager` has been removed +- Struct `ManagementClientDisconnectActiveSessionsResult` has been removed +- Struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller` has been removed +- Struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse` has been removed +- Struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult` has been removed +- Struct `ManagementClientGetActiveSessionsPager` has been removed +- Struct `ManagementClientGetActiveSessionsPoller` has been removed +- Struct `ManagementClientGetActiveSessionsPollerResponse` has been removed +- Struct `ManagementClientGetActiveSessionsResult` has been removed +- Struct `ManagementClientGetBastionShareableLinkPager` has been removed +- Struct `ManagementClientGetBastionShareableLinkResult` has been removed +- Struct `ManagementClientPutBastionShareableLinkPager` has been removed +- Struct `ManagementClientPutBastionShareableLinkPoller` has been removed +- Struct `ManagementClientPutBastionShareableLinkPollerResponse` has been removed +- Struct `ManagementClientPutBastionShareableLinkResult` has been removed +- Struct `ManagementClientSupportedSecurityProvidersResult` has been removed +- Struct `NatGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `NatGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `NatGatewaysClientCreateOrUpdateResult` has been removed +- Struct `NatGatewaysClientDeletePoller` has been removed +- Struct `NatGatewaysClientDeletePollerResponse` has been removed +- Struct `NatGatewaysClientGetResult` has been removed +- Struct `NatGatewaysClientListAllPager` has been removed +- Struct `NatGatewaysClientListAllResult` has been removed +- Struct `NatGatewaysClientListPager` has been removed +- Struct `NatGatewaysClientListResult` has been removed +- Struct `NatGatewaysClientUpdateTagsResult` has been removed +- Struct `NatRulesClientCreateOrUpdatePoller` has been removed +- Struct `NatRulesClientCreateOrUpdatePollerResponse` has been removed +- Struct `NatRulesClientCreateOrUpdateResult` has been removed +- Struct `NatRulesClientDeletePoller` has been removed +- Struct `NatRulesClientDeletePollerResponse` has been removed +- Struct `NatRulesClientGetResult` has been removed +- Struct `NatRulesClientListByVPNGatewayPager` has been removed +- Struct `NatRulesClientListByVPNGatewayResult` has been removed +- Struct `OperationsClientListPager` has been removed +- Struct `OperationsClientListResult` has been removed +- Struct `P2SVPNGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `P2SVPNGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `P2SVPNGatewaysClientCreateOrUpdateResult` has been removed +- Struct `P2SVPNGatewaysClientDeletePoller` has been removed +- Struct `P2SVPNGatewaysClientDeletePollerResponse` has been removed +- Struct `P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller` has been removed +- Struct `P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse` has been removed +- Struct `P2SVPNGatewaysClientGenerateVPNProfilePoller` has been removed +- Struct `P2SVPNGatewaysClientGenerateVPNProfilePollerResponse` has been removed +- Struct `P2SVPNGatewaysClientGenerateVPNProfileResult` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResult` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse` has been removed +- Struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthResult` has been removed +- Struct `P2SVPNGatewaysClientGetResult` has been removed +- Struct `P2SVPNGatewaysClientListByResourceGroupPager` has been removed +- Struct `P2SVPNGatewaysClientListByResourceGroupResult` has been removed +- Struct `P2SVPNGatewaysClientListPager` has been removed +- Struct `P2SVPNGatewaysClientListResult` has been removed +- Struct `P2SVPNGatewaysClientResetPoller` has been removed +- Struct `P2SVPNGatewaysClientResetPollerResponse` has been removed +- Struct `P2SVPNGatewaysClientResetResult` has been removed +- Struct `P2SVPNGatewaysClientUpdateTagsPoller` has been removed +- Struct `P2SVPNGatewaysClientUpdateTagsPollerResponse` has been removed +- Struct `P2SVPNGatewaysClientUpdateTagsResult` has been removed +- Struct `PacketCapturesClientCreatePoller` has been removed +- Struct `PacketCapturesClientCreatePollerResponse` has been removed +- Struct `PacketCapturesClientCreateResult` has been removed +- Struct `PacketCapturesClientDeletePoller` has been removed +- Struct `PacketCapturesClientDeletePollerResponse` has been removed +- Struct `PacketCapturesClientGetResult` has been removed +- Struct `PacketCapturesClientGetStatusPoller` has been removed +- Struct `PacketCapturesClientGetStatusPollerResponse` has been removed +- Struct `PacketCapturesClientGetStatusResult` has been removed +- Struct `PacketCapturesClientListResult` has been removed +- Struct `PacketCapturesClientStopPoller` has been removed +- Struct `PacketCapturesClientStopPollerResponse` has been removed +- Struct `PeerExpressRouteCircuitConnectionsClientGetResult` has been removed +- Struct `PeerExpressRouteCircuitConnectionsClientListPager` has been removed +- Struct `PeerExpressRouteCircuitConnectionsClientListResult` has been removed +- Struct `PrivateDNSZoneGroupsClientCreateOrUpdatePoller` has been removed +- Struct `PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse` has been removed +- Struct `PrivateDNSZoneGroupsClientCreateOrUpdateResult` has been removed +- Struct `PrivateDNSZoneGroupsClientDeletePoller` has been removed +- Struct `PrivateDNSZoneGroupsClientDeletePollerResponse` has been removed +- Struct `PrivateDNSZoneGroupsClientGetResult` has been removed +- Struct `PrivateDNSZoneGroupsClientListPager` has been removed +- Struct `PrivateDNSZoneGroupsClientListResult` has been removed +- Struct `PrivateEndpointsClientCreateOrUpdatePoller` has been removed +- Struct `PrivateEndpointsClientCreateOrUpdatePollerResponse` has been removed +- Struct `PrivateEndpointsClientCreateOrUpdateResult` has been removed +- Struct `PrivateEndpointsClientDeletePoller` has been removed +- Struct `PrivateEndpointsClientDeletePollerResponse` has been removed +- Struct `PrivateEndpointsClientGetResult` has been removed +- Struct `PrivateEndpointsClientListBySubscriptionPager` has been removed +- Struct `PrivateEndpointsClientListBySubscriptionResult` has been removed +- Struct `PrivateEndpointsClientListPager` has been removed +- Struct `PrivateEndpointsClientListResult` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse` has been removed +- Struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult` has been removed +- Struct `PrivateLinkServicesClientCreateOrUpdatePoller` has been removed +- Struct `PrivateLinkServicesClientCreateOrUpdatePollerResponse` has been removed +- Struct `PrivateLinkServicesClientCreateOrUpdateResult` has been removed +- Struct `PrivateLinkServicesClientDeletePoller` has been removed +- Struct `PrivateLinkServicesClientDeletePollerResponse` has been removed +- Struct `PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller` has been removed +- Struct `PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse` has been removed +- Struct `PrivateLinkServicesClientGetPrivateEndpointConnectionResult` has been removed +- Struct `PrivateLinkServicesClientGetResult` has been removed +- Struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager` has been removed +- Struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResult` has been removed +- Struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager` has been removed +- Struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResult` has been removed +- Struct `PrivateLinkServicesClientListBySubscriptionPager` has been removed +- Struct `PrivateLinkServicesClientListBySubscriptionResult` has been removed +- Struct `PrivateLinkServicesClientListPager` has been removed +- Struct `PrivateLinkServicesClientListPrivateEndpointConnectionsPager` has been removed +- Struct `PrivateLinkServicesClientListPrivateEndpointConnectionsResult` has been removed +- Struct `PrivateLinkServicesClientListResult` has been removed +- Struct `PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult` has been removed +- Struct `ProfilesClientCreateOrUpdateResult` has been removed +- Struct `ProfilesClientDeletePoller` has been removed +- Struct `ProfilesClientDeletePollerResponse` has been removed +- Struct `ProfilesClientGetResult` has been removed +- Struct `ProfilesClientListAllPager` has been removed +- Struct `ProfilesClientListAllResult` has been removed +- Struct `ProfilesClientListPager` has been removed +- Struct `ProfilesClientListResult` has been removed +- Struct `ProfilesClientUpdateTagsResult` has been removed +- Struct `PublicIPAddressesClientCreateOrUpdatePoller` has been removed +- Struct `PublicIPAddressesClientCreateOrUpdatePollerResponse` has been removed +- Struct `PublicIPAddressesClientCreateOrUpdateResult` has been removed +- Struct `PublicIPAddressesClientDeletePoller` has been removed +- Struct `PublicIPAddressesClientDeletePollerResponse` has been removed +- Struct `PublicIPAddressesClientGetCloudServicePublicIPAddressResult` has been removed +- Struct `PublicIPAddressesClientGetResult` has been removed +- Struct `PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult` has been removed +- Struct `PublicIPAddressesClientListAllPager` has been removed +- Struct `PublicIPAddressesClientListAllResult` has been removed +- Struct `PublicIPAddressesClientListCloudServicePublicIPAddressesPager` has been removed +- Struct `PublicIPAddressesClientListCloudServicePublicIPAddressesResult` has been removed +- Struct `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager` has been removed +- Struct `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResult` has been removed +- Struct `PublicIPAddressesClientListPager` has been removed +- Struct `PublicIPAddressesClientListResult` has been removed +- Struct `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager` has been removed +- Struct `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResult` has been removed +- Struct `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager` has been removed +- Struct `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResult` has been removed +- Struct `PublicIPAddressesClientUpdateTagsResult` has been removed +- Struct `PublicIPPrefixesClientCreateOrUpdatePoller` has been removed +- Struct `PublicIPPrefixesClientCreateOrUpdatePollerResponse` has been removed +- Struct `PublicIPPrefixesClientCreateOrUpdateResult` has been removed +- Struct `PublicIPPrefixesClientDeletePoller` has been removed +- Struct `PublicIPPrefixesClientDeletePollerResponse` has been removed +- Struct `PublicIPPrefixesClientGetResult` has been removed +- Struct `PublicIPPrefixesClientListAllPager` has been removed +- Struct `PublicIPPrefixesClientListAllResult` has been removed +- Struct `PublicIPPrefixesClientListPager` has been removed +- Struct `PublicIPPrefixesClientListResult` has been removed +- Struct `PublicIPPrefixesClientUpdateTagsResult` has been removed +- Struct `ResourceNavigationLinksClientListResult` has been removed +- Struct `RouteFilterRulesClientCreateOrUpdatePoller` has been removed +- Struct `RouteFilterRulesClientCreateOrUpdatePollerResponse` has been removed +- Struct `RouteFilterRulesClientCreateOrUpdateResult` has been removed +- Struct `RouteFilterRulesClientDeletePoller` has been removed +- Struct `RouteFilterRulesClientDeletePollerResponse` has been removed +- Struct `RouteFilterRulesClientGetResult` has been removed +- Struct `RouteFilterRulesClientListByRouteFilterPager` has been removed +- Struct `RouteFilterRulesClientListByRouteFilterResult` has been removed +- Struct `RouteFiltersClientCreateOrUpdatePoller` has been removed +- Struct `RouteFiltersClientCreateOrUpdatePollerResponse` has been removed +- Struct `RouteFiltersClientCreateOrUpdateResult` has been removed +- Struct `RouteFiltersClientDeletePoller` has been removed +- Struct `RouteFiltersClientDeletePollerResponse` has been removed +- Struct `RouteFiltersClientGetResult` has been removed +- Struct `RouteFiltersClientListByResourceGroupPager` has been removed +- Struct `RouteFiltersClientListByResourceGroupResult` has been removed +- Struct `RouteFiltersClientListPager` has been removed +- Struct `RouteFiltersClientListResult` has been removed +- Struct `RouteFiltersClientUpdateTagsResult` has been removed +- Struct `RouteTablesClientCreateOrUpdatePoller` has been removed +- Struct `RouteTablesClientCreateOrUpdatePollerResponse` has been removed +- Struct `RouteTablesClientCreateOrUpdateResult` has been removed +- Struct `RouteTablesClientDeletePoller` has been removed +- Struct `RouteTablesClientDeletePollerResponse` has been removed +- Struct `RouteTablesClientGetResult` has been removed +- Struct `RouteTablesClientListAllPager` has been removed +- Struct `RouteTablesClientListAllResult` has been removed +- Struct `RouteTablesClientListPager` has been removed +- Struct `RouteTablesClientListResult` has been removed +- Struct `RouteTablesClientUpdateTagsResult` has been removed +- Struct `RoutesClientCreateOrUpdatePoller` has been removed +- Struct `RoutesClientCreateOrUpdatePollerResponse` has been removed +- Struct `RoutesClientCreateOrUpdateResult` has been removed +- Struct `RoutesClientDeletePoller` has been removed +- Struct `RoutesClientDeletePollerResponse` has been removed +- Struct `RoutesClientGetResult` has been removed +- Struct `RoutesClientListPager` has been removed +- Struct `RoutesClientListResult` has been removed +- Struct `RoutingIntentClientCreateOrUpdatePoller` has been removed +- Struct `RoutingIntentClientCreateOrUpdatePollerResponse` has been removed +- Struct `RoutingIntentClientCreateOrUpdateResult` has been removed +- Struct `RoutingIntentClientDeletePoller` has been removed +- Struct `RoutingIntentClientDeletePollerResponse` has been removed +- Struct `RoutingIntentClientGetResult` has been removed +- Struct `RoutingIntentClientListPager` has been removed +- Struct `RoutingIntentClientListResult` has been removed +- Struct `SecurityGroupsClientCreateOrUpdatePoller` has been removed +- Struct `SecurityGroupsClientCreateOrUpdatePollerResponse` has been removed +- Struct `SecurityGroupsClientCreateOrUpdateResult` has been removed +- Struct `SecurityGroupsClientDeletePoller` has been removed +- Struct `SecurityGroupsClientDeletePollerResponse` has been removed +- Struct `SecurityGroupsClientGetResult` has been removed +- Struct `SecurityGroupsClientListAllPager` has been removed +- Struct `SecurityGroupsClientListAllResult` has been removed +- Struct `SecurityGroupsClientListPager` has been removed +- Struct `SecurityGroupsClientListResult` has been removed +- Struct `SecurityGroupsClientUpdateTagsResult` has been removed +- Struct `SecurityPartnerProvidersClientCreateOrUpdatePoller` has been removed +- Struct `SecurityPartnerProvidersClientCreateOrUpdatePollerResponse` has been removed +- Struct `SecurityPartnerProvidersClientCreateOrUpdateResult` has been removed +- Struct `SecurityPartnerProvidersClientDeletePoller` has been removed +- Struct `SecurityPartnerProvidersClientDeletePollerResponse` has been removed +- Struct `SecurityPartnerProvidersClientGetResult` has been removed +- Struct `SecurityPartnerProvidersClientListByResourceGroupPager` has been removed +- Struct `SecurityPartnerProvidersClientListByResourceGroupResult` has been removed +- Struct `SecurityPartnerProvidersClientListPager` has been removed +- Struct `SecurityPartnerProvidersClientListResult` has been removed +- Struct `SecurityPartnerProvidersClientUpdateTagsResult` has been removed +- Struct `SecurityRulesClientCreateOrUpdatePoller` has been removed +- Struct `SecurityRulesClientCreateOrUpdatePollerResponse` has been removed +- Struct `SecurityRulesClientCreateOrUpdateResult` has been removed +- Struct `SecurityRulesClientDeletePoller` has been removed +- Struct `SecurityRulesClientDeletePollerResponse` has been removed +- Struct `SecurityRulesClientGetResult` has been removed +- Struct `SecurityRulesClientListPager` has been removed +- Struct `SecurityRulesClientListResult` has been removed +- Struct `ServiceAssociationLinksClientListResult` has been removed +- Struct `ServiceEndpointPoliciesClientCreateOrUpdatePoller` has been removed +- Struct `ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse` has been removed +- Struct `ServiceEndpointPoliciesClientCreateOrUpdateResult` has been removed +- Struct `ServiceEndpointPoliciesClientDeletePoller` has been removed +- Struct `ServiceEndpointPoliciesClientDeletePollerResponse` has been removed +- Struct `ServiceEndpointPoliciesClientGetResult` has been removed +- Struct `ServiceEndpointPoliciesClientListByResourceGroupPager` has been removed +- Struct `ServiceEndpointPoliciesClientListByResourceGroupResult` has been removed +- Struct `ServiceEndpointPoliciesClientListPager` has been removed +- Struct `ServiceEndpointPoliciesClientListResult` has been removed +- Struct `ServiceEndpointPoliciesClientUpdateTagsResult` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientDeletePoller` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientDeletePollerResponse` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientGetResult` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager` has been removed +- Struct `ServiceEndpointPolicyDefinitionsClientListByResourceGroupResult` has been removed +- Struct `ServiceTagInformationClientListPager` has been removed +- Struct `ServiceTagInformationClientListResult` has been removed +- Struct `ServiceTagsClientListResult` has been removed +- Struct `SubnetsClientCreateOrUpdatePoller` has been removed +- Struct `SubnetsClientCreateOrUpdatePollerResponse` has been removed +- Struct `SubnetsClientCreateOrUpdateResult` has been removed +- Struct `SubnetsClientDeletePoller` has been removed +- Struct `SubnetsClientDeletePollerResponse` has been removed +- Struct `SubnetsClientGetResult` has been removed +- Struct `SubnetsClientListPager` has been removed +- Struct `SubnetsClientListResult` has been removed +- Struct `SubnetsClientPrepareNetworkPoliciesPoller` has been removed +- Struct `SubnetsClientPrepareNetworkPoliciesPollerResponse` has been removed +- Struct `SubnetsClientUnprepareNetworkPoliciesPoller` has been removed +- Struct `SubnetsClientUnprepareNetworkPoliciesPollerResponse` has been removed +- Struct `UsagesClientListPager` has been removed +- Struct `UsagesClientListResult` has been removed +- Struct `VPNConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `VPNConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VPNConnectionsClientCreateOrUpdateResult` has been removed +- Struct `VPNConnectionsClientDeletePoller` has been removed +- Struct `VPNConnectionsClientDeletePollerResponse` has been removed +- Struct `VPNConnectionsClientGetResult` has been removed +- Struct `VPNConnectionsClientListByVPNGatewayPager` has been removed +- Struct `VPNConnectionsClientListByVPNGatewayResult` has been removed +- Struct `VPNConnectionsClientStartPacketCapturePoller` has been removed +- Struct `VPNConnectionsClientStartPacketCapturePollerResponse` has been removed +- Struct `VPNConnectionsClientStartPacketCaptureResult` has been removed +- Struct `VPNConnectionsClientStopPacketCapturePoller` has been removed +- Struct `VPNConnectionsClientStopPacketCapturePollerResponse` has been removed +- Struct `VPNConnectionsClientStopPacketCaptureResult` has been removed +- Struct `VPNGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `VPNGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `VPNGatewaysClientCreateOrUpdateResult` has been removed +- Struct `VPNGatewaysClientDeletePoller` has been removed +- Struct `VPNGatewaysClientDeletePollerResponse` has been removed +- Struct `VPNGatewaysClientGetResult` has been removed +- Struct `VPNGatewaysClientListByResourceGroupPager` has been removed +- Struct `VPNGatewaysClientListByResourceGroupResult` has been removed +- Struct `VPNGatewaysClientListPager` has been removed +- Struct `VPNGatewaysClientListResult` has been removed +- Struct `VPNGatewaysClientResetPoller` has been removed +- Struct `VPNGatewaysClientResetPollerResponse` has been removed +- Struct `VPNGatewaysClientResetResult` has been removed +- Struct `VPNGatewaysClientStartPacketCapturePoller` has been removed +- Struct `VPNGatewaysClientStartPacketCapturePollerResponse` has been removed +- Struct `VPNGatewaysClientStartPacketCaptureResult` has been removed +- Struct `VPNGatewaysClientStopPacketCapturePoller` has been removed +- Struct `VPNGatewaysClientStopPacketCapturePollerResponse` has been removed +- Struct `VPNGatewaysClientStopPacketCaptureResult` has been removed +- Struct `VPNGatewaysClientUpdateTagsPoller` has been removed +- Struct `VPNGatewaysClientUpdateTagsPollerResponse` has been removed +- Struct `VPNGatewaysClientUpdateTagsResult` has been removed +- Struct `VPNLinkConnectionsClientGetIkeSasPoller` has been removed +- Struct `VPNLinkConnectionsClientGetIkeSasPollerResponse` has been removed +- Struct `VPNLinkConnectionsClientGetIkeSasResult` has been removed +- Struct `VPNLinkConnectionsClientListByVPNConnectionPager` has been removed +- Struct `VPNLinkConnectionsClientListByVPNConnectionResult` has been removed +- Struct `VPNLinkConnectionsClientResetConnectionPoller` has been removed +- Struct `VPNLinkConnectionsClientResetConnectionPollerResponse` has been removed +- Struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller` has been removed +- Struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse` has been removed +- Struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListResult` has been removed +- Struct `VPNServerConfigurationsClientCreateOrUpdatePoller` has been removed +- Struct `VPNServerConfigurationsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VPNServerConfigurationsClientCreateOrUpdateResult` has been removed +- Struct `VPNServerConfigurationsClientDeletePoller` has been removed +- Struct `VPNServerConfigurationsClientDeletePollerResponse` has been removed +- Struct `VPNServerConfigurationsClientGetResult` has been removed +- Struct `VPNServerConfigurationsClientListByResourceGroupPager` has been removed +- Struct `VPNServerConfigurationsClientListByResourceGroupResult` has been removed +- Struct `VPNServerConfigurationsClientListPager` has been removed +- Struct `VPNServerConfigurationsClientListResult` has been removed +- Struct `VPNServerConfigurationsClientUpdateTagsResult` has been removed +- Struct `VPNSiteLinkConnectionsClientGetResult` has been removed +- Struct `VPNSiteLinksClientGetResult` has been removed +- Struct `VPNSiteLinksClientListByVPNSitePager` has been removed +- Struct `VPNSiteLinksClientListByVPNSiteResult` has been removed +- Struct `VPNSitesClientCreateOrUpdatePoller` has been removed +- Struct `VPNSitesClientCreateOrUpdatePollerResponse` has been removed +- Struct `VPNSitesClientCreateOrUpdateResult` has been removed +- Struct `VPNSitesClientDeletePoller` has been removed +- Struct `VPNSitesClientDeletePollerResponse` has been removed +- Struct `VPNSitesClientGetResult` has been removed +- Struct `VPNSitesClientListByResourceGroupPager` has been removed +- Struct `VPNSitesClientListByResourceGroupResult` has been removed +- Struct `VPNSitesClientListPager` has been removed +- Struct `VPNSitesClientListResult` has been removed +- Struct `VPNSitesClientUpdateTagsResult` has been removed +- Struct `VPNSitesConfigurationClientDownloadPoller` has been removed +- Struct `VPNSitesConfigurationClientDownloadPollerResponse` has been removed +- Struct `VirtualApplianceSKUsClientGetResult` has been removed +- Struct `VirtualApplianceSKUsClientListPager` has been removed +- Struct `VirtualApplianceSKUsClientListResult` has been removed +- Struct `VirtualApplianceSitesClientCreateOrUpdatePoller` has been removed +- Struct `VirtualApplianceSitesClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualApplianceSitesClientCreateOrUpdateResult` has been removed +- Struct `VirtualApplianceSitesClientDeletePoller` has been removed +- Struct `VirtualApplianceSitesClientDeletePollerResponse` has been removed +- Struct `VirtualApplianceSitesClientGetResult` has been removed +- Struct `VirtualApplianceSitesClientListPager` has been removed +- Struct `VirtualApplianceSitesClientListResult` has been removed +- Struct `VirtualAppliancesClientCreateOrUpdatePoller` has been removed +- Struct `VirtualAppliancesClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualAppliancesClientCreateOrUpdateResult` has been removed +- Struct `VirtualAppliancesClientDeletePoller` has been removed +- Struct `VirtualAppliancesClientDeletePollerResponse` has been removed +- Struct `VirtualAppliancesClientGetResult` has been removed +- Struct `VirtualAppliancesClientListByResourceGroupPager` has been removed +- Struct `VirtualAppliancesClientListByResourceGroupResult` has been removed +- Struct `VirtualAppliancesClientListPager` has been removed +- Struct `VirtualAppliancesClientListResult` has been removed +- Struct `VirtualAppliancesClientUpdateTagsResult` has been removed +- Struct `VirtualHubBgpConnectionClientCreateOrUpdatePoller` has been removed +- Struct `VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualHubBgpConnectionClientCreateOrUpdateResult` has been removed +- Struct `VirtualHubBgpConnectionClientDeletePoller` has been removed +- Struct `VirtualHubBgpConnectionClientDeletePollerResponse` has been removed +- Struct `VirtualHubBgpConnectionClientGetResult` has been removed +- Struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller` has been removed +- Struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse` has been removed +- Struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResult` has been removed +- Struct `VirtualHubBgpConnectionsClientListLearnedRoutesPoller` has been removed +- Struct `VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse` has been removed +- Struct `VirtualHubBgpConnectionsClientListLearnedRoutesResult` has been removed +- Struct `VirtualHubBgpConnectionsClientListPager` has been removed +- Struct `VirtualHubBgpConnectionsClientListResult` has been removed +- Struct `VirtualHubIPConfigurationClientCreateOrUpdatePoller` has been removed +- Struct `VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualHubIPConfigurationClientCreateOrUpdateResult` has been removed +- Struct `VirtualHubIPConfigurationClientDeletePoller` has been removed +- Struct `VirtualHubIPConfigurationClientDeletePollerResponse` has been removed +- Struct `VirtualHubIPConfigurationClientGetResult` has been removed +- Struct `VirtualHubIPConfigurationClientListPager` has been removed +- Struct `VirtualHubIPConfigurationClientListResult` has been removed +- Struct `VirtualHubRouteTableV2SClientCreateOrUpdatePoller` has been removed +- Struct `VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualHubRouteTableV2SClientCreateOrUpdateResult` has been removed +- Struct `VirtualHubRouteTableV2SClientDeletePoller` has been removed +- Struct `VirtualHubRouteTableV2SClientDeletePollerResponse` has been removed +- Struct `VirtualHubRouteTableV2SClientGetResult` has been removed +- Struct `VirtualHubRouteTableV2SClientListPager` has been removed +- Struct `VirtualHubRouteTableV2SClientListResult` has been removed +- Struct `VirtualHubsClientCreateOrUpdatePoller` has been removed +- Struct `VirtualHubsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualHubsClientCreateOrUpdateResult` has been removed +- Struct `VirtualHubsClientDeletePoller` has been removed +- Struct `VirtualHubsClientDeletePollerResponse` has been removed +- Struct `VirtualHubsClientGetEffectiveVirtualHubRoutesPoller` has been removed +- Struct `VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse` has been removed +- Struct `VirtualHubsClientGetResult` has been removed +- Struct `VirtualHubsClientListByResourceGroupPager` has been removed +- Struct `VirtualHubsClientListByResourceGroupResult` has been removed +- Struct `VirtualHubsClientListPager` has been removed +- Struct `VirtualHubsClientListResult` has been removed +- Struct `VirtualHubsClientUpdateTagsResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientDeletePoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientDeletePollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientGetIkeSasPoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientGetIkeSasResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientGetResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientGetSharedKeyResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientListPager` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientListResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientResetConnectionPoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientUpdateTagsPoller` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse` has been removed +- Struct `VirtualNetworkGatewayConnectionsClientUpdateTagsResult` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientDeletePoller` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientDeletePollerResponse` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientGetResult` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager` has been removed +- Struct `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResult` has been removed +- Struct `VirtualNetworkGatewaysClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworkGatewaysClientDeletePoller` has been removed +- Struct `VirtualNetworkGatewaysClientDeletePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller` has been removed +- Struct `VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGenerateVPNProfilePoller` has been removed +- Struct `VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGenerateVPNProfileResult` has been removed +- Struct `VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller` has been removed +- Struct `VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGeneratevpnclientpackageResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetBgpPeerStatusPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetBgpPeerStatusResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetLearnedRoutesPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetLearnedRoutesResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResult` has been removed +- Struct `VirtualNetworkGatewaysClientListConnectionsPager` has been removed +- Struct `VirtualNetworkGatewaysClientListConnectionsResult` has been removed +- Struct `VirtualNetworkGatewaysClientListPager` has been removed +- Struct `VirtualNetworkGatewaysClientListResult` has been removed +- Struct `VirtualNetworkGatewaysClientResetPoller` has been removed +- Struct `VirtualNetworkGatewaysClientResetPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientResetResult` has been removed +- Struct `VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller` has been removed +- Struct `VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller` has been removed +- Struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResult` has been removed +- Struct `VirtualNetworkGatewaysClientStartPacketCapturePoller` has been removed +- Struct `VirtualNetworkGatewaysClientStartPacketCapturePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientStartPacketCaptureResult` has been removed +- Struct `VirtualNetworkGatewaysClientStopPacketCapturePoller` has been removed +- Struct `VirtualNetworkGatewaysClientStopPacketCapturePollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientStopPacketCaptureResult` has been removed +- Struct `VirtualNetworkGatewaysClientSupportedVPNDevicesResult` has been removed +- Struct `VirtualNetworkGatewaysClientUpdateTagsPoller` has been removed +- Struct `VirtualNetworkGatewaysClientUpdateTagsPollerResponse` has been removed +- Struct `VirtualNetworkGatewaysClientUpdateTagsResult` has been removed +- Struct `VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResult` has been removed +- Struct `VirtualNetworkPeeringsClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworkPeeringsClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworkPeeringsClientDeletePoller` has been removed +- Struct `VirtualNetworkPeeringsClientDeletePollerResponse` has been removed +- Struct `VirtualNetworkPeeringsClientGetResult` has been removed +- Struct `VirtualNetworkPeeringsClientListPager` has been removed +- Struct `VirtualNetworkPeeringsClientListResult` has been removed +- Struct `VirtualNetworkTapsClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworkTapsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworkTapsClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworkTapsClientDeletePoller` has been removed +- Struct `VirtualNetworkTapsClientDeletePollerResponse` has been removed +- Struct `VirtualNetworkTapsClientGetResult` has been removed +- Struct `VirtualNetworkTapsClientListAllPager` has been removed +- Struct `VirtualNetworkTapsClientListAllResult` has been removed +- Struct `VirtualNetworkTapsClientListByResourceGroupPager` has been removed +- Struct `VirtualNetworkTapsClientListByResourceGroupResult` has been removed +- Struct `VirtualNetworkTapsClientUpdateTagsResult` has been removed +- Struct `VirtualNetworksClientCheckIPAddressAvailabilityResult` has been removed +- Struct `VirtualNetworksClientCreateOrUpdatePoller` has been removed +- Struct `VirtualNetworksClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualNetworksClientCreateOrUpdateResult` has been removed +- Struct `VirtualNetworksClientDeletePoller` has been removed +- Struct `VirtualNetworksClientDeletePollerResponse` has been removed +- Struct `VirtualNetworksClientGetResult` has been removed +- Struct `VirtualNetworksClientListAllPager` has been removed +- Struct `VirtualNetworksClientListAllResult` has been removed +- Struct `VirtualNetworksClientListPager` has been removed +- Struct `VirtualNetworksClientListResult` has been removed +- Struct `VirtualNetworksClientListUsagePager` has been removed +- Struct `VirtualNetworksClientListUsageResult` has been removed +- Struct `VirtualNetworksClientUpdateTagsResult` has been removed +- Struct `VirtualRouterPeeringsClientCreateOrUpdatePoller` has been removed +- Struct `VirtualRouterPeeringsClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualRouterPeeringsClientCreateOrUpdateResult` has been removed +- Struct `VirtualRouterPeeringsClientDeletePoller` has been removed +- Struct `VirtualRouterPeeringsClientDeletePollerResponse` has been removed +- Struct `VirtualRouterPeeringsClientGetResult` has been removed +- Struct `VirtualRouterPeeringsClientListPager` has been removed +- Struct `VirtualRouterPeeringsClientListResult` has been removed +- Struct `VirtualRoutersClientCreateOrUpdatePoller` has been removed +- Struct `VirtualRoutersClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualRoutersClientCreateOrUpdateResult` has been removed +- Struct `VirtualRoutersClientDeletePoller` has been removed +- Struct `VirtualRoutersClientDeletePollerResponse` has been removed +- Struct `VirtualRoutersClientGetResult` has been removed +- Struct `VirtualRoutersClientListByResourceGroupPager` has been removed +- Struct `VirtualRoutersClientListByResourceGroupResult` has been removed +- Struct `VirtualRoutersClientListPager` has been removed +- Struct `VirtualRoutersClientListResult` has been removed +- Struct `VirtualWansClientCreateOrUpdatePoller` has been removed +- Struct `VirtualWansClientCreateOrUpdatePollerResponse` has been removed +- Struct `VirtualWansClientCreateOrUpdateResult` has been removed +- Struct `VirtualWansClientDeletePoller` has been removed +- Struct `VirtualWansClientDeletePollerResponse` has been removed +- Struct `VirtualWansClientGetResult` has been removed +- Struct `VirtualWansClientListByResourceGroupPager` has been removed +- Struct `VirtualWansClientListByResourceGroupResult` has been removed +- Struct `VirtualWansClientListPager` has been removed +- Struct `VirtualWansClientListResult` has been removed +- Struct `VirtualWansClientUpdateTagsResult` has been removed +- Struct `WatchersClientCheckConnectivityPoller` has been removed +- Struct `WatchersClientCheckConnectivityPollerResponse` has been removed +- Struct `WatchersClientCheckConnectivityResult` has been removed +- Struct `WatchersClientCreateOrUpdateResult` has been removed +- Struct `WatchersClientDeletePoller` has been removed +- Struct `WatchersClientDeletePollerResponse` has been removed +- Struct `WatchersClientGetAzureReachabilityReportPoller` has been removed +- Struct `WatchersClientGetAzureReachabilityReportPollerResponse` has been removed +- Struct `WatchersClientGetAzureReachabilityReportResult` has been removed +- Struct `WatchersClientGetFlowLogStatusPoller` has been removed +- Struct `WatchersClientGetFlowLogStatusPollerResponse` has been removed +- Struct `WatchersClientGetFlowLogStatusResult` has been removed +- Struct `WatchersClientGetNetworkConfigurationDiagnosticPoller` has been removed +- Struct `WatchersClientGetNetworkConfigurationDiagnosticPollerResponse` has been removed +- Struct `WatchersClientGetNetworkConfigurationDiagnosticResult` has been removed +- Struct `WatchersClientGetNextHopPoller` has been removed +- Struct `WatchersClientGetNextHopPollerResponse` has been removed +- Struct `WatchersClientGetNextHopResult` has been removed +- Struct `WatchersClientGetResult` has been removed +- Struct `WatchersClientGetTopologyResult` has been removed +- Struct `WatchersClientGetTroubleshootingPoller` has been removed +- Struct `WatchersClientGetTroubleshootingPollerResponse` has been removed +- Struct `WatchersClientGetTroubleshootingResult` has been removed +- Struct `WatchersClientGetTroubleshootingResultPoller` has been removed +- Struct `WatchersClientGetTroubleshootingResultPollerResponse` has been removed +- Struct `WatchersClientGetTroubleshootingResultResult` has been removed +- Struct `WatchersClientGetVMSecurityRulesPoller` has been removed +- Struct `WatchersClientGetVMSecurityRulesPollerResponse` has been removed +- Struct `WatchersClientGetVMSecurityRulesResult` has been removed +- Struct `WatchersClientListAllResult` has been removed +- Struct `WatchersClientListAvailableProvidersPoller` has been removed +- Struct `WatchersClientListAvailableProvidersPollerResponse` has been removed +- Struct `WatchersClientListAvailableProvidersResult` has been removed +- Struct `WatchersClientListResult` has been removed +- Struct `WatchersClientSetFlowLogConfigurationPoller` has been removed +- Struct `WatchersClientSetFlowLogConfigurationPollerResponse` has been removed +- Struct `WatchersClientSetFlowLogConfigurationResult` has been removed +- Struct `WatchersClientUpdateTagsResult` has been removed +- Struct `WatchersClientVerifyIPFlowPoller` has been removed +- Struct `WatchersClientVerifyIPFlowPollerResponse` has been removed +- Struct `WatchersClientVerifyIPFlowResult` has been removed +- Struct `WebApplicationFirewallPoliciesClientCreateOrUpdateResult` has been removed +- Struct `WebApplicationFirewallPoliciesClientDeletePoller` has been removed +- Struct `WebApplicationFirewallPoliciesClientDeletePollerResponse` has been removed +- Struct `WebApplicationFirewallPoliciesClientGetResult` has been removed +- Struct `WebApplicationFirewallPoliciesClientListAllPager` has been removed +- Struct `WebApplicationFirewallPoliciesClientListAllResult` has been removed +- Struct `WebApplicationFirewallPoliciesClientListPager` has been removed +- Struct `WebApplicationFirewallPoliciesClientListResult` has been removed +- Struct `WebCategoriesClientGetResult` has been removed +- Struct `WebCategoriesClientListBySubscriptionPager` has been removed +- Struct `WebCategoriesClientListBySubscriptionResult` has been removed +- Field `ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult` of struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse` has been removed +- Field `LoadBalancersClientCreateOrUpdateResult` of struct `LoadBalancersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientCreateOrUpdateResponse` has been removed +- Field `FirewallPolicyRuleCollectionGroupsClientGetResult` of struct `FirewallPolicyRuleCollectionGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyRuleCollectionGroupsClientGetResponse` has been removed +- Field `LocalNetworkGatewaysClientUpdateTagsResult` of struct `LocalNetworkGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `LocalNetworkGatewaysClientUpdateTagsResponse` has been removed +- Field `SecurityGroupsClientGetResult` of struct `SecurityGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientGetResponse` has been removed +- Field `IPAllocationsClientListResult` of struct `IPAllocationsClientListResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientListResponse` has been removed +- Field `VPNGatewaysClientCreateOrUpdateResult` of struct `VPNGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientCreateOrUpdateResponse` has been removed +- Field `InterfaceIPConfigurationsClientGetResult` of struct `InterfaceIPConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `InterfaceIPConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientSwapPublicIPAddressesResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientDeleteResponse` has been removed +- Field `VirtualNetworkPeeringsClientGetResult` of struct `VirtualNetworkPeeringsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkPeeringsClientGetResponse` has been removed +- Field `CustomIPPrefixesClientListAllResult` of struct `CustomIPPrefixesClientListAllResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientListAllResponse` has been removed +- Field `ApplicationGatewaysClientBackendHealthResult` of struct `ApplicationGatewaysClientBackendHealthResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientBackendHealthResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientDeleteResponse` has been removed +- Field `SecurityRulesClientListResult` of struct `SecurityRulesClientListResponse` has been removed +- Field `RawResponse` of struct `SecurityRulesClientListResponse` has been removed +- Field `HubRouteTablesClientListResult` of struct `HubRouteTablesClientListResponse` has been removed +- Field `RawResponse` of struct `HubRouteTablesClientListResponse` has been removed +- Field `ExpressRouteGatewaysClientListByResourceGroupResult` of struct `ExpressRouteGatewaysClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientListByResourceGroupResponse` has been removed +- Field `LoadBalancerProbesClientListResult` of struct `LoadBalancerProbesClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerProbesClientListResponse` has been removed +- Field `VirtualNetworkGatewaysClientSupportedVPNDevicesResult` of struct `VirtualNetworkGatewaysClientSupportedVPNDevicesResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientSupportedVPNDevicesResponse` has been removed +- Field `WatchersClientCreateOrUpdateResult` of struct `WatchersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `WatchersClientCreateOrUpdateResponse` has been removed +- Field `ServiceTagsClientListResult` of struct `ServiceTagsClientListResponse` has been removed +- Field `RawResponse` of struct `ServiceTagsClientListResponse` has been removed +- Field `DdosProtectionPlansClientUpdateTagsResult` of struct `DdosProtectionPlansClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientUpdateTagsResponse` has been removed +- Field `PublicIPPrefixesClientGetResult` of struct `PublicIPPrefixesClientGetResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientGetResponse` has been removed +- Field `ExpressRouteCircuitsClientListRoutesTableSummaryResult` of struct `ExpressRouteCircuitsClientListRoutesTableSummaryResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientListRoutesTableSummaryResponse` has been removed +- Field `InterfacesClientListAllResult` of struct `InterfacesClientListAllResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListAllResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableResponseHeadersResult` of struct `ApplicationGatewaysClientListAvailableResponseHeadersResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableResponseHeadersResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientUnprepareNetworkPoliciesResponse` has been removed +- Field `BastionHostsClientUpdateTagsResult` of struct `BastionHostsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientUpdateTagsResponse` has been removed +- Field `LocalNetworkGatewaysClientGetResult` of struct `LocalNetworkGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `LocalNetworkGatewaysClientGetResponse` has been removed +- Field `ApplicationGatewaysClientListResult` of struct `ApplicationGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSitesClientDeleteResponse` has been removed +- Field `RawResponse` of struct `NatRulesClientDeleteResponse` has been removed +- Field `VirtualNetworkTapsClientListByResourceGroupResult` of struct `VirtualNetworkTapsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientListByResourceGroupResponse` has been removed +- Field `InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult` of struct `InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse` has been removed +- Field `PrivateDNSZoneGroupsClientCreateOrUpdateResult` of struct `PrivateDNSZoneGroupsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PrivateDNSZoneGroupsClientCreateOrUpdateResponse` has been removed +- Field `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResult` of struct `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse` has been removed +- Field `SecurityPartnerProvidersClientListByResourceGroupResult` of struct `SecurityPartnerProvidersClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientListByResourceGroupResponse` has been removed +- Field `LoadBalancerBackendAddressPoolsClientListResult` of struct `LoadBalancerBackendAddressPoolsClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerBackendAddressPoolsClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientDeleteResponse` has been removed +- Field `VirtualApplianceSitesClientCreateOrUpdateResult` of struct `VirtualApplianceSitesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSitesClientCreateOrUpdateResponse` has been removed +- Field `HubVirtualNetworkConnectionsClientGetResult` of struct `HubVirtualNetworkConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `HubVirtualNetworkConnectionsClientGetResponse` has been removed +- Field `NatGatewaysClientListResult` of struct `NatGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientListResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableSSLOptionsResult` of struct `ApplicationGatewaysClientListAvailableSSLOptionsResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableSSLOptionsResponse` has been removed +- Field `VirtualNetworkTapsClientListAllResult` of struct `VirtualNetworkTapsClientListAllResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientListAllResponse` has been removed +- Field `InboundSecurityRuleClientCreateOrUpdateResult` of struct `InboundSecurityRuleClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `InboundSecurityRuleClientCreateOrUpdateResponse` has been removed +- Field `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult` of struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse` has been removed +- Field `ApplicationSecurityGroupsClientListResult` of struct `ApplicationSecurityGroupsClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientListResponse` has been removed +- Field `ExpressRouteCrossConnectionPeeringsClientGetResult` of struct `ExpressRouteCrossConnectionPeeringsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionPeeringsClientGetResponse` has been removed +- Field `RawResponse` of struct `HubVirtualNetworkConnectionsClientDeleteResponse` has been removed +- Field `PacketCapturesClientListResult` of struct `PacketCapturesClientListResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientListResponse` has been removed +- Field `VirtualHubsClientListByResourceGroupResult` of struct `VirtualHubsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientListByResourceGroupResponse` has been removed +- Field `InterfacesClientListVirtualMachineScaleSetIPConfigurationsResult` of struct `InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse` has been removed +- Field `InterfacesClientListCloudServiceNetworkInterfacesResult` of struct `InterfacesClientListCloudServiceNetworkInterfacesResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListCloudServiceNetworkInterfacesResponse` has been removed +- Field `InterfacesClientGetEffectiveRouteTableResult` of struct `InterfacesClientGetEffectiveRouteTableResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientGetEffectiveRouteTableResponse` has been removed +- Field `VirtualApplianceSKUsClientGetResult` of struct `VirtualApplianceSKUsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSKUsClientGetResponse` has been removed +- Field `NatGatewaysClientGetResult` of struct `NatGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientGetResponse` has been removed +- Field `InboundNatRulesClientListResult` of struct `InboundNatRulesClientListResponse` has been removed +- Field `RawResponse` of struct `InboundNatRulesClientListResponse` has been removed +- Field `WatchersClientGetTroubleshootingResult` of struct `WatchersClientGetTroubleshootingResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetTroubleshootingResponse` has been removed +- Field `ConnectionMonitorsClientQueryResult` of struct `ConnectionMonitorsClientQueryResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientQueryResponse` has been removed +- Field `ApplicationGatewaysClientUpdateTagsResult` of struct `ApplicationGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientUpdateTagsResponse` has been removed +- Field `VirtualRoutersClientCreateOrUpdateResult` of struct `VirtualRoutersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualRoutersClientCreateOrUpdateResponse` has been removed +- Field `DdosProtectionPlansClientGetResult` of struct `DdosProtectionPlansClientGetResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientGetResponse` has been removed +- Field `LoadBalancerOutboundRulesClientListResult` of struct `LoadBalancerOutboundRulesClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerOutboundRulesClientListResponse` has been removed +- Field `ExpressRouteCircuitsClientListAllResult` of struct `ExpressRouteCircuitsClientListAllResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientListAllResponse` has been removed +- Field `WatchersClientGetNextHopResult` of struct `WatchersClientGetNextHopResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetNextHopResponse` has been removed +- Field `ProfilesClientListAllResult` of struct `ProfilesClientListAllResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientListAllResponse` has been removed +- Field `P2SVPNGatewaysClientGetP2SVPNConnectionHealthResult` of struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse` has been removed +- Field `LoadBalancerLoadBalancingRulesClientListResult` of struct `LoadBalancerLoadBalancingRulesClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerLoadBalancingRulesClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientDeleteResponse` has been removed +- Field `PacketCapturesClientGetStatusResult` of struct `PacketCapturesClientGetStatusResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientGetStatusResponse` has been removed +- Field `ApplicationSecurityGroupsClientGetResult` of struct `ApplicationSecurityGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientGetResponse` has been removed +- Field `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResult` of struct `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse` has been removed +- Field `LoadBalancerLoadBalancingRulesClientGetResult` of struct `LoadBalancerLoadBalancingRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerLoadBalancingRulesClientGetResponse` has been removed +- Field `SecurityGroupsClientListAllResult` of struct `SecurityGroupsClientListAllResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientListAllResponse` has been removed +- Field `ExpressRoutePortsClientListByResourceGroupResult` of struct `ExpressRoutePortsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientListByResourceGroupResponse` has been removed +- Field `LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult` of struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse` has been removed +- Field `ManagementClientGetBastionShareableLinkResult` of struct `ManagementClientGetBastionShareableLinkResponse` has been removed +- Field `RawResponse` of struct `ManagementClientGetBastionShareableLinkResponse` has been removed +- Field `BastionHostsClientCreateOrUpdateResult` of struct `BastionHostsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientCreateOrUpdateResponse` has been removed +- Field `VPNConnectionsClientListByVPNGatewayResult` of struct `VPNConnectionsClientListByVPNGatewayResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientListByVPNGatewayResponse` has been removed +- Field `ExpressRouteCircuitConnectionsClientGetResult` of struct `ExpressRouteCircuitConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientDeleteResponse` has been removed +- Field `WatchersClientGetVMSecurityRulesResult` of struct `WatchersClientGetVMSecurityRulesResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetVMSecurityRulesResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitPeeringsClientDeleteResponse` has been removed +- Field `PeerExpressRouteCircuitConnectionsClientListResult` of struct `PeerExpressRouteCircuitConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `PeerExpressRouteCircuitConnectionsClientListResponse` has been removed +- Field `AvailableResourceGroupDelegationsClientListResult` of struct `AvailableResourceGroupDelegationsClientListResponse` has been removed +- Field `RawResponse` of struct `AvailableResourceGroupDelegationsClientListResponse` has been removed +- Field `InterfacesClientUpdateTagsResult` of struct `InterfacesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientUpdateTagsResponse` has been removed +- Field `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult` of struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse` has been removed +- Field `RawResponse` of struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientDeleteResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientDeleteResponse` has been removed +- Field `ExpressRoutePortsLocationsClientListResult` of struct `ExpressRoutePortsLocationsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsLocationsClientListResponse` has been removed +- Field `VirtualHubRouteTableV2SClientListResult` of struct `VirtualHubRouteTableV2SClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubRouteTableV2SClientListResponse` has been removed +- Field `RawResponse` of struct `DscpConfigurationClientDeleteResponse` has been removed +- Field `ExpressRoutePortsLocationsClientGetResult` of struct `ExpressRoutePortsLocationsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsLocationsClientGetResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientResetSharedKeyResult` of struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse` has been removed +- Field `LoadBalancerFrontendIPConfigurationsClientGetResult` of struct `LoadBalancerFrontendIPConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerFrontendIPConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientDeleteResponse` has been removed +- Field `WatchersClientCheckConnectivityResult` of struct `WatchersClientCheckConnectivityResponse` has been removed +- Field `RawResponse` of struct `WatchersClientCheckConnectivityResponse` has been removed +- Field `ExpressRouteCircuitsClientGetResult` of struct `ExpressRouteCircuitsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientGetResponse` has been removed +- Field `ExpressRouteLinksClientListResult` of struct `ExpressRouteLinksClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteLinksClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientStopResponse` has been removed +- Field `SubnetsClientListResult` of struct `SubnetsClientListResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientListResponse` has been removed +- Field `VirtualHubRouteTableV2SClientCreateOrUpdateResult` of struct `VirtualHubRouteTableV2SClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualHubRouteTableV2SClientCreateOrUpdateResponse` has been removed +- Field `VirtualNetworksClientCheckIPAddressAvailabilityResult` of struct `VirtualNetworksClientCheckIPAddressAvailabilityResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientCheckIPAddressAvailabilityResponse` has been removed +- Field `DdosCustomPoliciesClientCreateOrUpdateResult` of struct `DdosCustomPoliciesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `DdosCustomPoliciesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientDeleteResponse` has been removed +- Field `VirtualHubsClientGetResult` of struct `VirtualHubsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientGetResponse` has been removed +- Field `PrivateEndpointsClientCreateOrUpdateResult` of struct `PrivateEndpointsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PrivateEndpointsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientSetSharedKeyResult` of struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse` has been removed +- Field `ExpressRouteConnectionsClientGetResult` of struct `ExpressRouteConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteConnectionsClientGetResponse` has been removed +- Field `AzureFirewallsClientListAllResult` of struct `AzureFirewallsClientListAllResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientListAllResponse` has been removed +- Field `VirtualRouterPeeringsClientCreateOrUpdateResult` of struct `VirtualRouterPeeringsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualRouterPeeringsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientStopResponse` has been removed +- Field `FirewallPoliciesClientGetResult` of struct `FirewallPoliciesClientGetResponse` has been removed +- Field `RawResponse` of struct `FirewallPoliciesClientGetResponse` has been removed +- Field `VPNSitesClientGetResult` of struct `VPNSitesClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientGetResponse` has been removed +- Field `RawResponse` of struct `InboundNatRulesClientDeleteResponse` has been removed +- Field `RawResponse` of struct `FirewallPoliciesClientDeleteResponse` has been removed +- Field `IPGroupsClientCreateOrUpdateResult` of struct `IPGroupsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientCreateOrUpdateResponse` has been removed +- Field `ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult` of struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesOverridesClientListResult` of struct `FirewallPolicyIdpsSignaturesOverridesClientListResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesOverridesClientListResponse` has been removed +- Field `VPNServerConfigurationsAssociatedWithVirtualWanClientListResult` of struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse` has been removed +- Field `RawResponse` of struct `PrivateEndpointsClientDeleteResponse` has been removed +- Field `InterfaceLoadBalancersClientListResult` of struct `InterfaceLoadBalancersClientListResponse` has been removed +- Field `RawResponse` of struct `InterfaceLoadBalancersClientListResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientListResult` of struct `ExpressRouteCrossConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientListResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientListByResourceGroupResult` of struct `ExpressRouteCrossConnectionsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientListByResourceGroupResponse` has been removed +- Field `RouteFilterRulesClientGetResult` of struct `RouteFilterRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `RouteFilterRulesClientGetResponse` has been removed +- Field `VirtualNetworkPeeringsClientCreateOrUpdateResult` of struct `VirtualNetworkPeeringsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkPeeringsClientCreateOrUpdateResponse` has been removed +- Field `VirtualWansClientCreateOrUpdateResult` of struct `VirtualWansClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientCreateOrUpdateResponse` has been removed +- Field `VPNSitesClientListResult` of struct `VPNSitesClientListResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientListResponse` has been removed +- Field `RoutingIntentClientListResult` of struct `RoutingIntentClientListResponse` has been removed +- Field `RawResponse` of struct `RoutingIntentClientListResponse` has been removed +- Field `ExpressRouteGatewaysClientUpdateTagsResult` of struct `ExpressRouteGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientUpdateTagsResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResult` of struct `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse` has been removed +- Field `WatchersClientVerifyIPFlowResult` of struct `WatchersClientVerifyIPFlowResponse` has been removed +- Field `RawResponse` of struct `WatchersClientVerifyIPFlowResponse` has been removed +- Field `VPNSitesClientListByResourceGroupResult` of struct `VPNSitesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientListByResourceGroupResponse` has been removed +- Field `IPAllocationsClientUpdateTagsResult` of struct `IPAllocationsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitConnectionsClientDeleteResponse` has been removed +- Field `VirtualNetworkGatewaysClientListConnectionsResult` of struct `VirtualNetworkGatewaysClientListConnectionsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientListConnectionsResponse` has been removed +- Field `DdosProtectionPlansClientListResult` of struct `DdosProtectionPlansClientListResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientListResponse` has been removed +- Field `FirewallPolicyRuleCollectionGroupsClientListResult` of struct `FirewallPolicyRuleCollectionGroupsClientListResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyRuleCollectionGroupsClientListResponse` has been removed +- Field `VirtualWansClientGetResult` of struct `VirtualWansClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientGetResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult` of struct `VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientDeleteResponse` has been removed +- Field `PublicIPAddressesClientUpdateTagsResult` of struct `PublicIPAddressesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientDeleteResponse` has been removed +- Field `LocalNetworkGatewaysClientCreateOrUpdateResult` of struct `LocalNetworkGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `LocalNetworkGatewaysClientCreateOrUpdateResponse` has been removed +- Field `VirtualApplianceSitesClientListResult` of struct `VirtualApplianceSitesClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSitesClientListResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableServerVariablesResult` of struct `ApplicationGatewaysClientListAvailableServerVariablesResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableServerVariablesResponse` has been removed +- Field `VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResult` of struct `VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse` has been removed +- Field `ApplicationSecurityGroupsClientListAllResult` of struct `ApplicationSecurityGroupsClientListAllResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientListAllResponse` has been removed +- Field `RouteFilterRulesClientListByRouteFilterResult` of struct `RouteFilterRulesClientListByRouteFilterResponse` has been removed +- Field `RawResponse` of struct `RouteFilterRulesClientListByRouteFilterResponse` has been removed +- Field `ExpressRouteCircuitsClientGetPeeringStatsResult` of struct `ExpressRouteCircuitsClientGetPeeringStatsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientGetPeeringStatsResponse` has been removed +- Field `RawResponse` of struct `DdosCustomPoliciesClientDeleteResponse` has been removed +- Field `VirtualHubBgpConnectionsClientListAdvertisedRoutesResult` of struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse` has been removed +- Field `FirewallPoliciesClientCreateOrUpdateResult` of struct `FirewallPoliciesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `FirewallPoliciesClientCreateOrUpdateResponse` has been removed +- Field `ExpressRoutePortsClientUpdateTagsResult` of struct `ExpressRoutePortsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientUpdateTagsResponse` has been removed +- Field `DscpConfigurationClientCreateOrUpdateResult` of struct `DscpConfigurationClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `DscpConfigurationClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientDeleteResponse` has been removed +- Field `SecurityPartnerProvidersClientListResult` of struct `SecurityPartnerProvidersClientListResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientListResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientDeleteResponse` has been removed +- Field `WebApplicationFirewallPoliciesClientListResult` of struct `WebApplicationFirewallPoliciesClientListResponse` has been removed +- Field `RawResponse` of struct `WebApplicationFirewallPoliciesClientListResponse` has been removed +- Field `PublicIPAddressesClientListAllResult` of struct `PublicIPAddressesClientListAllResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListAllResponse` has been removed +- Field `ExpressRouteCircuitsClientGetStatsResult` of struct `ExpressRouteCircuitsClientGetStatsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientGetStatsResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableWafRuleSetsResult` of struct `ApplicationGatewaysClientListAvailableWafRuleSetsResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableWafRuleSetsResponse` has been removed +- Field `VirtualNetworkGatewaysClientStartPacketCaptureResult` of struct `VirtualNetworkGatewaysClientStartPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientStartPacketCaptureResponse` has been removed +- Field `AzureFirewallsClientGetResult` of struct `AzureFirewallsClientGetResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientGetResponse` has been removed +- Field `P2SVPNGatewaysClientListByResourceGroupResult` of struct `P2SVPNGatewaysClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientListByResourceGroupResponse` has been removed +- Field `RouteTablesClientListResult` of struct `RouteTablesClientListResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientListResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesOverridesClientGetResult` of struct `FirewallPolicyIdpsSignaturesOverridesClientGetResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesOverridesClientGetResponse` has been removed +- Field `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResult` of struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse` has been removed +- Field `VirtualNetworkGatewaysClientListResult` of struct `VirtualNetworkGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientListResponse` has been removed +- Field `VPNServerConfigurationsClientUpdateTagsResult` of struct `VPNServerConfigurationsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientUpdateTagsResponse` has been removed +- Field `LoadBalancerFrontendIPConfigurationsClientListResult` of struct `LoadBalancerFrontendIPConfigurationsClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerFrontendIPConfigurationsClientListResponse` has been removed +- Field `VirtualHubsClientCreateOrUpdateResult` of struct `VirtualHubsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientCreateOrUpdateResponse` has been removed +- Field `VirtualApplianceSitesClientGetResult` of struct `VirtualApplianceSitesClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSitesClientGetResponse` has been removed +- Field `P2SVPNGatewaysClientGenerateVPNProfileResult` of struct `P2SVPNGatewaysClientGenerateVPNProfileResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientGenerateVPNProfileResponse` has been removed +- Field `ManagementClientDisconnectActiveSessionsResult` of struct `ManagementClientDisconnectActiveSessionsResponse` has been removed +- Field `RawResponse` of struct `ManagementClientDisconnectActiveSessionsResponse` has been removed +- Field `ExpressRouteCircuitsClientListResult` of struct `ExpressRouteCircuitsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientListResponse` has been removed +- Field `ApplicationGatewaysClientBackendHealthOnDemandResult` of struct `ApplicationGatewaysClientBackendHealthOnDemandResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientBackendHealthOnDemandResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientDeleteResponse` has been removed +- Field `LoadBalancersClientListAllResult` of struct `LoadBalancersClientListAllResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientListAllResponse` has been removed +- Field `VirtualNetworkGatewaysClientResetResult` of struct `VirtualNetworkGatewaysClientResetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientResetResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesOverridesClientPutResult` of struct `FirewallPolicyIdpsSignaturesOverridesClientPutResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesOverridesClientPutResponse` has been removed +- Field `RouteTablesClientGetResult` of struct `RouteTablesClientGetResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientGetResponse` has been removed +- Field `VPNSitesClientCreateOrUpdateResult` of struct `VPNSitesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientCreateOrUpdateResponse` has been removed +- Field `AvailableServiceAliasesClientListResult` of struct `AvailableServiceAliasesClientListResponse` has been removed +- Field `RawResponse` of struct `AvailableServiceAliasesClientListResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse` has been removed +- Field `LoadBalancerNetworkInterfacesClientListResult` of struct `LoadBalancerNetworkInterfacesClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerNetworkInterfacesClientListResponse` has been removed +- Field `VirtualHubBgpConnectionsClientListLearnedRoutesResult` of struct `VirtualHubBgpConnectionsClientListLearnedRoutesResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionsClientListLearnedRoutesResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientDeleteResponse` has been removed +- Field `WatchersClientGetTopologyResult` of struct `WatchersClientGetTopologyResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetTopologyResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetResult` of struct `VirtualNetworkGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetResponse` has been removed +- Field `ApplicationGatewayPrivateEndpointConnectionsClientListResult` of struct `ApplicationGatewayPrivateEndpointConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewayPrivateEndpointConnectionsClientListResponse` has been removed +- Field `PrivateLinkServicesClientCreateOrUpdateResult` of struct `PrivateLinkServicesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientCreateOrUpdateResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientUpdateTagsResult` of struct `ExpressRouteCrossConnectionsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientUpdateTagsResponse` has been removed +- Field `VirtualNetworkGatewaysClientUpdateTagsResult` of struct `VirtualNetworkGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientUpdateTagsResponse` has been removed +- Field `ExpressRouteCircuitAuthorizationsClientListResult` of struct `ExpressRouteCircuitAuthorizationsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitAuthorizationsClientListResponse` has been removed +- Field `PrivateEndpointsClientListBySubscriptionResult` of struct `PrivateEndpointsClientListBySubscriptionResponse` has been removed +- Field `RawResponse` of struct `PrivateEndpointsClientListBySubscriptionResponse` has been removed +- Field `OperationsClientListResult` of struct `OperationsClientListResponse` has been removed +- Field `RawResponse` of struct `OperationsClientListResponse` has been removed +- Field `FlowLogsClientGetResult` of struct `FlowLogsClientGetResponse` has been removed +- Field `RawResponse` of struct `FlowLogsClientGetResponse` has been removed +- Field `HubVirtualNetworkConnectionsClientCreateOrUpdateResult` of struct `HubVirtualNetworkConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `HubVirtualNetworkConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse` has been removed +- Field `NatRulesClientGetResult` of struct `NatRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `NatRulesClientGetResponse` has been removed +- Field `VirtualNetworkGatewaysClientGenerateVPNProfileResult` of struct `VirtualNetworkGatewaysClientGenerateVPNProfileResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGenerateVPNProfileResponse` has been removed +- Field `VPNGatewaysClientListByResourceGroupResult` of struct `VPNGatewaysClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientListByResourceGroupResponse` has been removed +- Field `P2SVPNGatewaysClientGetResult` of struct `P2SVPNGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientDeleteResponse` has been removed +- Field `ServiceEndpointPoliciesClientGetResult` of struct `ServiceEndpointPoliciesClientGetResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientGetResponse` has been removed +- Field `ExpressRouteLinksClientGetResult` of struct `ExpressRouteLinksClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteLinksClientGetResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientDeleteResponse` has been removed +- Field `InterfaceTapConfigurationsClientGetResult` of struct `InterfaceTapConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `InterfaceTapConfigurationsClientGetResponse` has been removed +- Field `InboundNatRulesClientGetResult` of struct `InboundNatRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `InboundNatRulesClientGetResponse` has been removed +- Field `PublicIPAddressesClientGetResult` of struct `PublicIPAddressesClientGetResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientGetResponse` has been removed +- Field `VirtualNetworkGatewayNatRulesClientGetResult` of struct `VirtualNetworkGatewayNatRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayNatRulesClientGetResponse` has been removed +- Field `VirtualNetworksClientListResult` of struct `VirtualNetworksClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientListResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientListResult` of struct `VirtualNetworkGatewayConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientListResponse` has been removed +- Field `PacketCapturesClientCreateResult` of struct `PacketCapturesClientCreateResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientCreateResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientDeleteResponse` has been removed +- Field `IPGroupsClientListByResourceGroupResult` of struct `IPGroupsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientListByResourceGroupResponse` has been removed +- Field `ManagementClientSupportedSecurityProvidersResult` of struct `ManagementClientSupportedSecurityProvidersResponse` has been removed +- Field `RawResponse` of struct `ManagementClientSupportedSecurityProvidersResponse` has been removed +- Field `ConnectionMonitorsClientUpdateTagsResult` of struct `ConnectionMonitorsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `FlowLogsClientDeleteResponse` has been removed +- Field `WebCategoriesClientGetResult` of struct `WebCategoriesClientGetResponse` has been removed +- Field `RawResponse` of struct `WebCategoriesClientGetResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesFilterValuesClientListResult` of struct `FirewallPolicyIdpsSignaturesFilterValuesClientListResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesFilterValuesClientListResponse` has been removed +- Field `LocalNetworkGatewaysClientListResult` of struct `LocalNetworkGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `LocalNetworkGatewaysClientListResponse` has been removed +- Field `PublicIPAddressesClientListResult` of struct `PublicIPAddressesClientListResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListResponse` has been removed +- Field `VirtualHubRouteTableV2SClientGetResult` of struct `VirtualHubRouteTableV2SClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualHubRouteTableV2SClientGetResponse` has been removed +- Field `ExpressRouteCircuitsClientListArpTableResult` of struct `ExpressRouteCircuitsClientListArpTableResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientListArpTableResponse` has been removed +- Field `PrivateLinkServicesClientGetResult` of struct `PrivateLinkServicesClientGetResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientGetResponse` has been removed +- Field `CustomIPPrefixesClientUpdateTagsResult` of struct `CustomIPPrefixesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientUpdateTagsResponse` has been removed +- Field `ExpressRouteCircuitPeeringsClientListResult` of struct `ExpressRouteCircuitPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitPeeringsClientListResponse` has been removed +- Field `InterfacesClientCreateOrUpdateResult` of struct `InterfacesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientCreateOrUpdateResponse` has been removed +- Field `WebApplicationFirewallPoliciesClientCreateOrUpdateResult` of struct `WebApplicationFirewallPoliciesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `WebApplicationFirewallPoliciesClientCreateOrUpdateResponse` has been removed +- Field `VPNLinkConnectionsClientListByVPNConnectionResult` of struct `VPNLinkConnectionsClientListByVPNConnectionResponse` has been removed +- Field `RawResponse` of struct `VPNLinkConnectionsClientListByVPNConnectionResponse` has been removed +- Field `ExpressRouteCircuitPeeringsClientGetResult` of struct `ExpressRouteCircuitPeeringsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitPeeringsClientGetResponse` has been removed +- Field `VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult` of struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse` has been removed +- Field `ExpressRouteCircuitsClientUpdateTagsResult` of struct `ExpressRouteCircuitsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientUpdateTagsResponse` has been removed +- Field `HubVirtualNetworkConnectionsClientListResult` of struct `HubVirtualNetworkConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `HubVirtualNetworkConnectionsClientListResponse` has been removed +- Field `VPNLinkConnectionsClientGetIkeSasResult` of struct `VPNLinkConnectionsClientGetIkeSasResponse` has been removed +- Field `RawResponse` of struct `VPNLinkConnectionsClientGetIkeSasResponse` has been removed +- Field `SecurityRulesClientGetResult` of struct `SecurityRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `SecurityRulesClientGetResponse` has been removed +- Field `CustomIPPrefixesClientGetResult` of struct `CustomIPPrefixesClientGetResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientGetResponse` has been removed +- Field `RoutesClientCreateOrUpdateResult` of struct `RoutesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RoutesClientCreateOrUpdateResponse` has been removed +- Field `LoadBalancerBackendAddressPoolsClientGetResult` of struct `LoadBalancerBackendAddressPoolsClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerBackendAddressPoolsClientGetResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientGetIkeSasResult` of struct `VirtualNetworkGatewayConnectionsClientGetIkeSasResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientGetIkeSasResponse` has been removed +- Field `AzureFirewallsClientUpdateTagsResult` of struct `AzureFirewallsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientUpdateTagsResponse` has been removed +- Field `P2SVPNGatewaysClientListResult` of struct `P2SVPNGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientListResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetBgpPeerStatusResult` of struct `VirtualNetworkGatewaysClientGetBgpPeerStatusResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetBgpPeerStatusResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult` of struct `VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse` has been removed +- Field `ProfilesClientListResult` of struct `ProfilesClientListResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientListResponse` has been removed +- Field `CustomIPPrefixesClientCreateOrUpdateResult` of struct `CustomIPPrefixesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientCreateOrUpdateResponse` has been removed +- Field `ManagementClientGetActiveSessionsResult` of struct `ManagementClientGetActiveSessionsResponse` has been removed +- Field `RawResponse` of struct `ManagementClientGetActiveSessionsResponse` has been removed +- Field `ExpressRoutePortsClientGenerateLOAResult` of struct `ExpressRoutePortsClientGenerateLOAResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientGenerateLOAResponse` has been removed +- Field `IPGroupsClientGetResult` of struct `IPGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientGetResponse` has been removed +- Field `VPNGatewaysClientResetResult` of struct `VPNGatewaysClientResetResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientResetResponse` has been removed +- Field `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResult` of struct `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse` has been removed +- Field `WebCategoriesClientListBySubscriptionResult` of struct `WebCategoriesClientListBySubscriptionResponse` has been removed +- Field `RawResponse` of struct `WebCategoriesClientListBySubscriptionResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientGetResult` of struct `VirtualNetworkGatewayConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientGetEffectiveVirtualHubRoutesResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientDeleteResponse` has been removed +- Field `ExpressRouteCircuitAuthorizationsClientGetResult` of struct `ExpressRouteCircuitAuthorizationsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitAuthorizationsClientGetResponse` has been removed +- Field `NatGatewaysClientCreateOrUpdateResult` of struct `NatGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientCreateOrUpdateResponse` has been removed +- Field `ConnectionMonitorsClientCreateOrUpdateResult` of struct `ConnectionMonitorsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientDeleteResponse` has been removed +- Field `ServiceEndpointPolicyDefinitionsClientGetResult` of struct `ServiceEndpointPolicyDefinitionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPolicyDefinitionsClientGetResponse` has been removed +- Field `ExpressRouteGatewaysClientCreateOrUpdateResult` of struct `ExpressRouteGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientCreateOrUpdateResponse` has been removed +- Field `PrivateDNSZoneGroupsClientListResult` of struct `PrivateDNSZoneGroupsClientListResponse` has been removed +- Field `RawResponse` of struct `PrivateDNSZoneGroupsClientListResponse` has been removed +- Field `VPNGatewaysClientUpdateTagsResult` of struct `VPNGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientUpdateTagsResponse` has been removed +- Field `VPNSitesClientUpdateTagsResult` of struct `VPNSitesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientUpdateTagsResponse` has been removed +- Field `VPNGatewaysClientStartPacketCaptureResult` of struct `VPNGatewaysClientStartPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientStartPacketCaptureResponse` has been removed +- Field `PublicIPPrefixesClientListResult` of struct `PublicIPPrefixesClientListResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientListResponse` has been removed +- Field `InterfaceTapConfigurationsClientListResult` of struct `InterfaceTapConfigurationsClientListResponse` has been removed +- Field `RawResponse` of struct `InterfaceTapConfigurationsClientListResponse` has been removed +- Field `VirtualWansClientListResult` of struct `VirtualWansClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientListResponse` has been removed +- Field `IPAllocationsClientGetResult` of struct `IPAllocationsClientGetResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientGetResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetLearnedRoutesResult` of struct `VirtualNetworkGatewaysClientGetLearnedRoutesResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetLearnedRoutesResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientDeleteResponse` has been removed +- Field `LoadBalancersClientGetResult` of struct `LoadBalancersClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientGetResponse` has been removed +- Field `FlowLogsClientListResult` of struct `FlowLogsClientListResponse` has been removed +- Field `RawResponse` of struct `FlowLogsClientListResponse` has been removed +- Field `InterfaceTapConfigurationsClientCreateOrUpdateResult` of struct `InterfaceTapConfigurationsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `InterfaceTapConfigurationsClientCreateOrUpdateResponse` has been removed +- Field `RouteTablesClientListAllResult` of struct `RouteTablesClientListAllResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientListAllResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientGetSharedKeyResult` of struct `VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse` has been removed +- Field `ExpressRoutePortsClientListResult` of struct `ExpressRoutePortsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientListResponse` has been removed +- Field `VPNConnectionsClientGetResult` of struct `VPNConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientGetResponse` has been removed +- Field `SecurityGroupsClientUpdateTagsResult` of struct `SecurityGroupsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionPeeringsClientDeleteResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientDeleteResponse` has been removed +- Field `WatchersClientGetAzureReachabilityReportResult` of struct `WatchersClientGetAzureReachabilityReportResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetAzureReachabilityReportResponse` has been removed +- Field `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResult` of struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyRuleCollectionGroupsClientDeleteResponse` has been removed +- Field `WatchersClientListAvailableProvidersResult` of struct `WatchersClientListAvailableProvidersResponse` has been removed +- Field `RawResponse` of struct `WatchersClientListAvailableProvidersResponse` has been removed +- Field `VPNConnectionsClientStartPacketCaptureResult` of struct `VPNConnectionsClientStartPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientStartPacketCaptureResponse` has been removed +- Field `BastionHostsClientListResult` of struct `BastionHostsClientListResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubRouteTableV2SClientDeleteResponse` has been removed +- Field `RouteTablesClientUpdateTagsResult` of struct `RouteTablesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientDeleteResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientStopResponse` has been removed +- Field `SecurityPartnerProvidersClientCreateOrUpdateResult` of struct `SecurityPartnerProvidersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientDeleteResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult` of struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse` has been removed +- Field `VirtualNetworkTapsClientUpdateTagsResult` of struct `VirtualNetworkTapsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientUpdateTagsResponse` has been removed +- Field `VirtualNetworksClientCreateOrUpdateResult` of struct `VirtualNetworksClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientCreateOrUpdateResponse` has been removed +- Field `RouteFiltersClientGetResult` of struct `RouteFiltersClientGetResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientGetResponse` has been removed +- Field `LoadBalancersClientListResult` of struct `LoadBalancersClientListResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientListResponse` has been removed +- Field `VirtualHubsClientListResult` of struct `VirtualHubsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientListResponse` has been removed +- Field `RawResponse` of struct `SecurityRulesClientDeleteResponse` has been removed +- Field `ExpressRouteCircuitsClientCreateOrUpdateResult` of struct `ExpressRouteCircuitsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientCreateOrUpdateResponse` has been removed +- Field `WatchersClientGetFlowLogStatusResult` of struct `WatchersClientGetFlowLogStatusResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetFlowLogStatusResponse` has been removed +- Field `ExpressRouteServiceProvidersClientListResult` of struct `ExpressRouteServiceProvidersClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteServiceProvidersClientListResponse` has been removed +- Field `PrivateLinkServicesClientGetPrivateEndpointConnectionResult` of struct `PrivateLinkServicesClientGetPrivateEndpointConnectionResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientGetPrivateEndpointConnectionResponse` has been removed +- Field `PrivateLinkServicesClientListPrivateEndpointConnectionsResult` of struct `PrivateLinkServicesClientListPrivateEndpointConnectionsResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientListPrivateEndpointConnectionsResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientDeleteResponse` has been removed +- Field `PublicIPPrefixesClientListAllResult` of struct `PublicIPPrefixesClientListAllResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientListAllResponse` has been removed +- Field `VPNConnectionsClientStopPacketCaptureResult` of struct `VPNConnectionsClientStopPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientStopPacketCaptureResponse` has been removed +- Field `ConnectionMonitorsClientListResult` of struct `ConnectionMonitorsClientListResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientListResponse` has been removed +- Field `UsagesClientListResult` of struct `UsagesClientListResponse` has been removed +- Field `RawResponse` of struct `UsagesClientListResponse` has been removed +- Field `WatchersClientUpdateTagsResult` of struct `WatchersClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `WatchersClientUpdateTagsResponse` has been removed +- Field `DdosProtectionPlansClientCreateOrUpdateResult` of struct `DdosProtectionPlansClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientCreateOrUpdateResponse` has been removed +- Field `RouteFiltersClientCreateOrUpdateResult` of struct `RouteFiltersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkPeeringsClientDeleteResponse` has been removed +- Field `VirtualHubBgpConnectionClientGetResult` of struct `VirtualHubBgpConnectionClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionClientGetResponse` has been removed +- Field `PublicIPAddressesClientListCloudServicePublicIPAddressesResult` of struct `PublicIPAddressesClientListCloudServicePublicIPAddressesResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListCloudServicePublicIPAddressesResponse` has been removed +- Field `DscpConfigurationClientListResult` of struct `DscpConfigurationClientListResponse` has been removed +- Field `RawResponse` of struct `DscpConfigurationClientListResponse` has been removed +- Field `VirtualRoutersClientListResult` of struct `VirtualRoutersClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualRoutersClientListResponse` has been removed +- Field `VirtualAppliancesClientListResult` of struct `VirtualAppliancesClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientListResponse` has been removed +- Field `AvailableEndpointServicesClientListResult` of struct `AvailableEndpointServicesClientListResponse` has been removed +- Field `RawResponse` of struct `AvailableEndpointServicesClientListResponse` has been removed +- Field `ExpressRouteCircuitConnectionsClientListResult` of struct `ExpressRouteCircuitConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitConnectionsClientListResponse` has been removed +- Field `WatchersClientGetNetworkConfigurationDiagnosticResult` of struct `WatchersClientGetNetworkConfigurationDiagnosticResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetNetworkConfigurationDiagnosticResponse` has been removed +- Field `ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult` of struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse` has been removed +- Field `SecurityPartnerProvidersClientGetResult` of struct `SecurityPartnerProvidersClientGetResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayNatRulesClientDeleteResponse` has been removed +- Field `VirtualAppliancesClientGetResult` of struct `VirtualAppliancesClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientGetResponse` has been removed +- Field `ManagementClientCheckDNSNameAvailabilityResult` of struct `ManagementClientCheckDNSNameAvailabilityResponse` has been removed +- Field `RawResponse` of struct `ManagementClientCheckDNSNameAvailabilityResponse` has been removed +- Field `ApplicationGatewayPrivateLinkResourcesClientListResult` of struct `ApplicationGatewayPrivateLinkResourcesClientListResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewayPrivateLinkResourcesClientListResponse` has been removed +- Field `FirewallPoliciesClientListAllResult` of struct `FirewallPoliciesClientListAllResponse` has been removed +- Field `RawResponse` of struct `FirewallPoliciesClientListAllResponse` has been removed +- Field `SecurityPartnerProvidersClientUpdateTagsResult` of struct `SecurityPartnerProvidersClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientUpdateTagsResponse` has been removed +- Field `ProfilesClientUpdateTagsResult` of struct `ProfilesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientUpdateTagsResponse` has been removed +- Field `NatRulesClientListByVPNGatewayResult` of struct `NatRulesClientListByVPNGatewayResponse` has been removed +- Field `RawResponse` of struct `NatRulesClientListByVPNGatewayResponse` has been removed +- Field `VPNServerConfigurationsClientListResult` of struct `VPNServerConfigurationsClientListResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientListResponse` has been removed +- Field `ProfilesClientCreateOrUpdateResult` of struct `ProfilesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientCreateOrUpdateResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientListArpTableResult` of struct `ExpressRouteCrossConnectionsClientListArpTableResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientListArpTableResponse` has been removed +- Field `DefaultSecurityRulesClientListResult` of struct `DefaultSecurityRulesClientListResponse` has been removed +- Field `RawResponse` of struct `DefaultSecurityRulesClientListResponse` has been removed +- Field `RawResponse` of struct `LocalNetworkGatewaysClientDeleteResponse` has been removed +- Field `VirtualNetworksClientGetResult` of struct `VirtualNetworksClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientGetResponse` has been removed +- Field `PrivateLinkServicesClientListResult` of struct `PrivateLinkServicesClientListResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientListResponse` has been removed +- Field `PrivateDNSZoneGroupsClientGetResult` of struct `PrivateDNSZoneGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `PrivateDNSZoneGroupsClientGetResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse` has been removed +- Field `WatchersClientSetFlowLogConfigurationResult` of struct `WatchersClientSetFlowLogConfigurationResponse` has been removed +- Field `RawResponse` of struct `WatchersClientSetFlowLogConfigurationResponse` has been removed +- Field `FlowLogsClientCreateOrUpdateResult` of struct `FlowLogsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `FlowLogsClientCreateOrUpdateResponse` has been removed +- Field `ApplicationGatewaysClientGetSSLPredefinedPolicyResult` of struct `ApplicationGatewaysClientGetSSLPredefinedPolicyResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientGetSSLPredefinedPolicyResponse` has been removed +- Field `RawResponse` of struct `HubRouteTablesClientDeleteResponse` has been removed +- Field `VirtualRoutersClientGetResult` of struct `VirtualRoutersClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualRoutersClientGetResponse` has been removed +- Field `RouteFiltersClientListByResourceGroupResult` of struct `RouteFiltersClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientListByResourceGroupResponse` has been removed +- Field `ApplicationGatewaysClientListAvailableRequestHeadersResult` of struct `ApplicationGatewaysClientListAvailableRequestHeadersResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAvailableRequestHeadersResponse` has been removed +- Field `ServiceAssociationLinksClientListResult` of struct `ServiceAssociationLinksClientListResponse` has been removed +- Field `RawResponse` of struct `ServiceAssociationLinksClientListResponse` has been removed +- Field `LoadBalancersClientListInboundNatRulePortMappingsResult` of struct `LoadBalancersClientListInboundNatRulePortMappingsResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientListInboundNatRulePortMappingsResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetVPNProfilePackageURLResult` of struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse` has been removed +- Field `DscpConfigurationClientListAllResult` of struct `DscpConfigurationClientListAllResponse` has been removed +- Field `RawResponse` of struct `DscpConfigurationClientListAllResponse` has been removed +- Field `PrivateLinkServicesClientListBySubscriptionResult` of struct `PrivateLinkServicesClientListBySubscriptionResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientListBySubscriptionResponse` has been removed +- Field `ExpressRoutePortsClientGetResult` of struct `ExpressRoutePortsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientResetConnectionResponse` has been removed +- Field `DefaultSecurityRulesClientGetResult` of struct `DefaultSecurityRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `DefaultSecurityRulesClientGetResponse` has been removed +- Field `VirtualAppliancesClientCreateOrUpdateResult` of struct `VirtualAppliancesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientCreateOrUpdateResponse` has been removed +- Field `RoutesClientGetResult` of struct `RoutesClientGetResponse` has been removed +- Field `RawResponse` of struct `RoutesClientGetResponse` has been removed +- Field `DscpConfigurationClientGetResult` of struct `DscpConfigurationClientGetResponse` has been removed +- Field `RawResponse` of struct `DscpConfigurationClientGetResponse` has been removed +- Field `NatGatewaysClientListAllResult` of struct `NatGatewaysClientListAllResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientListAllResponse` has been removed +- Field `BastionHostsClientListByResourceGroupResult` of struct `BastionHostsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientListByResourceGroupResponse` has been removed +- Field `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult` of struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse` has been removed +- Field `ServiceEndpointPoliciesClientCreateOrUpdateResult` of struct `ServiceEndpointPoliciesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientCreateOrUpdateResponse` has been removed +- Field `VirtualNetworkTapsClientGetResult` of struct `VirtualNetworkTapsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientGetResponse` has been removed +- Field `RawResponse` of struct `RoutesClientDeleteResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesOverridesClientPatchResult` of struct `FirewallPolicyIdpsSignaturesOverridesClientPatchResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesOverridesClientPatchResponse` has been removed +- Field `SecurityGroupsClientCreateOrUpdateResult` of struct `SecurityGroupsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientCreateOrUpdateResponse` has been removed +- Field `PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult` of struct `PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse` has been removed +- Field `PrivateEndpointsClientGetResult` of struct `PrivateEndpointsClientGetResponse` has been removed +- Field `RawResponse` of struct `PrivateEndpointsClientGetResponse` has been removed +- Field `ProfilesClientGetResult` of struct `ProfilesClientGetResponse` has been removed +- Field `RawResponse` of struct `ProfilesClientGetResponse` has been removed +- Field `IPAllocationsClientListByResourceGroupResult` of struct `IPAllocationsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientListByResourceGroupResponse` has been removed +- Field `VirtualNetworksClientListUsageResult` of struct `VirtualNetworksClientListUsageResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientListUsageResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientDeleteResponse` has been removed +- Field `InterfacesClientListResult` of struct `InterfacesClientListResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListResponse` has been removed +- Field `InterfacesClientGetCloudServiceNetworkInterfaceResult` of struct `InterfacesClientGetCloudServiceNetworkInterfaceResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientGetCloudServiceNetworkInterfaceResponse` has been removed +- Field `NatGatewaysClientUpdateTagsResult` of struct `NatGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientDeleteResponse` has been removed +- Field `VPNConnectionsClientCreateOrUpdateResult` of struct `VPNConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RoutingIntentClientDeleteResponse` has been removed +- Field `WatchersClientGetResult` of struct `WatchersClientGetResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetResponse` has been removed +- Field `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResult` of struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse` has been removed +- Field `InterfacesClientGetResult` of struct `InterfacesClientGetResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientGetResponse` has been removed +- Field `P2SVPNGatewaysClientResetResult` of struct `P2SVPNGatewaysClientResetResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientResetResponse` has been removed +- Field `RawResponse` of struct `VirtualRoutersClientDeleteResponse` has been removed +- Field `InterfacesClientListEffectiveNetworkSecurityGroupsResult` of struct `InterfacesClientListEffectiveNetworkSecurityGroupsResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListEffectiveNetworkSecurityGroupsResponse` has been removed +- Field `VPNGatewaysClientListResult` of struct `VPNGatewaysClientListResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientListResponse` has been removed +- Field `VirtualHubBgpConnectionsClientListResult` of struct `VirtualHubBgpConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionsClientListResponse` has been removed +- Field `ApplicationSecurityGroupsClientUpdateTagsResult` of struct `ApplicationSecurityGroupsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientUpdateTagsResponse` has been removed +- Field `IPGroupsClientUpdateGroupsResult` of struct `IPGroupsClientUpdateGroupsResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientUpdateGroupsResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientStartResponse` has been removed +- Field `ApplicationGatewaysClientListAllResult` of struct `ApplicationGatewaysClientListAllResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientListAllResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPolicyDefinitionsClientDeleteResponse` has been removed +- Field `InterfacesClientGetVirtualMachineScaleSetIPConfigurationResult` of struct `InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerBackendAddressPoolsClientDeleteResponse` has been removed +- Field `BastionHostsClientGetResult` of struct `BastionHostsClientGetResponse` has been removed +- Field `RawResponse` of struct `BastionHostsClientGetResponse` has been removed +- Field `VirtualHubIPConfigurationClientGetResult` of struct `VirtualHubIPConfigurationClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualHubIPConfigurationClientGetResponse` has been removed +- Field `WatchersClientListResult` of struct `WatchersClientListResponse` has been removed +- Field `RawResponse` of struct `WatchersClientListResponse` has been removed +- Field `RawResponse` of struct `SecurityPartnerProvidersClientDeleteResponse` has been removed +- Field `PublicIPAddressesClientGetCloudServicePublicIPAddressResult` of struct `PublicIPAddressesClientGetCloudServicePublicIPAddressResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientGetCloudServicePublicIPAddressResponse` has been removed +- Field `VPNServerConfigurationsClientListByResourceGroupResult` of struct `VPNServerConfigurationsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientListByResourceGroupResponse` has been removed +- Field `ConnectionMonitorsClientGetResult` of struct `ConnectionMonitorsClientGetResponse` has been removed +- Field `RawResponse` of struct `ConnectionMonitorsClientGetResponse` has been removed +- Field `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResult` of struct `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResult` of struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientDeleteResponse` has been removed +- Field `ExpressRouteGatewaysClientListBySubscriptionResult` of struct `ExpressRouteGatewaysClientListBySubscriptionResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientListBySubscriptionResponse` has been removed +- Field `PeerExpressRouteCircuitConnectionsClientGetResult` of struct `PeerExpressRouteCircuitConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `PeerExpressRouteCircuitConnectionsClientGetResponse` has been removed +- Field `ExpressRouteCircuitsClientListRoutesTableResult` of struct `ExpressRouteCircuitsClientListRoutesTableResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientListRoutesTableResponse` has been removed +- Field `InterfaceIPConfigurationsClientListResult` of struct `InterfaceIPConfigurationsClientListResponse` has been removed +- Field `RawResponse` of struct `InterfaceIPConfigurationsClientListResponse` has been removed +- Field `AzureFirewallFqdnTagsClientListAllResult` of struct `AzureFirewallFqdnTagsClientListAllResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallFqdnTagsClientListAllResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientGetResult` of struct `ExpressRouteCrossConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientGetResponse` has been removed +- Field `CustomIPPrefixesClientListResult` of struct `CustomIPPrefixesClientListResponse` has been removed +- Field `RawResponse` of struct `CustomIPPrefixesClientListResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult` of struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse` has been removed +- Field `PublicIPPrefixesClientCreateOrUpdateResult` of struct `PublicIPPrefixesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientCreateOrUpdateResponse` has been removed +- Field `P2SVPNGatewaysClientCreateOrUpdateResult` of struct `P2SVPNGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientCreateOrUpdateResponse` has been removed +- Field `ResourceNavigationLinksClientListResult` of struct `ResourceNavigationLinksClientListResponse` has been removed +- Field `RawResponse` of struct `ResourceNavigationLinksClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubIPConfigurationClientDeleteResponse` has been removed +- Field `RawResponse` of struct `WebApplicationFirewallPoliciesClientDeleteResponse` has been removed +- Field `VirtualNetworkGatewaysClientGetAdvertisedRoutesResult` of struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse` has been removed +- Field `InboundNatRulesClientCreateOrUpdateResult` of struct `InboundNatRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `InboundNatRulesClientCreateOrUpdateResponse` has been removed +- Field `FlowLogsClientUpdateTagsResult` of struct `FlowLogsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `FlowLogsClientUpdateTagsResponse` has been removed +- Field `VPNSiteLinksClientListByVPNSiteResult` of struct `VPNSiteLinksClientListByVPNSiteResponse` has been removed +- Field `RawResponse` of struct `VPNSiteLinksClientListByVPNSiteResponse` has been removed +- Field `ExpressRouteGatewaysClientGetResult` of struct `ExpressRouteGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteGatewaysClientGetResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientListRoutesTableResult` of struct `ExpressRouteCrossConnectionsClientListRoutesTableResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientListRoutesTableResponse` has been removed +- Field `LoadBalancersClientUpdateTagsResult` of struct `LoadBalancersClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `LoadBalancersClientUpdateTagsResponse` has been removed +- Field `RoutesClientListResult` of struct `RoutesClientListResponse` has been removed +- Field `RawResponse` of struct `RoutesClientListResponse` has been removed +- Field `HubRouteTablesClientGetResult` of struct `HubRouteTablesClientGetResponse` has been removed +- Field `RawResponse` of struct `HubRouteTablesClientGetResponse` has been removed +- Field `ExpressRouteCrossConnectionPeeringsClientListResult` of struct `ExpressRouteCrossConnectionPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualRouterPeeringsClientDeleteResponse` has been removed +- Field `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResult` of struct `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse` has been removed +- Field `DdosProtectionPlansClientListByResourceGroupResult` of struct `DdosProtectionPlansClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `DdosProtectionPlansClientListByResourceGroupResponse` has been removed +- Field `IPGroupsClientListResult` of struct `IPGroupsClientListResponse` has been removed +- Field `RawResponse` of struct `IPGroupsClientListResponse` has been removed +- Field `NatRulesClientCreateOrUpdateResult` of struct `NatRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `NatRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNConnectionsClientDeleteResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult` of struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse` has been removed +- Field `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResult` of struct `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse` has been removed +- Field `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult` of struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse` has been removed +- Field `WatchersClientListAllResult` of struct `WatchersClientListAllResponse` has been removed +- Field `RawResponse` of struct `WatchersClientListAllResponse` has been removed +- Field `IPAllocationsClientCreateOrUpdateResult` of struct `IPAllocationsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `IPAllocationsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientDeleteResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientStartResponse` has been removed +- Field `VirtualAppliancesClientListByResourceGroupResult` of struct `VirtualAppliancesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientListByResourceGroupResponse` has been removed +- Field `VirtualNetworksClientListAllResult` of struct `VirtualNetworksClientListAllResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientListAllResponse` has been removed +- Field `FirewallPolicyIdpsSignaturesClientListResult` of struct `FirewallPolicyIdpsSignaturesClientListResponse` has been removed +- Field `RawResponse` of struct `FirewallPolicyIdpsSignaturesClientListResponse` has been removed +- Field `AzureFirewallsClientListResult` of struct `AzureFirewallsClientListResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientListResponse` has been removed +- Field `VirtualWansClientUpdateTagsResult` of struct `VirtualWansClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientUpdateTagsResponse` has been removed +- Field `VirtualWansClientListByResourceGroupResult` of struct `VirtualWansClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VirtualWansClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VPNSitesClientDeleteResponse` has been removed +- Field `PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult` of struct `PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse` has been removed +- Field `ExpressRouteConnectionsClientListResult` of struct `ExpressRouteConnectionsClientListResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteConnectionsClientListResponse` has been removed +- Field `ExpressRouteCrossConnectionsClientCreateOrUpdateResult` of struct `ExpressRouteCrossConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RouteFiltersClientUpdateTagsResult` of struct `RouteFiltersClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientUpdateTagsResponse` has been removed +- Field `VirtualNetworkTapsClientCreateOrUpdateResult` of struct `VirtualNetworkTapsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkTapsClientCreateOrUpdateResponse` has been removed +- Field `ExpressRouteCircuitPeeringsClientCreateOrUpdateResult` of struct `ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse` has been removed +- Field `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResult` of struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse` has been removed +- Field `RawResponse` of struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse` has been removed +- Field `RawResponse` of struct `InterfaceTapConfigurationsClientDeleteResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitsClientDeleteResponse` has been removed +- Field `ApplicationGatewayPrivateEndpointConnectionsClientGetResult` of struct `ApplicationGatewayPrivateEndpointConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewayPrivateEndpointConnectionsClientGetResponse` has been removed +- Field `WebApplicationFirewallPoliciesClientListAllResult` of struct `WebApplicationFirewallPoliciesClientListAllResponse` has been removed +- Field `RawResponse` of struct `WebApplicationFirewallPoliciesClientListAllResponse` has been removed +- Field `VirtualApplianceSKUsClientListResult` of struct `VirtualApplianceSKUsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualApplianceSKUsClientListResponse` has been removed +- Field `VPNSiteLinkConnectionsClientGetResult` of struct `VPNSiteLinkConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNSiteLinkConnectionsClientGetResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientPrepareNetworkPoliciesResponse` has been removed +- Field `ApplicationSecurityGroupsClientCreateOrUpdateResult` of struct `ApplicationSecurityGroupsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ApplicationSecurityGroupsClientCreateOrUpdateResponse` has been removed +- Field `VirtualHubIPConfigurationClientListResult` of struct `VirtualHubIPConfigurationClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualHubIPConfigurationClientListResponse` has been removed +- Field `RouteFilterRulesClientCreateOrUpdateResult` of struct `RouteFilterRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RouteFilterRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientDeleteResponse` has been removed +- Field `WatchersClientGetTroubleshootingResultResult` of struct `WatchersClientGetTroubleshootingResultResponse` has been removed +- Field `RawResponse` of struct `WatchersClientGetTroubleshootingResultResponse` has been removed +- Field `VPNServerConfigurationsClientCreateOrUpdateResult` of struct `VPNServerConfigurationsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientCreateOrUpdateResponse` has been removed +- Field `PrivateEndpointsClientListResult` of struct `PrivateEndpointsClientListResponse` has been removed +- Field `RawResponse` of struct `PrivateEndpointsClientListResponse` has been removed +- Field `VPNSiteLinksClientGetResult` of struct `VPNSiteLinksClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNSiteLinksClientGetResponse` has been removed +- Field `FirewallPoliciesClientListResult` of struct `FirewallPoliciesClientListResponse` has been removed +- Field `RawResponse` of struct `FirewallPoliciesClientListResponse` has been removed +- Field `SubnetsClientCreateOrUpdateResult` of struct `SubnetsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientCreateOrUpdateResponse` has been removed +- Field `ServiceEndpointPolicyDefinitionsClientListByResourceGroupResult` of struct `ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse` has been removed +- Field `ServiceEndpointPoliciesClientUpdateTagsResult` of struct `ServiceEndpointPoliciesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientUpdateTagsResponse` has been removed +- Field `ExpressRouteCircuitConnectionsClientCreateOrUpdateResult` of struct `ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteConnectionsClientDeleteResponse` has been removed +- Field `ExpressRoutePortsClientCreateOrUpdateResult` of struct `ExpressRoutePortsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRoutePortsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `WatchersClientDeleteResponse` has been removed +- Field `SubnetsClientGetResult` of struct `SubnetsClientGetResponse` has been removed +- Field `RawResponse` of struct `SubnetsClientGetResponse` has been removed +- Field `RoutingIntentClientCreateOrUpdateResult` of struct `RoutingIntentClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RoutingIntentClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RouteFilterRulesClientDeleteResponse` has been removed +- Field `DdosCustomPoliciesClientUpdateTagsResult` of struct `DdosCustomPoliciesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `DdosCustomPoliciesClientUpdateTagsResponse` has been removed +- Field `ManagementClientPutBastionShareableLinkResult` of struct `ManagementClientPutBastionShareableLinkResponse` has been removed +- Field `RawResponse` of struct `ManagementClientPutBastionShareableLinkResponse` has been removed +- Field `AvailableServiceAliasesClientListByResourceGroupResult` of struct `AvailableServiceAliasesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `AvailableServiceAliasesClientListByResourceGroupResponse` has been removed +- Field `VirtualHubIPConfigurationClientCreateOrUpdateResult` of struct `VirtualHubIPConfigurationClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualHubIPConfigurationClientCreateOrUpdateResponse` has been removed +- Field `ServiceEndpointPoliciesClientListByResourceGroupResult` of struct `ServiceEndpointPoliciesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientListByResourceGroupResponse` has been removed +- Field `VirtualRouterPeeringsClientGetResult` of struct `VirtualRouterPeeringsClientGetResponse` has been removed +- Field `RawResponse` of struct `VirtualRouterPeeringsClientGetResponse` has been removed +- Field `AvailablePrivateEndpointTypesClientListByResourceGroupResult` of struct `AvailablePrivateEndpointTypesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `AvailablePrivateEndpointTypesClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientDeleteResponse` has been removed +- Field `RawResponse` of struct `NatGatewaysClientDeleteResponse` has been removed +- Field `LoadBalancerOutboundRulesClientGetResult` of struct `LoadBalancerOutboundRulesClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerOutboundRulesClientGetResponse` has been removed +- Field `VirtualNetworksClientUpdateTagsResult` of struct `VirtualNetworksClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworksClientUpdateTagsResponse` has been removed +- Field `VirtualNetworkGatewaysClientGeneratevpnclientpackageResult` of struct `VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse` has been removed +- Field `VirtualHubBgpConnectionClientCreateOrUpdateResult` of struct `VirtualHubBgpConnectionClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionClientCreateOrUpdateResponse` has been removed +- Field `VirtualHubsClientUpdateTagsResult` of struct `VirtualHubsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualHubsClientUpdateTagsResponse` has been removed +- Field `P2SVPNGatewaysClientUpdateTagsResult` of struct `P2SVPNGatewaysClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `P2SVPNGatewaysClientUpdateTagsResponse` has been removed +- Field `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult` of struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse` has been removed +- Field `VirtualNetworkGatewayConnectionsClientUpdateTagsResult` of struct `VirtualNetworkGatewayConnectionsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VPNLinkConnectionsClientResetConnectionResponse` has been removed +- Field `VirtualAppliancesClientUpdateTagsResult` of struct `VirtualAppliancesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `VirtualAppliancesClientDeleteResponse` has been removed +- Field `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResult` of struct `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse` has been removed +- Field `RawResponse` of struct `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse` has been removed +- Field `ApplicationGatewaysClientCreateOrUpdateResult` of struct `ApplicationGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteCircuitAuthorizationsClientDeleteResponse` has been removed +- Field `VPNGatewaysClientGetResult` of struct `VPNGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientGetResponse` has been removed +- Field `ServiceTagInformationClientListResult` of struct `ServiceTagInformationClientListResponse` has been removed +- Field `RawResponse` of struct `ServiceTagInformationClientListResponse` has been removed +- Field `PublicIPPrefixesClientUpdateTagsResult` of struct `PublicIPPrefixesClientUpdateTagsResponse` has been removed +- Field `RawResponse` of struct `PublicIPPrefixesClientUpdateTagsResponse` has been removed +- Field `LoadBalancerProbesClientGetResult` of struct `LoadBalancerProbesClientGetResponse` has been removed +- Field `RawResponse` of struct `LoadBalancerProbesClientGetResponse` has been removed +- Field `PacketCapturesClientGetResult` of struct `PacketCapturesClientGetResponse` has been removed +- Field `RawResponse` of struct `PacketCapturesClientGetResponse` has been removed +- Field `PublicIPAddressesClientCreateOrUpdateResult` of struct `PublicIPAddressesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PublicIPAddressesClientCreateOrUpdateResponse` has been removed +- Field `AzureFirewallsClientCreateOrUpdateResult` of struct `AzureFirewallsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `AzureFirewallsClientCreateOrUpdateResponse` has been removed +- Field `VirtualNetworkGatewaysClientStopPacketCaptureResult` of struct `VirtualNetworkGatewaysClientStopPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientStopPacketCaptureResponse` has been removed +- Field `RoutingIntentClientGetResult` of struct `RoutingIntentClientGetResponse` has been removed +- Field `RawResponse` of struct `RoutingIntentClientGetResponse` has been removed +- Field `ExpressRouteConnectionsClientCreateOrUpdateResult` of struct `ExpressRouteConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `ExpressRouteConnectionsClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `PrivateDNSZoneGroupsClientDeleteResponse` has been removed +- Field `SecurityGroupsClientListResult` of struct `SecurityGroupsClientListResponse` has been removed +- Field `RawResponse` of struct `SecurityGroupsClientListResponse` has been removed +- Field `VPNGatewaysClientStopPacketCaptureResult` of struct `VPNGatewaysClientStopPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VPNGatewaysClientStopPacketCaptureResponse` has been removed +- Field `RawResponse` of struct `VPNSitesConfigurationClientDownloadResponse` has been removed +- Field `RawResponse` of struct `VirtualHubBgpConnectionClientDeleteResponse` has been removed +- Field `DdosCustomPoliciesClientGetResult` of struct `DdosCustomPoliciesClientGetResponse` has been removed +- Field `RawResponse` of struct `DdosCustomPoliciesClientGetResponse` has been removed +- Field `VirtualRouterPeeringsClientListResult` of struct `VirtualRouterPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualRouterPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `ManagementClientDeleteBastionShareableLinkResponse` has been removed +- Field `RouteFiltersClientListResult` of struct `RouteFiltersClientListResponse` has been removed +- Field `RawResponse` of struct `RouteFiltersClientListResponse` has been removed +- Field `ApplicationGatewaysClientGetResult` of struct `ApplicationGatewaysClientGetResponse` has been removed +- Field `RawResponse` of struct `ApplicationGatewaysClientGetResponse` has been removed +- Field `VirtualRoutersClientListByResourceGroupResult` of struct `VirtualRoutersClientListByResourceGroupResponse` has been removed +- Field `RawResponse` of struct `VirtualRoutersClientListByResourceGroupResponse` has been removed +- Field `RouteTablesClientCreateOrUpdateResult` of struct `RouteTablesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `RouteTablesClientCreateOrUpdateResponse` has been removed +- Field `HubRouteTablesClientCreateOrUpdateResult` of struct `HubRouteTablesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `HubRouteTablesClientCreateOrUpdateResponse` has been removed +- Field `ServiceEndpointPoliciesClientListResult` of struct `ServiceEndpointPoliciesClientListResponse` has been removed +- Field `RawResponse` of struct `ServiceEndpointPoliciesClientListResponse` has been removed +- Field `VirtualNetworkPeeringsClientListResult` of struct `VirtualNetworkPeeringsClientListResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkPeeringsClientListResponse` has been removed +- Field `AvailableDelegationsClientListResult` of struct `AvailableDelegationsClientListResponse` has been removed +- Field `RawResponse` of struct `AvailableDelegationsClientListResponse` has been removed +- Field `SecurityRulesClientCreateOrUpdateResult` of struct `SecurityRulesClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `SecurityRulesClientCreateOrUpdateResponse` has been removed +- Field `AvailablePrivateEndpointTypesClientListResult` of struct `AvailablePrivateEndpointTypesClientListResponse` has been removed +- Field `RawResponse` of struct `AvailablePrivateEndpointTypesClientListResponse` has been removed +- Field `WebApplicationFirewallPoliciesClientGetResult` of struct `WebApplicationFirewallPoliciesClientGetResponse` has been removed +- Field `RawResponse` of struct `WebApplicationFirewallPoliciesClientGetResponse` has been removed +- Field `VirtualNetworkGatewaysClientCreateOrUpdateResult` of struct `VirtualNetworkGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewaysClientCreateOrUpdateResponse` has been removed +- Field `RawResponse` of struct `VirtualNetworkGatewayConnectionsClientDeleteResponse` has been removed +- Field `VPNServerConfigurationsClientGetResult` of struct `VPNServerConfigurationsClientGetResponse` has been removed +- Field `RawResponse` of struct `VPNServerConfigurationsClientGetResponse` has been removed +- Field `BgpServiceCommunitiesClientListResult` of struct `BgpServiceCommunitiesClientListResponse` has been removed +- Field `RawResponse` of struct `BgpServiceCommunitiesClientListResponse` has been removed + +### Features Added + +- New function `*VPNLinkConnectionsClientGetIkeSasResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewaysClientGenerateVPNProfileResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewaysClientStopPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewayConnectionsClientGetIkeSasResponse.UnmarshalJSON([]byte) error` +- New function `*VPNGatewaysClientStartPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VPNConnectionsClientStopPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VPNConnectionsClientStartPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VirtualNetworkGatewaysClientStartPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New function `*VPNGatewaysClientStopPacketCaptureResponse.UnmarshalJSON([]byte) error` +- New anonymous field `BastionShareableLinkListResult` in struct `ManagementClientGetBastionShareableLinkResponse` +- New anonymous field `ConnectionResetSharedKey` in struct `VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse` +- New field `ResumeToken` in struct `DdosProtectionPlansClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetworkGateway` in struct `VirtualNetworkGatewaysClientGetResponse` +- New anonymous field `NextHopResult` in struct `WatchersClientGetNextHopResponse` +- New field `ResumeToken` in struct `PrivateDNSZoneGroupsClientBeginDeleteOptions` +- New anonymous field `PacketCaptureResult` in struct `PacketCapturesClientCreateResponse` +- New anonymous field `VirtualNetworkTapListResult` in struct `VirtualNetworkTapsClientListByResourceGroupResponse` +- New anonymous field `ExpressRouteCircuitConnection` in struct `ExpressRouteCircuitConnectionsClientGetResponse` +- New anonymous field `ApplicationSecurityGroupListResult` in struct `ApplicationSecurityGroupsClientListAllResponse` +- New anonymous field `AzureFirewall` in struct `AzureFirewallsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `RoutingIntentClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `PublicIPPrefixesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions` +- New anonymous field `P2SVPNGateway` in struct `P2SVPNGatewaysClientUpdateTagsResponse` +- New anonymous field `ApplicationGateway` in struct `ApplicationGatewaysClientGetResponse` +- New anonymous field `Route` in struct `RoutesClientCreateOrUpdateResponse` +- New anonymous field `SecurityRuleListResult` in struct `SecurityRulesClientListResponse` +- New anonymous field `WebApplicationFirewallPolicyListResult` in struct `WebApplicationFirewallPoliciesClientListAllResponse` +- New anonymous field `ConnectionMonitorResult` in struct `ConnectionMonitorsClientGetResponse` +- New anonymous field `GenerateExpressRoutePortsLOAResult` in struct `ExpressRoutePortsClientGenerateLOAResponse` +- New field `ResumeToken` in struct `VPNConnectionsClientBeginStopPacketCaptureOptions` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginStartPacketCaptureOptions` +- New anonymous field `AvailableServiceAliasesResult` in struct `AvailableServiceAliasesClientListResponse` +- New field `ResumeToken` in struct `HubVirtualNetworkConnectionsClientBeginDeleteOptions` +- New anonymous field `Profile` in struct `ProfilesClientGetResponse` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListResponse` +- New anonymous field `DscpConfiguration` in struct `DscpConfigurationClientCreateOrUpdateResponse` +- New anonymous field `PublicIPPrefix` in struct `PublicIPPrefixesClientUpdateTagsResponse` +- New anonymous field `LocalNetworkGateway` in struct `LocalNetworkGatewaysClientCreateOrUpdateResponse` +- New anonymous field `SecurityRule` in struct `SecurityRulesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions` +- New anonymous field `LoadBalancer` in struct `LoadBalancersClientUpdateTagsResponse` +- New anonymous field `ListVPNServerConfigurationsResult` in struct `VPNServerConfigurationsClientListByResourceGroupResponse` +- New anonymous field `ExpressRouteGatewayList` in struct `ExpressRouteGatewaysClientListBySubscriptionResponse` +- New anonymous field `VirtualWanSecurityProviders` in struct `ManagementClientSupportedSecurityProvidersResponse` +- New field `ResumeToken` in struct `PublicIPAddressesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginDeleteOptions` +- New anonymous field `ListHubRouteTablesResult` in struct `HubRouteTablesClientListResponse` +- New anonymous field `AzureWebCategory` in struct `WebCategoriesClientGetResponse` +- New anonymous field `FirewallPolicy` in struct `FirewallPoliciesClientGetResponse` +- New anonymous field `CustomIPPrefix` in struct `CustomIPPrefixesClientCreateOrUpdateResponse` +- New anonymous field `DdosProtectionPlan` in struct `DdosProtectionPlansClientGetResponse` +- New anonymous field `AzureFirewall` in struct `AzureFirewallsClientUpdateTagsResponse` +- New anonymous field `ExpressRouteCircuitPeeringListResult` in struct `ExpressRouteCircuitPeeringsClientListResponse` +- New anonymous field `VirtualNetworkTap` in struct `VirtualNetworkTapsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `SubnetsClientBeginPrepareNetworkPoliciesOptions` +- New anonymous field `FirewallPolicyListResult` in struct `FirewallPoliciesClientListResponse` +- New anonymous field `ExpressRouteCircuitStats` in struct `ExpressRouteCircuitsClientGetStatsResponse` +- New field `ResumeToken` in struct `SubnetsClientBeginCreateOrUpdateOptions` +- New anonymous field `ApplicationGatewaySSLPredefinedPolicy` in struct `ApplicationGatewaysClientGetSSLPredefinedPolicyResponse` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse` +- New anonymous field `ExpressRouteConnection` in struct `ExpressRouteConnectionsClientCreateOrUpdateResponse` +- New anonymous field `ListVirtualWANsResult` in struct `VirtualWansClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions` +- New field `Value` in struct `VirtualNetworkGatewaysClientStopPacketCaptureResponse` +- New anonymous field `PrivateDNSZoneGroupListResult` in struct `PrivateDNSZoneGroupsClientListResponse` +- New anonymous field `SubnetListResult` in struct `SubnetsClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions` +- New anonymous field `PrivateEndpointListResult` in struct `PrivateEndpointsClientListBySubscriptionResponse` +- New field `ResumeToken` in struct `SecurityPartnerProvidersClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualWAN` in struct `VirtualWansClientUpdateTagsResponse` +- New anonymous field `SecurityGroupListResult` in struct `SecurityGroupsClientListResponse` +- New anonymous field `ApplicationSecurityGroupListResult` in struct `ApplicationSecurityGroupsClientListResponse` +- New anonymous field `DscpConfiguration` in struct `DscpConfigurationClientGetResponse` +- New anonymous field `GatewayRouteListResult` in struct `VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse` +- New anonymous field `SecurityGroupViewResult` in struct `WatchersClientGetVMSecurityRulesResponse` +- New field `ResumeToken` in struct `InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions` +- New anonymous field `LoadBalancerListResult` in struct `LoadBalancersClientListAllResponse` +- New anonymous field `ExpressRouteGateway` in struct `ExpressRouteGatewaysClientGetResponse` +- New field `ResumeToken` in struct `RouteFiltersClientBeginDeleteOptions` +- New anonymous field `Probe` in struct `LoadBalancerProbesClientGetResponse` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetworkPeeringListResult` in struct `VirtualNetworkPeeringsClientListResponse` +- New anonymous field `FirewallPolicyRuleCollectionGroup` in struct `FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `InboundNatRulesClientBeginDeleteOptions` +- New anonymous field `VirtualWAN` in struct `VirtualWansClientCreateOrUpdateResponse` +- New anonymous field `WebApplicationFirewallPolicyListResult` in struct `WebApplicationFirewallPoliciesClientListResponse` +- New anonymous field `ExpressRouteGatewayList` in struct `ExpressRouteGatewaysClientListByResourceGroupResponse` +- New anonymous field `ExpressRouteCrossConnectionPeeringList` in struct `ExpressRouteCrossConnectionPeeringsClientListResponse` +- New anonymous field `VPNConnection` in struct `VPNConnectionsClientGetResponse` +- New anonymous field `ListVPNGatewayNatRulesResult` in struct `NatRulesClientListByVPNGatewayResponse` +- New anonymous field `BackendAddressInboundNatRulePortMappings` in struct `LoadBalancersClientListInboundNatRulePortMappingsResponse` +- New field `ResumeToken` in struct `VPNServerConfigurationsClientBeginCreateOrUpdateOptions` +- New anonymous field `AvailableDelegationsResult` in struct `AvailableResourceGroupDelegationsClientListResponse` +- New field `ResumeToken` in struct `InboundNatRulesClientBeginCreateOrUpdateOptions` +- New anonymous field `ServiceTagInformationListResult` in struct `ServiceTagInformationClientListResponse` +- New field `ResumeToken` in struct `WatchersClientBeginGetVMSecurityRulesOptions` +- New anonymous field `VPNSiteLinkConnection` in struct `VPNSiteLinkConnectionsClientGetResponse` +- New anonymous field `VirtualNetworkPeering` in struct `VirtualNetworkPeeringsClientGetResponse` +- New anonymous field `SecurityPartnerProvider` in struct `SecurityPartnerProvidersClientCreateOrUpdateResponse` +- New anonymous field `ApplicationGateway` in struct `ApplicationGatewaysClientCreateOrUpdateResponse` +- New anonymous field `VirtualApplianceSiteListResult` in struct `VirtualApplianceSitesClientListResponse` +- New anonymous field `ListP2SVPNGatewaysResult` in struct `P2SVPNGatewaysClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions` +- New anonymous field `ExpressRoutePort` in struct `ExpressRoutePortsClientGetResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions` +- New anonymous field `BastionActiveSessionListResult` in struct `ManagementClientGetActiveSessionsResponse` +- New anonymous field `InterfaceTapConfiguration` in struct `InterfaceTapConfigurationsClientGetResponse` +- New anonymous field `ApplicationGatewayPrivateEndpointConnection` in struct `ApplicationGatewayPrivateEndpointConnectionsClientGetResponse` +- New field `ResumeToken` in struct `InterfacesClientBeginGetEffectiveRouteTableOptions` +- New anonymous field `BastionHostListResult` in struct `BastionHostsClientListResponse` +- New field `ResumeToken` in struct `FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `WebApplicationFirewallPoliciesClientBeginDeleteOptions` +- New anonymous field `P2SVPNGateway` in struct `P2SVPNGatewaysClientGetResponse` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse` +- New anonymous field `LoadBalancer` in struct `LoadBalancersClientCreateOrUpdateResponse` +- New anonymous field `ExpressRoutePort` in struct `ExpressRoutePortsClientUpdateTagsResponse` +- New anonymous field `ServiceEndpointPolicy` in struct `ServiceEndpointPoliciesClientUpdateTagsResponse` +- New anonymous field `WebApplicationFirewallPolicy` in struct `WebApplicationFirewallPoliciesClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions` +- New field `ResumeToken` in struct `ConnectionMonitorsClientBeginDeleteOptions` +- New anonymous field `DdosCustomPolicy` in struct `DdosCustomPoliciesClientUpdateTagsResponse` +- New anonymous field `ListVPNSitesResult` in struct `VPNSitesClientListResponse` +- New anonymous field `ExpressRouteLinkListResult` in struct `ExpressRouteLinksClientListResponse` +- New anonymous field `ConnectionSharedKey` in struct `VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse` +- New anonymous field `VirtualRouter` in struct `VirtualRoutersClientGetResponse` +- New field `ResumeToken` in struct `LoadBalancersClientBeginSwapPublicIPAddressesOptions` +- New field `Value` in struct `VirtualNetworkGatewaysClientSupportedVPNDevicesResponse` +- New anonymous field `VPNSite` in struct `VPNSitesClientCreateOrUpdateResponse` +- New anonymous field `Watcher` in struct `WatchersClientUpdateTagsResponse` +- New anonymous field `LoadBalancer` in struct `LoadBalancersClientGetResponse` +- New anonymous field `VirtualApplianceListResult` in struct `VirtualAppliancesClientListResponse` +- New field `Value` in struct `VPNLinkConnectionsClientGetIkeSasResponse` +- New field `ResumeToken` in struct `BastionHostsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `PrivateEndpointsClientBeginDeleteOptions` +- New anonymous field `SignaturesOverrides` in struct `FirewallPolicyIdpsSignaturesOverridesClientPutResponse` +- New anonymous field `DdosProtectionPlan` in struct `DdosProtectionPlansClientCreateOrUpdateResponse` +- New anonymous field `FrontendIPConfiguration` in struct `LoadBalancerFrontendIPConfigurationsClientGetResponse` +- New anonymous field `VirtualRouterListResult` in struct `VirtualRoutersClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `WatchersClientBeginCheckConnectivityOptions` +- New field `ResumeToken` in struct `RoutesClientBeginDeleteOptions` +- New anonymous field `ConnectivityInformation` in struct `WatchersClientCheckConnectivityResponse` +- New anonymous field `SecurityPartnerProviderListResult` in struct `SecurityPartnerProvidersClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions` +- New anonymous field `IPAllocation` in struct `IPAllocationsClientCreateOrUpdateResponse` +- New anonymous field `SecurityRule` in struct `DefaultSecurityRulesClientGetResponse` +- New anonymous field `ApplicationGatewayListResult` in struct `ApplicationGatewaysClientListResponse` +- New anonymous field `EffectiveRouteListResult` in struct `InterfacesClientGetEffectiveRouteTableResponse` +- New anonymous field `HubIPConfiguration` in struct `VirtualHubIPConfigurationClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions` +- New field `ResumeToken` in struct `VirtualApplianceSitesClientBeginDeleteOptions` +- New anonymous field `AzureReachabilityReport` in struct `WatchersClientGetAzureReachabilityReportResponse` +- New anonymous field `VirtualNetworkGatewayNatRule` in struct `VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse` +- New anonymous field `RouteFilterRule` in struct `RouteFilterRulesClientGetResponse` +- New anonymous field `FirewallPolicyRuleCollectionGroup` in struct `FirewallPolicyRuleCollectionGroupsClientGetResponse` +- New anonymous field `ListVPNServerConfigurationsResult` in struct `VPNServerConfigurationsClientListResponse` +- New field `ResumeToken` in struct `ServiceEndpointPoliciesClientBeginDeleteOptions` +- New anonymous field `InboundNatRuleListResult` in struct `InboundNatRulesClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions` +- New anonymous field `VirtualApplianceSite` in struct `VirtualApplianceSitesClientCreateOrUpdateResponse` +- New anonymous field `ServiceEndpointPolicyDefinition` in struct `ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse` +- New anonymous field `ListVirtualNetworkGatewayNatRulesResult` in struct `VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitsClientBeginCreateOrUpdateOptions` +- New anonymous field `DdosCustomPolicy` in struct `DdosCustomPoliciesClientGetResponse` +- New field `ResumeToken` in struct `VirtualRoutersClientBeginCreateOrUpdateOptions` +- New anonymous field `Interface` in struct `InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse` +- New anonymous field `PrivateEndpoint` in struct `PrivateEndpointsClientGetResponse` +- New anonymous field `VirtualNetworkTap` in struct `VirtualNetworkTapsClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions` +- New anonymous field `FlowLogInformation` in struct `WatchersClientSetFlowLogConfigurationResponse` +- New anonymous field `RouteTableListResult` in struct `RouteTablesClientListResponse` +- New anonymous field `ServiceEndpointPolicyListResult` in struct `ServiceEndpointPoliciesClientListByResourceGroupResponse` +- New anonymous field `PublicIPAddress` in struct `PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse` +- New anonymous field `ListHubVirtualNetworkConnectionsResult` in struct `HubVirtualNetworkConnectionsClientListResponse` +- New field `ResumeToken` in struct `PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions` +- New anonymous field `SecurityRuleListResult` in struct `DefaultSecurityRulesClientListResponse` +- New anonymous field `BackendAddressPool` in struct `LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse` +- New anonymous field `RouteFilterRuleListResult` in struct `RouteFilterRulesClientListByRouteFilterResponse` +- New anonymous field `VPNGateway` in struct `VPNGatewaysClientCreateOrUpdateResponse` +- New anonymous field `VirtualAppliance` in struct `VirtualAppliancesClientUpdateTagsResponse` +- New anonymous field `ExpressRouteCircuitConnection` in struct `ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse` +- New anonymous field `LocalNetworkGateway` in struct `LocalNetworkGatewaysClientUpdateTagsResponse` +- New field `ResumeToken` in struct `IPAllocationsClientBeginDeleteOptions` +- New anonymous field `VPNSite` in struct `VPNSitesClientGetResponse` +- New anonymous field `VirtualRouterPeering` in struct `VirtualRouterPeeringsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions` +- New anonymous field `VirtualApplianceSite` in struct `VirtualApplianceSitesClientGetResponse` +- New field `ResumeToken` in struct `FirewallPoliciesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginStartOptions` +- New anonymous field `ExpressRouteCircuitListResult` in struct `ExpressRouteCircuitsClientListAllResponse` +- New anonymous field `IPAllocationListResult` in struct `IPAllocationsClientListResponse` +- New anonymous field `RouteFilter` in struct `RouteFiltersClientUpdateTagsResponse` +- New anonymous field `LoadBalancingRule` in struct `LoadBalancerLoadBalancingRulesClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginDeleteOptions` +- New field `Value` in struct `VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse` +- New anonymous field `BastionHostListResult` in struct `BastionHostsClientListByResourceGroupResponse` +- New anonymous field `AvailablePrivateEndpointTypesResult` in struct `AvailablePrivateEndpointTypesClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions` +- New anonymous field `LoadBalancerProbeListResult` in struct `LoadBalancerProbesClientListResponse` +- New anonymous field `ListVirtualHubRouteTableV2SResult` in struct `VirtualHubRouteTableV2SClientListResponse` +- New anonymous field `IPGroupListResult` in struct `IPGroupsClientListResponse` +- New anonymous field `ExpressRoutePortListResult` in struct `ExpressRoutePortsClientListByResourceGroupResponse` +- New anonymous field `HubRouteTable` in struct `HubRouteTablesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `WatchersClientBeginListAvailableProvidersOptions` +- New field `ResumeToken` in struct `RouteFiltersClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions` +- New anonymous field `ServiceAssociationLinksListResult` in struct `ServiceAssociationLinksClientListResponse` +- New field `ResumeToken` in struct `ConnectionMonitorsClientBeginStartOptions` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListAllResponse` +- New field `ResumeToken` in struct `IPGroupsClientBeginDeleteOptions` +- New anonymous field `PrivateEndpointConnection` in struct `PrivateLinkServicesClientGetPrivateEndpointConnectionResponse` +- New anonymous field `ApplicationGatewayAvailableWafRuleSetsResult` in struct `ApplicationGatewaysClientListAvailableWafRuleSetsResponse` +- New anonymous field `RouteTableListResult` in struct `RouteTablesClientListAllResponse` +- New field `ResumeToken` in struct `VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions` +- New anonymous field `VirtualHub` in struct `VirtualHubsClientUpdateTagsResponse` +- New anonymous field `InterfaceTapConfigurationListResult` in struct `InterfaceTapConfigurationsClientListResponse` +- New anonymous field `ApplicationGatewayBackendHealthOnDemand` in struct `ApplicationGatewaysClientBackendHealthOnDemandResponse` +- New anonymous field `ListRoutingIntentResult` in struct `RoutingIntentClientListResponse` +- New anonymous field `ExpressRoutePortsLocationListResult` in struct `ExpressRoutePortsLocationsClientListResponse` +- New field `ResumeToken` in struct `HubRouteTablesClientBeginCreateOrUpdateOptions` +- New anonymous field `SignatureOverridesFilterValuesResponse` in struct `FirewallPolicyIdpsSignaturesFilterValuesClientListResponse` +- New field `ResumeToken` in struct `ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions` +- New anonymous field `DdosProtectionPlanListResult` in struct `DdosProtectionPlansClientListResponse` +- New field `ResumeToken` in struct `WatchersClientBeginGetAzureReachabilityReportOptions` +- New field `ResumeToken` in struct `WatchersClientBeginGetTroubleshootingOptions` +- New anonymous field `ExpressRouteConnectionList` in struct `ExpressRouteConnectionsClientListResponse` +- New field `ResumeToken` in struct `VPNServerConfigurationsClientBeginDeleteOptions` +- New anonymous field `VPNSite` in struct `VPNSitesClientUpdateTagsResponse` +- New anonymous field `VirtualNetworkGatewayConnection` in struct `VirtualNetworkGatewayConnectionsClientGetResponse` +- New anonymous field `PublicIPPrefixListResult` in struct `PublicIPPrefixesClientListAllResponse` +- New anonymous field `VirtualHubRouteTableV2` in struct `VirtualHubRouteTableV2SClientGetResponse` +- New anonymous field `ListP2SVPNGatewaysResult` in struct `P2SVPNGatewaysClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions` +- New anonymous field `SecurityGroup` in struct `SecurityGroupsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ConnectionMonitorsClientBeginQueryOptions` +- New field `ResumeToken` in struct `ManagementClientBeginDeleteBastionShareableLinkOptions` +- New anonymous field `PrivateLinkServiceVisibility` in struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse` +- New anonymous field `DdosProtectionPlanListResult` in struct `DdosProtectionPlansClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `VirtualAppliancesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `RouteFilterRulesClientBeginCreateOrUpdateOptions` +- New anonymous field `Interface` in struct `InterfacesClientUpdateTagsResponse` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions` +- New anonymous field `PacketCaptureListResult` in struct `PacketCapturesClientListResponse` +- New anonymous field `InterfaceIPConfiguration` in struct `InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions` +- New anonymous field `AvailableDelegationsResult` in struct `AvailableDelegationsClientListResponse` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VirtualApplianceSitesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `AzureFirewallsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions` +- New anonymous field `SignaturesOverridesList` in struct `FirewallPolicyIdpsSignaturesOverridesClientListResponse` +- New field `Value` in struct `VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse` +- New anonymous field `VirtualWAN` in struct `VirtualWansClientGetResponse` +- New anonymous field `VirtualNetworkGatewayListResult` in struct `VirtualNetworkGatewaysClientListResponse` +- New anonymous field `PrivateEndpoint` in struct `PrivateEndpointsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `SecurityRulesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `IPGroupsClientBeginCreateOrUpdateOptions` +- New anonymous field `InboundNatRule` in struct `InboundNatRulesClientCreateOrUpdateResponse` +- New anonymous field `ProfileListResult` in struct `ProfilesClientListResponse` +- New anonymous field `BastionHost` in struct `BastionHostsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `PacketCapturesClientBeginGetStatusOptions` +- New field `ResumeToken` in struct `SecurityRulesClientBeginDeleteOptions` +- New anonymous field `VirtualNetworkPeering` in struct `VirtualNetworkPeeringsClientCreateOrUpdateResponse` +- New anonymous field `PublicIPAddress` in struct `PublicIPAddressesClientGetResponse` +- New anonymous field `VPNClientIPsecParameters` in struct `VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse` +- New field `ResumeToken` in struct `ExpressRouteGatewaysClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `SubnetsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginResetOptions` +- New field `ResumeToken` in struct `InboundSecurityRuleClientBeginCreateOrUpdateOptions` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitPeeringsClientBeginDeleteOptions` +- New anonymous field `PeerExpressRouteCircuitConnectionListResult` in struct `PeerExpressRouteCircuitConnectionsClientListResponse` +- New anonymous field `InterfaceTapConfiguration` in struct `InterfaceTapConfigurationsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `ExpressRouteConnectionsClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualRouterPeeringListResult` in struct `VirtualRouterPeeringsClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteConnectionsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `LocalNetworkGatewaysClientBeginDeleteOptions` +- New anonymous field `AuthorizationListResult` in struct `ExpressRouteCircuitAuthorizationsClientListResponse` +- New anonymous field `AzureFirewall` in struct `AzureFirewallsClientGetResponse` +- New field `ResumeToken` in struct `VirtualHubIPConfigurationClientBeginDeleteOptions` +- New anonymous field `DscpConfigurationListResult` in struct `DscpConfigurationClientListAllResponse` +- New field `ResumeToken` in struct `BastionHostsClientBeginUpdateTagsOptions` +- New anonymous field `HubVirtualNetworkConnection` in struct `HubVirtualNetworkConnectionsClientGetResponse` +- New anonymous field `PublicIPPrefix` in struct `PublicIPPrefixesClientCreateOrUpdateResponse` +- New anonymous field `ApplicationSecurityGroup` in struct `ApplicationSecurityGroupsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListCloudServiceNetworkInterfacesResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginDeleteOptions` +- New anonymous field `SecurityPartnerProviderListResult` in struct `SecurityPartnerProvidersClientListByResourceGroupResponse` +- New anonymous field `AzureFirewallListResult` in struct `AzureFirewallsClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions` +- New anonymous field `ListVirtualWANsResult` in struct `VirtualWansClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `ExpressRouteGatewaysClientBeginUpdateTagsOptions` +- New anonymous field `ListVirtualHubIPConfigurationResults` in struct `VirtualHubIPConfigurationClientListResponse` +- New field `Value` in struct `VirtualNetworkGatewaysClientStartPacketCaptureResponse` +- New field `ResumeToken` in struct `ManagementClientBeginPutBastionShareableLinkOptions` +- New anonymous field `RouteFilterRule` in struct `RouteFilterRulesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `WatchersClientBeginGetTroubleshootingResultOptions` +- New anonymous field `ExpressRoutePortListResult` in struct `ExpressRoutePortsClientListResponse` +- New field `ResumeToken` in struct `VirtualRouterPeeringsClientBeginDeleteOptions` +- New anonymous field `SignaturesOverrides` in struct `FirewallPolicyIdpsSignaturesOverridesClientGetResponse` +- New field `ResumeToken` in struct `WatchersClientBeginGetNextHopOptions` +- New anonymous field `ExpressRouteConnection` in struct `ExpressRouteConnectionsClientGetResponse` +- New anonymous field `RouteTable` in struct `RouteTablesClientGetResponse` +- New field `ResumeToken` in struct `SubnetsClientBeginUnprepareNetworkPoliciesOptions` +- New anonymous field `PrivateDNSZoneGroup` in struct `PrivateDNSZoneGroupsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VPNSitesConfigurationClientBeginDownloadOptions` +- New anonymous field `ExpressRouteCrossConnectionPeering` in struct `ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse` +- New anonymous field `BgpConnection` in struct `VirtualHubBgpConnectionClientGetResponse` +- New field `ResumeToken` in struct `NatRulesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `InterfacesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `DscpConfigurationClientBeginDeleteOptions` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions` +- New field `ResumeToken` in struct `VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions` +- New field `ResumeToken` in struct `VPNLinkConnectionsClientBeginResetConnectionOptions` +- New anonymous field `RouteTable` in struct `RouteTablesClientUpdateTagsResponse` +- New field `ResumeToken` in struct `PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions` +- New anonymous field `DdosCustomPolicy` in struct `DdosCustomPoliciesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions` +- New anonymous field `ConfigurationDiagnosticResponse` in struct `WatchersClientGetNetworkConfigurationDiagnosticResponse` +- New field `ResumeToken` in struct `VirtualHubRouteTableV2SClientBeginDeleteOptions` +- New anonymous field `VPNClientConnectionHealthDetailListResult` in struct `VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitsClientBeginDeleteOptions` +- New anonymous field `ListVPNSiteLinkConnectionsResult` in struct `VPNLinkConnectionsClientListByVPNConnectionResponse` +- New field `Value` in struct `VirtualNetworkGatewayConnectionsClientGetIkeSasResponse` +- New anonymous field `RouteFilterListResult` in struct `RouteFiltersClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `InterfaceTapConfigurationsClientBeginDeleteOptions` +- New anonymous field `RoutingIntent` in struct `RoutingIntentClientGetResponse` +- New anonymous field `BastionHost` in struct `BastionHostsClientGetResponse` +- New anonymous field `EndpointServicesListResult` in struct `AvailableEndpointServicesClientListResponse` +- New field `ResumeToken` in struct `CustomIPPrefixesClientBeginCreateOrUpdateOptions` +- New anonymous field `RoutingIntent` in struct `RoutingIntentClientCreateOrUpdateResponse` +- New anonymous field `ExpressRouteLink` in struct `ExpressRouteLinksClientGetResponse` +- New field `ResumeToken` in struct `AzureFirewallsClientBeginUpdateTagsOptions` +- New anonymous field `Topology` in struct `WatchersClientGetTopologyResponse` +- New field `ResumeToken` in struct `SecurityPartnerProvidersClientBeginDeleteOptions` +- New anonymous field `NatGateway` in struct `NatGatewaysClientGetResponse` +- New anonymous field `ConnectionMonitorResult` in struct `ConnectionMonitorsClientCreateOrUpdateResponse` +- New anonymous field `PrivateLinkService` in struct `PrivateLinkServicesClientGetResponse` +- New anonymous field `P2SVPNGateway` in struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse` +- New field `ResumeToken` in struct `VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions` +- New field `ResumeToken` in struct `NatRulesClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetworkTapListResult` in struct `VirtualNetworkTapsClientListAllResponse` +- New anonymous field `ExpressRouteCrossConnectionListResult` in struct `ExpressRouteCrossConnectionsClientListResponse` +- New field `ResumeToken` in struct `AzureFirewallsClientBeginDeleteOptions` +- New anonymous field `HubVirtualNetworkConnection` in struct `HubVirtualNetworkConnectionsClientCreateOrUpdateResponse` +- New anonymous field `IPAllocation` in struct `IPAllocationsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginStopOptions` +- New anonymous field `ExpressRouteCircuitsRoutesTableListResult` in struct `ExpressRouteCircuitsClientListRoutesTableResponse` +- New anonymous field `PacketCaptureQueryStatusResult` in struct `PacketCapturesClientGetStatusResponse` +- New field `ResumeToken` in struct `WatchersClientBeginDeleteOptions` +- New anonymous field `ApplicationGatewayPrivateEndpointConnection` in struct `ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse` +- New anonymous field `FirewallPolicyListResult` in struct `FirewallPoliciesClientListAllResponse` +- New anonymous field `ApplicationGatewayBackendHealth` in struct `ApplicationGatewaysClientBackendHealthResponse` +- New field `ResumeToken` in struct `RoutingIntentClientBeginDeleteOptions` +- New anonymous field `Route` in struct `RoutesClientGetResponse` +- New field `ResumeToken` in struct `NatGatewaysClientBeginDeleteOptions` +- New anonymous field `RouteListResult` in struct `RoutesClientListResponse` +- New anonymous field `VirtualApplianceSKU` in struct `VirtualApplianceSKUsClientGetResponse` +- New field `ResumeToken` in struct `ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions` +- New anonymous field `PublicIPAddress` in struct `PublicIPAddressesClientGetCloudServicePublicIPAddressResponse` +- New field `Value` in struct `VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse` +- New anonymous field `AzureFirewallFqdnTagListResult` in struct `AzureFirewallFqdnTagsClientListAllResponse` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListAllResponse` +- New anonymous field `ListVPNGatewaysResult` in struct `VPNGatewaysClientListByResourceGroupResponse` +- New anonymous field `ExpressRoutePortsLocation` in struct `ExpressRoutePortsLocationsClientGetResponse` +- New anonymous field `VirtualNetworkGateway` in struct `VirtualNetworkGatewaysClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `PacketCapturesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `RouteFilterRulesClientBeginDeleteOptions` +- New anonymous field `IPGroup` in struct `IPGroupsClientUpdateGroupsResponse` +- New anonymous field `PublicIPAddress` in struct `PublicIPAddressesClientUpdateTagsResponse` +- New anonymous field `ServiceEndpointPolicyListResult` in struct `ServiceEndpointPoliciesClientListResponse` +- New anonymous field `Watcher` in struct `WatchersClientGetResponse` +- New field `ResumeToken` in struct `VirtualHubsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `InterfacesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginStopPacketCaptureOptions` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkTapsClientBeginCreateOrUpdateOptions` +- New anonymous field `ApplicationSecurityGroup` in struct `ApplicationSecurityGroupsClientGetResponse` +- New anonymous field `FlowLog` in struct `FlowLogsClientGetResponse` +- New anonymous field `ListVirtualHubsResult` in struct `VirtualHubsClientListResponse` +- New anonymous field `PublicIPPrefix` in struct `PublicIPPrefixesClientGetResponse` +- New field `ResumeToken` in struct `RoutesClientBeginCreateOrUpdateOptions` +- New anonymous field `LocalNetworkGateway` in struct `LocalNetworkGatewaysClientGetResponse` +- New field `ResumeToken` in struct `ExpressRouteGatewaysClientBeginDeleteOptions` +- New anonymous field `ExpressRouteCrossConnection` in struct `ExpressRouteCrossConnectionsClientCreateOrUpdateResponse` +- New anonymous field `BgpPeerStatusListResult` in struct `VirtualNetworkGatewaysClientGetBgpPeerStatusResponse` +- New anonymous field `ConnectionMonitorResult` in struct `ConnectionMonitorsClientUpdateTagsResponse` +- New anonymous field `VPNServerConfiguration` in struct `VPNServerConfigurationsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions` +- New anonymous field `BastionSessionDeleteResult` in struct `ManagementClientDisconnectActiveSessionsResponse` +- New anonymous field `VirtualNetworkGateway` in struct `VirtualNetworkGatewaysClientUpdateTagsResponse` +- New field `Value` in struct `VPNGatewaysClientStartPacketCaptureResponse` +- New field `ResumeToken` in struct `VirtualAppliancesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualNetworksClientBeginCreateOrUpdateOptions` +- New anonymous field `VPNGateway` in struct `VPNGatewaysClientGetResponse` +- New anonymous field `FlowLog` in struct `FlowLogsClientCreateOrUpdateResponse` +- New anonymous field `FlowLogListResult` in struct `FlowLogsClientListResponse` +- New anonymous field `VPNGateway` in struct `VPNGatewaysClientResetResponse` +- New anonymous field `InterfaceListResult` in struct `LoadBalancerNetworkInterfacesClientListResponse` +- New anonymous field `VirtualHub` in struct `VirtualHubsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginResetOptions` +- New anonymous field `IPGroup` in struct `IPGroupsClientGetResponse` +- New anonymous field `VirtualNetworkGateway` in struct `VirtualNetworkGatewaysClientResetResponse` +- New anonymous field `SecurityGroup` in struct `SecurityGroupsClientCreateOrUpdateResponse` +- New anonymous field `BackendAddressPool` in struct `LoadBalancerBackendAddressPoolsClientGetResponse` +- New field `ResumeToken` in struct `VirtualRouterPeeringsClientBeginCreateOrUpdateOptions` +- New anonymous field `EffectiveNetworkSecurityGroupListResult` in struct `InterfacesClientListEffectiveNetworkSecurityGroupsResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions` +- New anonymous field `ExpressRouteCircuitListResult` in struct `ExpressRouteCircuitsClientListResponse` +- New anonymous field `ExpressRouteCircuitsRoutesTableListResult` in struct `ExpressRouteCrossConnectionsClientListRoutesTableResponse` +- New anonymous field `VirtualNetwork` in struct `VirtualNetworksClientGetResponse` +- New field `Value` in struct `VPNGatewaysClientStopPacketCaptureResponse` +- New anonymous field `VirtualNetworkListUsageResult` in struct `VirtualNetworksClientListUsageResponse` +- New anonymous field `SecurityGroupListResult` in struct `SecurityGroupsClientListAllResponse` +- New anonymous field `WebApplicationFirewallPolicy` in struct `WebApplicationFirewallPoliciesClientCreateOrUpdateResponse` +- New anonymous field `DscpConfigurationListResult` in struct `DscpConfigurationClientListResponse` +- New anonymous field `ExpressRouteCircuitAuthorization` in struct `ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse` +- New anonymous field `VPNConnection` in struct `VPNConnectionsClientCreateOrUpdateResponse` +- New anonymous field `VirtualApplianceSKUListResult` in struct `VirtualApplianceSKUsClientListResponse` +- New anonymous field `PeerRouteList` in struct `VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse` +- New field `ResumeToken` in struct `VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions` +- New field `ResumeToken` in struct `FlowLogsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualRoutersClientBeginDeleteOptions` +- New anonymous field `PacketCaptureResult` in struct `PacketCapturesClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginUpdateTagsOptions` +- New field `ResumeToken` in struct `PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions` +- New anonymous field `VirtualNetwork` in struct `VirtualNetworksClientUpdateTagsResponse` +- New anonymous field `ExpressRouteCrossConnection` in struct `ExpressRouteCrossConnectionsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `VPNLinkConnectionsClientBeginGetIkeSasOptions` +- New field `ResumeToken` in struct `LoadBalancersClientBeginDeleteOptions` +- New anonymous field `CustomIPPrefix` in struct `CustomIPPrefixesClientUpdateTagsResponse` +- New anonymous field `CustomIPPrefix` in struct `CustomIPPrefixesClientGetResponse` +- New anonymous field `ExpressRouteCrossConnectionListResult` in struct `ExpressRouteCrossConnectionsClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `DdosCustomPoliciesClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetworkTap` in struct `VirtualNetworkTapsClientCreateOrUpdateResponse` +- New anonymous field `VirtualNetworkListResult` in struct `VirtualNetworksClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitsClientBeginListArpTableOptions` +- New field `ResumeToken` in struct `VirtualWansClientBeginCreateOrUpdateOptions` +- New field `StringArray` in struct `ApplicationGatewaysClientListAvailableResponseHeadersResponse` +- New anonymous field `OutboundRule` in struct `LoadBalancerOutboundRulesClientGetResponse` +- New anonymous field `SecurityPartnerProvider` in struct `SecurityPartnerProvidersClientGetResponse` +- New anonymous field `Profile` in struct `ProfilesClientCreateOrUpdateResponse` +- New anonymous field `ServiceEndpointPolicy` in struct `ServiceEndpointPoliciesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `HubRouteTablesClientBeginDeleteOptions` +- New anonymous field `AvailablePrivateEndpointTypesResult` in struct `AvailablePrivateEndpointTypesClientListResponse` +- New anonymous field `ServiceTagsListResult` in struct `ServiceTagsClientListResponse` +- New field `ResumeToken` in struct `ExpressRoutePortsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `BastionHostsClientBeginCreateOrUpdateOptions` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse` +- New anonymous field `WatcherListResult` in struct `WatchersClientListAllResponse` +- New anonymous field `PrivateLinkServiceListResult` in struct `PrivateLinkServicesClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions` +- New field `ResumeToken` in struct `PrivateEndpointsClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualRouterPeering` in struct `VirtualRouterPeeringsClientGetResponse` +- New anonymous field `VirtualAppliance` in struct `VirtualAppliancesClientGetResponse` +- New anonymous field `VPNProfileResponse` in struct `ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse` +- New anonymous field `PrivateLinkServiceListResult` in struct `PrivateLinkServicesClientListBySubscriptionResponse` +- New anonymous field `P2SVPNConnectionHealth` in struct `P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse` +- New anonymous field `VirtualNetworkGatewayConnection` in struct `VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse` +- New anonymous field `AzureFirewallListResult` in struct `AzureFirewallsClientListAllResponse` +- New field `ResumeToken` in struct `ApplicationSecurityGroupsClientBeginDeleteOptions` +- New anonymous field `ApplicationGatewayPrivateEndpointConnectionListResult` in struct `ApplicationGatewayPrivateEndpointConnectionsClientListResponse` +- New anonymous field `ApplicationGatewayListResult` in struct `ApplicationGatewaysClientListAllResponse` +- New anonymous field `PrivateLinkServiceVisibility` in struct `PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse` +- New anonymous field `ExpressRouteCrossConnectionsRoutesTableSummaryListResult` in struct `ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse` +- New anonymous field `ExpressRouteCircuitPeering` in struct `ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `SecurityGroupsClientBeginCreateOrUpdateOptions` +- New anonymous field `ProfileListResult` in struct `ProfilesClientListAllResponse` +- New field `ResumeToken` in struct `VPNConnectionsClientBeginStartPacketCaptureOptions` +- New field `ResumeToken` in struct `ConnectionMonitorsClientBeginCreateOrUpdateOptions` +- New anonymous field `ExpressRouteCircuitsRoutesTableSummaryListResult` in struct `ExpressRouteCircuitsClientListRoutesTableSummaryResponse` +- New field `ResumeToken` in struct `SecurityGroupsClientBeginDeleteOptions` +- New anonymous field `CustomIPPrefixListResult` in struct `CustomIPPrefixesClientListResponse` +- New anonymous field `VerificationIPFlowResult` in struct `WatchersClientVerifyIPFlowResponse` +- New anonymous field `InboundNatRule` in struct `InboundNatRulesClientGetResponse` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginBackendHealthOptions` +- New anonymous field `HubIPConfiguration` in struct `VirtualHubIPConfigurationClientCreateOrUpdateResponse` +- New anonymous field `VPNGateway` in struct `VPNGatewaysClientUpdateTagsResponse` +- New field `ResumeToken` in struct `LoadBalancersClientBeginListInboundNatRulePortMappingsOptions` +- New anonymous field `RouteFilter` in struct `RouteFiltersClientCreateOrUpdateResponse` +- New anonymous field `ExpressRouteCircuitConnectionListResult` in struct `ExpressRouteCircuitConnectionsClientListResponse` +- New anonymous field `VirtualRouterListResult` in struct `VirtualRoutersClientListResponse` +- New anonymous field `ExpressRouteCrossConnectionPeering` in struct `ExpressRouteCrossConnectionPeeringsClientGetResponse` +- New anonymous field `VPNClientIPsecParameters` in struct `VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse` +- New anonymous field `VPNServerConfiguration` in struct `VPNServerConfigurationsClientCreateOrUpdateResponse` +- New anonymous field `Interface` in struct `InterfacesClientGetResponse` +- New anonymous field `FlowLog` in struct `FlowLogsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `ConnectionMonitorsClientBeginStopOptions` +- New anonymous field `VirtualHub` in struct `VirtualHubsClientGetResponse` +- New field `StringArray` in struct `ApplicationGatewaysClientListAvailableServerVariablesResponse` +- New anonymous field `Subnet` in struct `SubnetsClientCreateOrUpdateResponse` +- New anonymous field `VPNProfileResponse` in struct `P2SVPNGatewaysClientGenerateVPNProfileResponse` +- New anonymous field `PeerExpressRouteCircuitConnection` in struct `PeerExpressRouteCircuitConnectionsClientGetResponse` +- New anonymous field `ExpressRouteCircuit` in struct `ExpressRouteCircuitsClientGetResponse` +- New anonymous field `VPNSiteLink` in struct `VPNSiteLinksClientGetResponse` +- New anonymous field `ExpressRouteCrossConnection` in struct `ExpressRouteCrossConnectionsClientGetResponse` +- New field `ResumeToken` in struct `VPNSitesClientBeginCreateOrUpdateOptions` +- New anonymous field `ListVirtualHubBgpConnectionResults` in struct `VirtualHubBgpConnectionsClientListResponse` +- New field `ResumeToken` in struct `ProfilesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ExpressRoutePortsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions` +- New field `Value` in struct `VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse` +- New field `ResumeToken` in struct `VirtualNetworksClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ExpressRouteCrossConnectionsClientBeginListArpTableOptions` +- New anonymous field `ListVPNGatewaysResult` in struct `VPNGatewaysClientListResponse` +- New anonymous field `VPNGatewayNatRule` in struct `NatRulesClientGetResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitsClientBeginListRoutesTableOptions` +- New anonymous field `RouteFilterListResult` in struct `RouteFiltersClientListResponse` +- New anonymous field `QueryResults` in struct `FirewallPolicyIdpsSignaturesClientListResponse` +- New anonymous field `RouteFilter` in struct `RouteFiltersClientGetResponse` +- New anonymous field `PublicIPAddressListResult` in struct `PublicIPAddressesClientListCloudServicePublicIPAddressesResponse` +- New anonymous field `NatGateway` in struct `NatGatewaysClientUpdateTagsResponse` +- New anonymous field `BgpConnection` in struct `VirtualHubBgpConnectionClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `ManagementClientBeginGetActiveSessionsOptions` +- New anonymous field `NatGatewayListResult` in struct `NatGatewaysClientListResponse` +- New anonymous field `AzureWebCategoryListResult` in struct `WebCategoriesClientListBySubscriptionResponse` +- New field `ResumeToken` in struct `VPNSitesClientBeginDeleteOptions` +- New anonymous field `LocalNetworkGatewayListResult` in struct `LocalNetworkGatewaysClientListResponse` +- New field `ResumeToken` in struct `ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions` +- New anonymous field `ExpressRouteCircuitPeering` in struct `ExpressRouteCircuitPeeringsClientGetResponse` +- New anonymous field `SecurityPartnerProvider` in struct `SecurityPartnerProvidersClientUpdateTagsResponse` +- New anonymous field `Interface` in struct `InterfacesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `PublicIPAddressesClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetworkGatewayListConnectionsResult` in struct `VirtualNetworkGatewaysClientListConnectionsResponse` +- New anonymous field `BgpServiceCommunityListResult` in struct `BgpServiceCommunitiesClientListResponse` +- New anonymous field `ListVirtualHubsResult` in struct `VirtualHubsClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `DscpConfigurationClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `CustomIPPrefixesClientBeginDeleteOptions` +- New anonymous field `IPGroup` in struct `IPGroupsClientCreateOrUpdateResponse` +- New anonymous field `InterfaceListResult` in struct `InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualApplianceListResult` in struct `VirtualAppliancesClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `FirewallPoliciesClientBeginCreateOrUpdateOptions` +- New anonymous field `TroubleshootingResult` in struct `WatchersClientGetTroubleshootingResponse` +- New anonymous field `ExpressRouteCircuitStats` in struct `ExpressRouteCircuitsClientGetPeeringStatsResponse` +- New anonymous field `VPNServerConfiguration` in struct `VPNServerConfigurationsClientGetResponse` +- New anonymous field `ExpressRouteCircuit` in struct `ExpressRouteCircuitsClientUpdateTagsResponse` +- New anonymous field `ExpressRouteGateway` in struct `ExpressRouteGatewaysClientCreateOrUpdateResponse` +- New anonymous field `VirtualAppliance` in struct `VirtualAppliancesClientCreateOrUpdateResponse` +- New anonymous field `PrivateDNSZoneGroup` in struct `PrivateDNSZoneGroupsClientGetResponse` +- New anonymous field `BastionShareableLinkListResult` in struct `ManagementClientPutBastionShareableLinkResponse` +- New field `ResumeToken` in struct `VirtualHubsClientBeginDeleteOptions` +- New anonymous field `DdosProtectionPlan` in struct `DdosProtectionPlansClientUpdateTagsResponse` +- New anonymous field `ConnectionSharedKey` in struct `VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse` +- New anonymous field `WatcherListResult` in struct `WatchersClientListResponse` +- New anonymous field `LoadBalancerLoadBalancingRuleListResult` in struct `LoadBalancerLoadBalancingRulesClientListResponse` +- New anonymous field `HubRouteTable` in struct `HubRouteTablesClientGetResponse` +- New anonymous field `IPAddressAvailabilityResult` in struct `VirtualNetworksClientCheckIPAddressAvailabilityResponse` +- New anonymous field `Watcher` in struct `WatchersClientCreateOrUpdateResponse` +- New anonymous field `PrivateEndpointListResult` in struct `PrivateEndpointsClientListResponse` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginUpdateTagsOptions` +- New anonymous field `SecurityRule` in struct `SecurityRulesClientGetResponse` +- New anonymous field `ExpressRouteCircuitsArpTableListResult` in struct `ExpressRouteCrossConnectionsClientListArpTableResponse` +- New anonymous field `VirtualNetworkListResult` in struct `VirtualNetworksClientListAllResponse` +- New anonymous field `InterfaceLoadBalancerListResult` in struct `InterfaceLoadBalancersClientListResponse` +- New anonymous field `PublicIPPrefixListResult` in struct `PublicIPPrefixesClientListResponse` +- New anonymous field `IPGroupListResult` in struct `IPGroupsClientListByResourceGroupResponse` +- New anonymous field `ApplicationGateway` in struct `ApplicationGatewaysClientUpdateTagsResponse` +- New field `ResumeToken` in struct `WatchersClientBeginGetNetworkConfigurationDiagnosticOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginResetOptions` +- New anonymous field `ServiceEndpointPolicyDefinitionListResult` in struct `ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse` +- New anonymous field `DNSNameAvailabilityResult` in struct `ManagementClientCheckDNSNameAvailabilityResponse` +- New anonymous field `VirtualNetworkGatewayConnection` in struct `VirtualNetworkGatewayConnectionsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `VirtualNetworkPeeringsClientBeginDeleteOptions` +- New anonymous field `OperationListResult` in struct `OperationsClientListResponse` +- New field `ResumeToken` in struct `VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualHubRouteTableV2` in struct `VirtualHubRouteTableV2SClientCreateOrUpdateResponse` +- New anonymous field `LoadBalancerOutboundRuleListResult` in struct `LoadBalancerOutboundRulesClientListResponse` +- New anonymous field `RouteTable` in struct `RouteTablesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualRouter` in struct `VirtualRoutersClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginGenerateVPNProfileOptions` +- New anonymous field `VirtualNetworkGatewayConnectionListResult` in struct `VirtualNetworkGatewayConnectionsClientListResponse` +- New field `ResumeToken` in struct `DdosProtectionPlansClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualHubBgpConnectionClientBeginDeleteOptions` +- New field `ResumeToken` in struct `ApplicationGatewaysClientBeginBackendHealthOnDemandOptions` +- New anonymous field `ApplicationGatewayAvailableSSLPredefinedPolicies` in struct `ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse` +- New anonymous field `ApplicationSecurityGroup` in struct `ApplicationSecurityGroupsClientUpdateTagsResponse` +- New field `ResumeToken` in struct `VirtualWansClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VPNConnectionsClientBeginDeleteOptions` +- New field `Value` in struct `VPNConnectionsClientStopPacketCaptureResponse` +- New anonymous field `FlowLogInformation` in struct `WatchersClientGetFlowLogStatusResponse` +- New anonymous field `PrivateLinkService` in struct `PrivateLinkServicesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitConnectionsClientBeginDeleteOptions` +- New anonymous field `Profile` in struct `ProfilesClientUpdateTagsResponse` +- New anonymous field `ExpressRouteCircuit` in struct `ExpressRouteCircuitsClientCreateOrUpdateResponse` +- New anonymous field `ExpressRouteCircuitAuthorization` in struct `ExpressRouteCircuitAuthorizationsClientGetResponse` +- New anonymous field `ExpressRouteServiceProviderListResult` in struct `ExpressRouteServiceProvidersClientListResponse` +- New field `ResumeToken` in struct `VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions` +- New anonymous field `VirtualNetwork` in struct `VirtualNetworksClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `PublicIPPrefixesClientBeginDeleteOptions` +- New anonymous field `FirewallPolicyRuleCollectionGroupListResult` in struct `FirewallPolicyRuleCollectionGroupsClientListResponse` +- New field `ResumeToken` in struct `ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `WatchersClientBeginGetFlowLogStatusOptions` +- New anonymous field `ServiceEndpointPolicyDefinition` in struct `ServiceEndpointPolicyDefinitionsClientGetResponse` +- New anonymous field `ListVPNConnectionsResult` in struct `VPNConnectionsClientListByVPNGatewayResponse` +- New field `ResumeToken` in struct `RouteTablesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `LoadBalancersClientBeginCreateOrUpdateOptions` +- New anonymous field `ServiceEndpointPolicy` in struct `ServiceEndpointPoliciesClientGetResponse` +- New anonymous field `ListVPNSitesResult` in struct `VPNSitesClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions` +- New anonymous field `IPAllocationListResult` in struct `IPAllocationsClientListByResourceGroupResponse` +- New field `ResumeToken` in struct `ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions` +- New anonymous field `AvailableProvidersList` in struct `WatchersClientListAvailableProvidersResponse` +- New field `ResumeToken` in struct `VirtualNetworkTapsClientBeginDeleteOptions` +- New anonymous field `GatewayRouteListResult` in struct `VirtualNetworkGatewaysClientGetLearnedRoutesResponse` +- New anonymous field `LoadBalancerBackendAddressPoolListResult` in struct `LoadBalancerBackendAddressPoolsClientListResponse` +- New anonymous field `VirtualNetworkGatewayNatRule` in struct `VirtualNetworkGatewayNatRulesClientGetResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewayNatRulesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions` +- New field `ResumeToken` in struct `PacketCapturesClientBeginCreateOptions` +- New anonymous field `ConnectionMonitorQueryResult` in struct `ConnectionMonitorsClientQueryResponse` +- New field `ResumeToken` in struct `WatchersClientBeginSetFlowLogConfigurationOptions` +- New field `StringArray` in struct `ApplicationGatewaysClientListAvailableRequestHeadersResponse` +- New field `ResumeToken` in struct `PrivateLinkServicesClientBeginCreateOrUpdateOptions` +- New anonymous field `PrivateEndpointConnectionListResult` in struct `PrivateLinkServicesClientListPrivateEndpointConnectionsResponse` +- New field `ResumeToken` in struct `PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions` +- New anonymous field `ApplicationGatewayPrivateLinkResourceListResult` in struct `ApplicationGatewayPrivateLinkResourcesClientListResponse` +- New anonymous field `IPAllocation` in struct `IPAllocationsClientGetResponse` +- New anonymous field `SignaturesOverrides` in struct `FirewallPolicyIdpsSignaturesOverridesClientPatchResponse` +- New anonymous field `ExpressRouteCircuitsArpTableListResult` in struct `ExpressRouteCircuitsClientListArpTableResponse` +- New field `ResumeToken` in struct `LoadBalancerBackendAddressPoolsClientBeginDeleteOptions` +- New field `ResumeToken` in struct `FlowLogsClientBeginDeleteOptions` +- New anonymous field `VPNGatewayNatRule` in struct `NatRulesClientCreateOrUpdateResponse` +- New anonymous field `AutoApprovedPrivateLinkServicesResult` in struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse` +- New anonymous field `Subnet` in struct `SubnetsClientGetResponse` +- New anonymous field `ResourceNavigationLinksListResult` in struct `ResourceNavigationLinksClientListResponse` +- New field `ResumeToken` in struct `PrivateLinkServicesClientBeginDeleteOptions` +- New anonymous field `InterfaceIPConfigurationListResult` in struct `InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse` +- New anonymous field `P2SVPNGateway` in struct `P2SVPNGatewaysClientResetResponse` +- New field `ResumeToken` in struct `InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions` +- New anonymous field `LoadBalancerFrontendIPConfigurationListResult` in struct `LoadBalancerFrontendIPConfigurationsClientListResponse` +- New field `ResumeToken` in struct `IPAllocationsClientBeginCreateOrUpdateOptions` +- New anonymous field `ExpressRoutePort` in struct `ExpressRoutePortsClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `NatGatewaysClientBeginCreateOrUpdateOptions` +- New anonymous field `P2SVPNGateway` in struct `P2SVPNGatewaysClientCreateOrUpdateResponse` +- New anonymous field `InboundSecurityRule` in struct `InboundSecurityRuleClientCreateOrUpdateResponse` +- New anonymous field `CustomIPPrefixListResult` in struct `CustomIPPrefixesClientListAllResponse` +- New anonymous field `NatGateway` in struct `NatGatewaysClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `DdosCustomPoliciesClientBeginDeleteOptions` +- New field `ResumeToken` in struct `P2SVPNGatewaysClientBeginCreateOrUpdateOptions` +- New anonymous field `AutoApprovedPrivateLinkServicesResult` in struct `PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse` +- New field `ResumeToken` in struct `LocalNetworkGatewaysClientBeginCreateOrUpdateOptions` +- New anonymous field `AvailableServiceAliasesResult` in struct `AvailableServiceAliasesClientListByResourceGroupResponse` +- New anonymous field `TroubleshootingResult` in struct `WatchersClientGetTroubleshootingResultResponse` +- New anonymous field `FirewallPolicy` in struct `FirewallPoliciesClientCreateOrUpdateResponse` +- New field `ResumeToken` in struct `VPNConnectionsClientBeginCreateOrUpdateOptions` +- New anonymous field `InterfaceIPConfigurationListResult` in struct `InterfaceIPConfigurationsClientListResponse` +- New field `ResumeToken` in struct `ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions` +- New anonymous field `LoadBalancerListResult` in struct `LoadBalancersClientListResponse` +- New field `ResumeToken` in struct `RouteTablesClientBeginCreateOrUpdateOptions` +- New field `ResumeToken` in struct `VPNGatewaysClientBeginUpdateTagsOptions` +- New anonymous field `PeerRouteList` in struct `VirtualHubBgpConnectionsClientListLearnedRoutesResponse` +- New field `Value` in struct `VirtualNetworkGatewaysClientGenerateVPNProfileResponse` +- New anonymous field `ExpressRouteGateway` in struct `ExpressRouteGatewaysClientUpdateTagsResponse` +- New field `ResumeToken` in struct `VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions` +- New field `ResumeToken` in struct `VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions` +- New anonymous field `PrivateEndpointConnection` in struct `PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse` +- New anonymous field `Interface` in struct `InterfacesClientGetCloudServiceNetworkInterfaceResponse` +- New anonymous field `ConnectionMonitorListResult` in struct `ConnectionMonitorsClientListResponse` +- New anonymous field `NatGatewayListResult` in struct `NatGatewaysClientListAllResponse` +- New field `Value` in struct `VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse` +- New anonymous field `ListVPNSiteLinksResult` in struct `VPNSiteLinksClientListByVPNSiteResponse` +- New anonymous field `VPNServerConfigurationsResponse` in struct `VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse` +- New anonymous field `BastionHost` in struct `BastionHostsClientCreateOrUpdateResponse` +- New anonymous field `UsagesListResult` in struct `UsagesClientListResponse` +- New anonymous field `PublicIPAddress` in struct `PublicIPAddressesClientCreateOrUpdateResponse` +- New anonymous field `ApplicationGatewayAvailableSSLOptions` in struct `ApplicationGatewaysClientListAvailableSSLOptionsResponse` +- New field `Value` in struct `VPNConnectionsClientStartPacketCaptureResponse` +- New anonymous field `SecurityGroup` in struct `SecurityGroupsClientGetResponse` +- New field `ResumeToken` in struct `WatchersClientBeginVerifyIPFlowOptions` +- New field `ResumeToken` in struct `PacketCapturesClientBeginStopOptions` +- New anonymous field `InterfaceIPConfiguration` in struct `InterfaceIPConfigurationsClientGetResponse` + + ## 0.3.1 (2022-02-22) ### Other Changes diff --git a/sdk/resourcemanager/network/armnetwork/autorest.md b/sdk/resourcemanager/network/armnetwork/autorest.md index 7b12d6093a0a..c9472a8b19b7 100644 --- a/sdk/resourcemanager/network/armnetwork/autorest.md +++ b/sdk/resourcemanager/network/armnetwork/autorest.md @@ -5,8 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/8e4746332979ed6ff3577bdc97dd2065a7577598/specification/network/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/8e4746332979ed6ff3577bdc97dd2065a7577598/specification/network/resource-manager/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/network/resource-manager/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/network/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.3.1 +module-version: 0.4.0 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/network/armnetwork/go.mod b/sdk/resourcemanager/network/armnetwork/go.mod index 24bdeaa6ff2e..3ded25c362e4 100644 --- a/sdk/resourcemanager/network/armnetwork/go.mod +++ b/sdk/resourcemanager/network/armnetwork/go.mod @@ -1,11 +1,29 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork -go 1.16 +go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.1 + github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 - github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.1.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.3.0 github.com/stretchr/testify v1.7.0 ) + +require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.4.0 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dnaeon/go-vcr v1.1.0 // indirect + github.com/golang-jwt/jwt v3.2.1+incompatible // indirect + github.com/google/uuid v1.1.1 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect + golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect + golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect + golang.org/x/text v0.3.7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) diff --git a/sdk/resourcemanager/network/armnetwork/go.sum b/sdk/resourcemanager/network/armnetwork/go.sum index 861905ed56b2..facd9999ed64 100644 --- a/sdk/resourcemanager/network/armnetwork/go.sum +++ b/sdk/resourcemanager/network/armnetwork/go.sum @@ -1,16 +1,13 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0 h1:zBJcBJwte0x6PcPK7XaWDMvK2o2ZM2f1sMaqNNavQ5g= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.22.0/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0/go.mod h1:TmXReXZ9yPp5D5TBRMTAtyz+UyOl15Py4hL5E5p6igQ= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.1 h1:RxemzI2cHD0A8WyMqHu/UnDjfpGES/cmjtPbQoktWqs= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.1/go.mod h1:+nVKciyKD2J9TyVcEQ82Bo9b+3F92PiQfHrIE/zqLqM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0 h1:D7l5jspkc4kwBYRWoZE4DQnu6LVpLwDsMZjBKS4wZLQ= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.23.0/go.mod h1:w5pDIZuawUmY3Bj4tVx3Xb8KS96ToB0j315w9rqpAg0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0 h1:NVS/4LOQfkBpk+B1VopIzv1ptmYeEskA8w/3K/w7vjo= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.14.0/go.mod h1:RG0cZndeZM17StwohYclmcXSr4oOJ8b1I5hB8llIc6Y= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1 h1:sLZ/Y+P/5RRtsXWylBjB5lkgixYfm0MQPiwrSX//JSo= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.1/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.1.0 h1:/hWqo5bAXoNK7svf5GvgpXFPzOCpM29/Eu+WqcE34Uk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.1.0/go.mod h1:wXFq4k1znCwV7Bw70gw4UDNYKv/nrCUr70hjUmOj1Jo= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.3.1 h1:EXTDtCSTfPauGawsG+Ae/W46B1PkrgzuKNrcFqy4ljM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.3.1/go.mod h1:PoA99xQAlN13MyUjzgIPWMZEr0etHpYSuT25LmhR3zQ= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.3.0 h1:gYG7I0WxtCnHSWOFLbWCHLBWr+yzI5UeU9KuGZajf5U= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v0.3.0/go.mod h1:bwEUbGO8V/7KcrqwO14ADZ0m4AkTvSKx3ma68FRc3Bg= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.4.0 h1:TSBK+EXu33WBNrYhWmOecKJAl4z1Z5dtbDmqOzd1zGk= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v0.4.0/go.mod h1:tt77DwGu+r0Ued27YQPhiW8h8YWpYwpfOfi5uRpRMTg= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 h1:WVsrXCnHlDDX8ls+tootqRE87/hL9S/g4ewig9RsD/c= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -21,7 +18,6 @@ github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/ github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -41,21 +37,16 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNm golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go deleted file mode 100644 index 62cbc1a16e62..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivateendpointconnections_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionDelete.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionUpdate.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("", cred, nil) - poller, err := client.BeginUpdate(ctx, - "", - "", - "", - armnetwork.ApplicationGatewayPrivateEndpointConnection{ - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayPrivateEndpointConnectionProperties{ - PrivateEndpoint: &armnetwork.PrivateEndpoint{ - ID: to.StringPtr(""), - }, - PrivateLinkServiceConnectionState: &armnetwork.PrivateLinkServiceConnectionState{ - Description: to.StringPtr(""), - Status: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionGet.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewayPrivateEndpointConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateEndpointConnectionList.json -func ExampleApplicationGatewayPrivateEndpointConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewayPrivateEndpointConnectionsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go deleted file mode 100644 index 1597adc88c1a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgatewayprivatelinkresources_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayPrivateLinkResourceList.json -func ExampleApplicationGatewayPrivateLinkResourcesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewayPrivateLinkResourcesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go deleted file mode 100644 index af5ab0a98c67..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationgateways_client_test.go +++ /dev/null @@ -1,616 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayDelete.json -func ExampleApplicationGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayGet.json -func ExampleApplicationGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayCreate.json -func ExampleApplicationGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ApplicationGateway{ - Location: to.StringPtr(""), - Identity: &armnetwork.ManagedServiceIdentity{ - Type: armnetwork.ResourceIdentityTypeUserAssigned.ToPtr(), - UserAssignedIdentities: map[string]*armnetwork.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ - "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, - Properties: &armnetwork.ApplicationGatewayPropertiesFormat{ - BackendAddressPools: []*armnetwork.ApplicationGatewayBackendAddressPool{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayBackendAddressPoolPropertiesFormat{ - BackendAddresses: []*armnetwork.ApplicationGatewayBackendAddress{ - { - IPAddress: to.StringPtr(""), - }, - { - IPAddress: to.StringPtr(""), - }}, - }, - }, - { - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayBackendAddressPoolPropertiesFormat{ - BackendAddresses: []*armnetwork.ApplicationGatewayBackendAddress{ - {}, - {}}, - }, - }}, - BackendHTTPSettingsCollection: []*armnetwork.ApplicationGatewayBackendHTTPSettings{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayBackendHTTPSettingsPropertiesFormat{ - CookieBasedAffinity: armnetwork.ApplicationGatewayCookieBasedAffinity("Disabled").ToPtr(), - Port: to.Int32Ptr(80), - RequestTimeout: to.Int32Ptr(30), - Protocol: armnetwork.ApplicationGatewayProtocol("Http").ToPtr(), - }, - }}, - FrontendIPConfigurations: []*armnetwork.ApplicationGatewayFrontendIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayFrontendIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - FrontendPorts: []*armnetwork.ApplicationGatewayFrontendPort{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayFrontendPortPropertiesFormat{ - Port: to.Int32Ptr(443), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayFrontendPortPropertiesFormat{ - Port: to.Int32Ptr(80), - }, - }}, - GatewayIPConfigurations: []*armnetwork.ApplicationGatewayIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - GlobalConfiguration: &armnetwork.ApplicationGatewayGlobalConfiguration{ - EnableRequestBuffering: to.BoolPtr(true), - EnableResponseBuffering: to.BoolPtr(true), - }, - HTTPListeners: []*armnetwork.ApplicationGatewayHTTPListener{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayHTTPListenerPropertiesFormat{ - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - FrontendPort: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - RequireServerNameIndication: to.BoolPtr(false), - SSLCertificate: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - SSLProfile: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Protocol: armnetwork.ApplicationGatewayProtocol("Https").ToPtr(), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayHTTPListenerPropertiesFormat{ - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - FrontendPort: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Protocol: armnetwork.ApplicationGatewayProtocol("Http").ToPtr(), - }, - }}, - LoadDistributionPolicies: []*armnetwork.ApplicationGatewayLoadDistributionPolicy{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayLoadDistributionPolicyPropertiesFormat{ - LoadDistributionAlgorithm: armnetwork.ApplicationGatewayLoadDistributionAlgorithm("RoundRobin").ToPtr(), - LoadDistributionTargets: []*armnetwork.ApplicationGatewayLoadDistributionTarget{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayLoadDistributionTargetPropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - WeightPerServer: to.Int32Ptr(40), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayLoadDistributionTargetPropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - WeightPerServer: to.Int32Ptr(60), - }, - }}, - }, - }}, - RequestRoutingRules: []*armnetwork.ApplicationGatewayRequestRoutingRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayRequestRoutingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - HTTPListener: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - LoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Priority: to.Int32Ptr(10), - RewriteRuleSet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - RuleType: armnetwork.ApplicationGatewayRequestRoutingRuleType("Basic").ToPtr(), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayRequestRoutingRulePropertiesFormat{ - HTTPListener: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Priority: to.Int32Ptr(20), - RuleType: armnetwork.ApplicationGatewayRequestRoutingRuleType("PathBasedRouting").ToPtr(), - URLPathMap: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - RewriteRuleSets: []*armnetwork.ApplicationGatewayRewriteRuleSet{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayRewriteRuleSetPropertiesFormat{ - RewriteRules: []*armnetwork.ApplicationGatewayRewriteRule{ - { - Name: to.StringPtr(""), - ActionSet: &armnetwork.ApplicationGatewayRewriteRuleActionSet{ - RequestHeaderConfigurations: []*armnetwork.ApplicationGatewayHeaderConfiguration{ - { - HeaderName: to.StringPtr(""), - HeaderValue: to.StringPtr(""), - }}, - ResponseHeaderConfigurations: []*armnetwork.ApplicationGatewayHeaderConfiguration{ - { - HeaderName: to.StringPtr(""), - HeaderValue: to.StringPtr(""), - }}, - URLConfiguration: &armnetwork.ApplicationGatewayURLConfiguration{ - ModifiedPath: to.StringPtr(""), - }, - }, - Conditions: []*armnetwork.ApplicationGatewayRewriteRuleCondition{ - { - IgnoreCase: to.BoolPtr(true), - Negate: to.BoolPtr(false), - Pattern: to.StringPtr(""), - Variable: to.StringPtr(""), - }}, - RuleSequence: to.Int32Ptr(102), - }}, - }, - }}, - SKU: &armnetwork.ApplicationGatewaySKU{ - Name: armnetwork.ApplicationGatewaySKUName("Standard_v2").ToPtr(), - Capacity: to.Int32Ptr(3), - Tier: armnetwork.ApplicationGatewayTier("Standard_v2").ToPtr(), - }, - SSLCertificates: []*armnetwork.ApplicationGatewaySSLCertificate{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewaySSLCertificatePropertiesFormat{ - Data: to.StringPtr(""), - Password: to.StringPtr(""), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewaySSLCertificatePropertiesFormat{ - KeyVaultSecretID: to.StringPtr(""), - }, - }}, - SSLProfiles: []*armnetwork.ApplicationGatewaySSLProfile{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewaySSLProfilePropertiesFormat{ - ClientAuthConfiguration: &armnetwork.ApplicationGatewayClientAuthConfiguration{ - VerifyClientCertIssuerDN: to.BoolPtr(true), - }, - SSLPolicy: &armnetwork.ApplicationGatewaySSLPolicy{ - CipherSuites: []*armnetwork.ApplicationGatewaySSLCipherSuite{ - armnetwork.ApplicationGatewaySSLCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256").ToPtr()}, - MinProtocolVersion: armnetwork.ApplicationGatewaySSLProtocol("TLSv1_1").ToPtr(), - PolicyType: armnetwork.ApplicationGatewaySSLPolicyType("Custom").ToPtr(), - }, - TrustedClientCertificates: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - }, - }}, - TrustedClientCertificates: []*armnetwork.ApplicationGatewayTrustedClientCertificate{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayTrustedClientCertificatePropertiesFormat{ - Data: to.StringPtr(""), - }, - }}, - TrustedRootCertificates: []*armnetwork.ApplicationGatewayTrustedRootCertificate{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayTrustedRootCertificatePropertiesFormat{ - Data: to.StringPtr(""), - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayTrustedRootCertificatePropertiesFormat{ - KeyVaultSecretID: to.StringPtr(""), - }, - }}, - URLPathMaps: []*armnetwork.ApplicationGatewayURLPathMap{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayURLPathMapPropertiesFormat{ - DefaultBackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - DefaultBackendHTTPSettings: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - DefaultLoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - DefaultRewriteRuleSet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - PathRules: []*armnetwork.ApplicationGatewayPathRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ApplicationGatewayPathRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - LoadDistributionPolicy: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Paths: []*string{ - to.StringPtr("/api"), - to.StringPtr("/v1/api")}, - RewriteRuleSet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayUpdateTags.json -func ExampleApplicationGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayList.json -func ExampleApplicationGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayListAll.json -func ExampleApplicationGatewaysClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayStart.json -func ExampleApplicationGatewaysClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginStart(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayStop.json -func ExampleApplicationGatewaysClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginStop(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayBackendHealthGet.json -func ExampleApplicationGatewaysClient_BeginBackendHealth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginBackendHealth(ctx, - "", - "", - &armnetwork.ApplicationGatewaysClientBeginBackendHealthOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientBackendHealthResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayBackendHealthTest.json -func ExampleApplicationGatewaysClient_BeginBackendHealthOnDemand() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - poller, err := client.BeginBackendHealthOnDemand(ctx, - "", - "", - armnetwork.ApplicationGatewayOnDemandProbe{ - Path: to.StringPtr(""), - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - BackendHTTPSettings: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - PickHostNameFromBackendHTTPSettings: to.BoolPtr(true), - Timeout: to.Int32Ptr(30), - Protocol: armnetwork.ApplicationGatewayProtocol("Http").ToPtr(), - }, - &armnetwork.ApplicationGatewaysClientBeginBackendHealthOnDemandOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientBackendHealthOnDemandResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableServerVariablesGet.json -func ExampleApplicationGatewaysClient_ListAvailableServerVariables() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.ListAvailableServerVariables(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientListAvailableServerVariablesResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableRequestHeadersGet.json -func ExampleApplicationGatewaysClient_ListAvailableRequestHeaders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.ListAvailableRequestHeaders(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientListAvailableRequestHeadersResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableResponseHeadersGet.json -func ExampleApplicationGatewaysClient_ListAvailableResponseHeaders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.ListAvailableResponseHeaders(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientListAvailableResponseHeadersResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationGatewayAvailableWafRuleSetsGet.json -func ExampleApplicationGatewaysClient_ListAvailableWafRuleSets() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationGatewaysClient("", cred, nil) - res, err := client.ListAvailableWafRuleSets(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationGatewaysClientListAvailableWafRuleSetsResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go deleted file mode 100644 index d42a37c81d4e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_applicationsecuritygroups_client_test.go +++ /dev/null @@ -1,156 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupDelete.json -func ExampleApplicationSecurityGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupGet.json -func ExampleApplicationSecurityGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationSecurityGroupsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupCreate.json -func ExampleApplicationSecurityGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ApplicationSecurityGroup{ - Location: to.StringPtr(""), - Properties: &armnetwork.ApplicationSecurityGroupPropertiesFormat{}, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationSecurityGroupsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupUpdateTags.json -func ExampleApplicationSecurityGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ApplicationSecurityGroupsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupListAll.json -func ExampleApplicationSecurityGroupsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ApplicationSecurityGroupList.json -func ExampleApplicationSecurityGroupsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewApplicationSecurityGroupsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go deleted file mode 100644 index 93b58a670a73..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availabledelegations_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableDelegationsSubscriptionGet.json -func ExampleAvailableDelegationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailableDelegationsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go deleted file mode 100644 index ae33f326a69e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableendpointservices_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/EndpointServicesList.json -func ExampleAvailableEndpointServicesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailableEndpointServicesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go deleted file mode 100644 index fe8ecdcce23e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableprivateendpointtypes_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailablePrivateEndpointTypesGet.json -func ExampleAvailablePrivateEndpointTypesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailablePrivateEndpointTypesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailablePrivateEndpointTypesResourceGroupGet.json -func ExampleAvailablePrivateEndpointTypesClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailablePrivateEndpointTypesClient("", cred, nil) - pager := client.ListByResourceGroup("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_test.go deleted file mode 100644 index 90c4b381cc73..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableresourcegroupdelegations_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableDelegationsResourceGroupGet.json -func ExampleAvailableResourceGroupDelegationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailableResourceGroupDelegationsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go deleted file mode 100644 index 470a79155dc1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_availableservicealiases_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableServiceAliasesList.json -func ExampleAvailableServiceAliasesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailableServiceAliasesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AvailableServiceAliasesListByResourceGroup.json -func ExampleAvailableServiceAliasesClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAvailableServiceAliasesClient("", cred, nil) - pager := client.ListByResourceGroup("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_test.go deleted file mode 100644 index 9bb44e45b5a5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewallfqdntags_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallFqdnTagsListBySubscription.json -func ExampleAzureFirewallFqdnTagsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallFqdnTagsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go deleted file mode 100644 index afe9eebc4b02..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_azurefirewalls_client_test.go +++ /dev/null @@ -1,284 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallDelete.json -func ExampleAzureFirewallsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallGet.json -func ExampleAzureFirewallsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.AzureFirewallsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallPut.json -func ExampleAzureFirewallsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.AzureFirewall{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.AzureFirewallPropertiesFormat{ - ApplicationRuleCollections: []*armnetwork.AzureFirewallApplicationRuleCollection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: armnetwork.AzureFirewallRCActionType("Deny").ToPtr(), - }, - Priority: to.Int32Ptr(110), - Rules: []*armnetwork.AzureFirewallApplicationRule{ - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{ - { - Port: to.Int32Ptr(443), - ProtocolType: armnetwork.AzureFirewallApplicationRuleProtocolType("Https").ToPtr(), - }}, - SourceAddresses: []*string{ - to.StringPtr("216.58.216.164"), - to.StringPtr("10.0.0.0/24")}, - TargetFqdns: []*string{ - to.StringPtr("www.test.com")}, - }}, - }, - }}, - IPConfigurations: []*armnetwork.AzureFirewallIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.AzureFirewallIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Subnet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - NatRuleCollections: []*armnetwork.AzureFirewallNatRuleCollection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.AzureFirewallNatRuleCollectionProperties{ - Action: &armnetwork.AzureFirewallNatRCAction{ - Type: armnetwork.AzureFirewallNatRCActionType("Dnat").ToPtr(), - }, - Priority: to.Int32Ptr(112), - Rules: []*armnetwork.AzureFirewallNatRule{ - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - DestinationAddresses: []*string{ - to.StringPtr("1.2.3.4")}, - DestinationPorts: []*string{ - to.StringPtr("443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - armnetwork.AzureFirewallNetworkRuleProtocol("TCP").ToPtr()}, - SourceAddresses: []*string{ - to.StringPtr("*")}, - TranslatedAddress: to.StringPtr(""), - TranslatedPort: to.StringPtr(""), - }, - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - DestinationAddresses: []*string{ - to.StringPtr("1.2.3.4")}, - DestinationPorts: []*string{ - to.StringPtr("80")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - armnetwork.AzureFirewallNetworkRuleProtocol("TCP").ToPtr()}, - SourceAddresses: []*string{ - to.StringPtr("*")}, - TranslatedFqdn: to.StringPtr(""), - TranslatedPort: to.StringPtr(""), - }}, - }, - }}, - NetworkRuleCollections: []*armnetwork.AzureFirewallNetworkRuleCollection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.AzureFirewallNetworkRuleCollectionPropertiesFormat{ - Action: &armnetwork.AzureFirewallRCAction{ - Type: armnetwork.AzureFirewallRCActionType("Deny").ToPtr(), - }, - Priority: to.Int32Ptr(112), - Rules: []*armnetwork.AzureFirewallNetworkRule{ - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - DestinationAddresses: []*string{ - to.StringPtr("*")}, - DestinationPorts: []*string{ - to.StringPtr("443-444"), - to.StringPtr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - armnetwork.AzureFirewallNetworkRuleProtocol("TCP").ToPtr()}, - SourceAddresses: []*string{ - to.StringPtr("192.168.1.1-192.168.1.12"), - to.StringPtr("10.1.4.12-10.1.4.255")}, - }, - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - DestinationFqdns: []*string{ - to.StringPtr("www.amazon.com")}, - DestinationPorts: []*string{ - to.StringPtr("443-444"), - to.StringPtr("8443")}, - Protocols: []*armnetwork.AzureFirewallNetworkRuleProtocol{ - armnetwork.AzureFirewallNetworkRuleProtocol("TCP").ToPtr()}, - SourceAddresses: []*string{ - to.StringPtr("10.2.4.12-10.2.4.255")}, - }}, - }, - }}, - SKU: &armnetwork.AzureFirewallSKU{ - Name: armnetwork.AzureFirewallSKUName("AZFW_VNet").ToPtr(), - Tier: armnetwork.AzureFirewallSKUTier("Standard").ToPtr(), - }, - ThreatIntelMode: armnetwork.AzureFirewallThreatIntelMode("Alert").ToPtr(), - }, - Zones: []*string{}, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.AzureFirewallsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallUpdateTags.json -func ExampleAzureFirewallsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.AzureFirewallsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallListByResourceGroup.json -func ExampleAzureFirewallsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureFirewallListBySubscription.json -func ExampleAzureFirewallsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewAzureFirewallsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go deleted file mode 100644 index 92910ab7f29c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bastionhosts_client_test.go +++ /dev/null @@ -1,172 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostDelete.json -func ExampleBastionHostsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostGet.json -func ExampleBastionHostsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.BastionHostsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostPut.json -func ExampleBastionHostsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.BastionHost{ - Properties: &armnetwork.BastionHostPropertiesFormat{ - IPConfigurations: []*armnetwork.BastionHostIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.BastionHostIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Subnet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.BastionHostsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostPatch.json -func ExampleBastionHostsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.BastionHostsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostListBySubscription.json -func ExampleBastionHostsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionHostListByResourceGroup.json -func ExampleBastionHostsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBastionHostsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_test.go deleted file mode 100644 index f7dbd1a7ea5d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_bgpservicecommunities_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceCommunityList.json -func ExampleBgpServiceCommunitiesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewBgpServiceCommunitiesClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go deleted file mode 100644 index 3a1b85f5dacf..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_connectionmonitors_client_test.go +++ /dev/null @@ -1,227 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorCreate.json -func ExampleConnectionMonitorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ConnectionMonitor{ - Location: to.StringPtr(""), - Properties: &armnetwork.ConnectionMonitorParameters{ - Endpoints: []*armnetwork.ConnectionMonitorEndpoint{ - { - Name: to.StringPtr(""), - ResourceID: to.StringPtr(""), - }, - { - Name: to.StringPtr(""), - Address: to.StringPtr("
"), - }}, - TestConfigurations: []*armnetwork.ConnectionMonitorTestConfiguration{ - { - Name: to.StringPtr(""), - TCPConfiguration: &armnetwork.ConnectionMonitorTCPConfiguration{ - Port: to.Int32Ptr(80), - }, - TestFrequencySec: to.Int32Ptr(60), - Protocol: armnetwork.ConnectionMonitorTestConfigurationProtocol("Tcp").ToPtr(), - }}, - TestGroups: []*armnetwork.ConnectionMonitorTestGroup{ - { - Name: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("destination")}, - Sources: []*string{ - to.StringPtr("source")}, - TestConfigurations: []*string{ - to.StringPtr("tcp")}, - }}, - }, - }, - &armnetwork.ConnectionMonitorsClientBeginCreateOrUpdateOptions{Migrate: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ConnectionMonitorsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorGet.json -func ExampleConnectionMonitorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ConnectionMonitorsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorDelete.json -func ExampleConnectionMonitorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorUpdateTags.json -func ExampleConnectionMonitorsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ConnectionMonitorsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorStop.json -func ExampleConnectionMonitorsClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - poller, err := client.BeginStop(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorStart.json -func ExampleConnectionMonitorsClient_BeginStart() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - poller, err := client.BeginStart(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorQuery.json -func ExampleConnectionMonitorsClient_BeginQuery() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - poller, err := client.BeginQuery(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ConnectionMonitorsClientQueryResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectionMonitorList.json -func ExampleConnectionMonitorsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewConnectionMonitorsClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ConnectionMonitorsClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go deleted file mode 100644 index 98c0dc1fce8c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_customipprefixes_client_test.go +++ /dev/null @@ -1,158 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixDelete.json -func ExampleCustomIPPrefixesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixGet.json -func ExampleCustomIPPrefixesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.CustomIPPrefixesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.CustomIPPrefixesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixCreateCustomizedValues.json -func ExampleCustomIPPrefixesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.CustomIPPrefix{ - Location: to.StringPtr(""), - Properties: &armnetwork.CustomIPPrefixPropertiesFormat{ - Cidr: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.CustomIPPrefixesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixUpdateTags.json -func ExampleCustomIPPrefixesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.CustomIPPrefixesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixListAll.json -func ExampleCustomIPPrefixesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CustomIpPrefixList.json -func ExampleCustomIPPrefixesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewCustomIPPrefixesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go deleted file mode 100644 index d4fa0b46aa30..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddoscustompolicies_client_test.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyDelete.json -func ExampleDdosCustomPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosCustomPoliciesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyGet.json -func ExampleDdosCustomPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosCustomPoliciesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosCustomPoliciesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyCreate.json -func ExampleDdosCustomPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosCustomPoliciesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.DdosCustomPolicy{ - Location: to.StringPtr(""), - Properties: &armnetwork.DdosCustomPolicyPropertiesFormat{ - ProtocolCustomSettings: []*armnetwork.ProtocolCustomSettingsFormat{ - { - Protocol: armnetwork.DdosCustomPolicyProtocol("Tcp").ToPtr(), - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosCustomPoliciesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosCustomPolicyUpdateTags.json -func ExampleDdosCustomPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosCustomPoliciesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosCustomPoliciesClientUpdateTagsResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go deleted file mode 100644 index def60201fde1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ddosprotectionplans_client_test.go +++ /dev/null @@ -1,156 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanDelete.json -func ExampleDdosProtectionPlansClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanGet.json -func ExampleDdosProtectionPlansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosProtectionPlansClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanCreate.json -func ExampleDdosProtectionPlansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.DdosProtectionPlan{ - Location: to.StringPtr(""), - Properties: &armnetwork.DdosProtectionPlanPropertiesFormat{}, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosProtectionPlansClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanUpdateTags.json -func ExampleDdosProtectionPlansClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DdosProtectionPlansClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanListAll.json -func ExampleDdosProtectionPlansClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DdosProtectionPlanList.json -func ExampleDdosProtectionPlansClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDdosProtectionPlansClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go deleted file mode 100644 index 73ebebdcd5d3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_defaultsecurityrules_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DefaultSecurityRuleList.json -func ExampleDefaultSecurityRulesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDefaultSecurityRulesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DefaultSecurityRuleGet.json -func ExampleDefaultSecurityRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDefaultSecurityRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DefaultSecurityRulesClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go deleted file mode 100644 index 0fd35dd986d3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_dscpconfiguration_client_test.go +++ /dev/null @@ -1,188 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DscpConfigurationCreate.json -func ExampleDscpConfigurationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDscpConfigurationClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.DscpConfiguration{ - Location: to.StringPtr(""), - Properties: &armnetwork.DscpConfigurationPropertiesFormat{ - QosDefinitionCollection: []*armnetwork.QosDefinition{ - { - DestinationIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.StringPtr(""), - StartIP: to.StringPtr(""), - }}, - DestinationPortRanges: []*armnetwork.QosPortRange{ - { - End: to.Int32Ptr(15), - Start: to.Int32Ptr(15), - }}, - Markings: []*int32{ - to.Int32Ptr(1)}, - SourceIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.StringPtr(""), - StartIP: to.StringPtr(""), - }}, - SourcePortRanges: []*armnetwork.QosPortRange{ - { - End: to.Int32Ptr(11), - Start: to.Int32Ptr(10), - }, - { - End: to.Int32Ptr(21), - Start: to.Int32Ptr(20), - }}, - Protocol: armnetwork.ProtocolType("Tcp").ToPtr(), - }, - { - DestinationIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.StringPtr(""), - StartIP: to.StringPtr(""), - }}, - DestinationPortRanges: []*armnetwork.QosPortRange{ - { - End: to.Int32Ptr(52), - Start: to.Int32Ptr(51), - }}, - Markings: []*int32{ - to.Int32Ptr(2)}, - SourceIPRanges: []*armnetwork.QosIPRange{ - { - EndIP: to.StringPtr(""), - StartIP: to.StringPtr(""), - }}, - SourcePortRanges: []*armnetwork.QosPortRange{ - { - End: to.Int32Ptr(12), - Start: to.Int32Ptr(11), - }}, - Protocol: armnetwork.ProtocolType("Udp").ToPtr(), - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DscpConfigurationClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DscpConfigurationDelete.json -func ExampleDscpConfigurationClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDscpConfigurationClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DscpConfigurationGet.json -func ExampleDscpConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDscpConfigurationClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.DscpConfigurationClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DscpConfigurationList.json -func ExampleDscpConfigurationClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDscpConfigurationClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/DscpConfigurationListAll.json -func ExampleDscpConfigurationClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewDscpConfigurationClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_test.go deleted file mode 100644 index 2d8a6d72eaac..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitauthorizations_client_test.go +++ /dev/null @@ -1,111 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitAuthorizationDelete.json -func ExampleExpressRouteCircuitAuthorizationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitAuthorizationsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitAuthorizationGet.json -func ExampleExpressRouteCircuitAuthorizationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitAuthorizationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitAuthorizationsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitAuthorizationCreate.json -func ExampleExpressRouteCircuitAuthorizationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitAuthorizationsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ExpressRouteCircuitAuthorization{ - Properties: &armnetwork.AuthorizationPropertiesFormat{}, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitAuthorizationList.json -func ExampleExpressRouteCircuitAuthorizationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitAuthorizationsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go deleted file mode 100644 index 21f525bfa868..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitconnections_client_test.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitConnectionDelete.json -func ExampleExpressRouteCircuitConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitConnectionGet.json -func ExampleExpressRouteCircuitConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitConnectionCreate.json -func ExampleExpressRouteCircuitConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - "", - armnetwork.ExpressRouteCircuitConnection{ - Properties: &armnetwork.ExpressRouteCircuitConnectionPropertiesFormat{ - AddressPrefix: to.StringPtr(""), - AuthorizationKey: to.StringPtr(""), - ExpressRouteCircuitPeering: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - IPv6CircuitConnectionConfig: &armnetwork.IPv6CircuitConnectionConfig{ - AddressPrefix: to.StringPtr(""), - }, - PeerExpressRouteCircuitPeering: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitConnectionList.json -func ExampleExpressRouteCircuitConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitConnectionsClient("", cred, nil) - pager := client.List("", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go deleted file mode 100644 index 43b60ac82ef9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuitpeerings_client_test.go +++ /dev/null @@ -1,117 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitPeeringDelete.json -func ExampleExpressRouteCircuitPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitPeeringsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitPeeringGet.json -func ExampleExpressRouteCircuitPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitPeeringsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitPeeringsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitPeeringCreate.json -func ExampleExpressRouteCircuitPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitPeeringsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ExpressRouteCircuitPeering{ - Properties: &armnetwork.ExpressRouteCircuitPeeringPropertiesFormat{ - PeerASN: to.Int64Ptr(200), - PrimaryPeerAddressPrefix: to.StringPtr(""), - SecondaryPeerAddressPrefix: to.StringPtr(""), - VlanID: to.Int32Ptr(200), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitPeeringsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitPeeringList.json -func ExampleExpressRouteCircuitPeeringsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitPeeringsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_test.go deleted file mode 100644 index 17177f704dc4..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecircuits_client_test.go +++ /dev/null @@ -1,279 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitDelete.json -func ExampleExpressRouteCircuitsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitGet.json -func ExampleExpressRouteCircuitsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitCreate.json -func ExampleExpressRouteCircuitsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ExpressRouteCircuit{ - Location: to.StringPtr(""), - Properties: &armnetwork.ExpressRouteCircuitPropertiesFormat{ - AllowClassicOperations: to.BoolPtr(false), - Authorizations: []*armnetwork.ExpressRouteCircuitAuthorization{}, - Peerings: []*armnetwork.ExpressRouteCircuitPeering{}, - ServiceProviderProperties: &armnetwork.ExpressRouteCircuitServiceProviderProperties{ - BandwidthInMbps: to.Int32Ptr(200), - PeeringLocation: to.StringPtr(""), - ServiceProviderName: to.StringPtr(""), - }, - }, - SKU: &armnetwork.ExpressRouteCircuitSKU{ - Name: to.StringPtr(""), - Family: armnetwork.ExpressRouteCircuitSKUFamily("MeteredData").ToPtr(), - Tier: armnetwork.ExpressRouteCircuitSKUTier("Standard").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitUpdateTags.json -func ExampleExpressRouteCircuitsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitARPTableList.json -func ExampleExpressRouteCircuitsClient_BeginListArpTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - poller, err := client.BeginListArpTable(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientListArpTableResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitRouteTableList.json -func ExampleExpressRouteCircuitsClient_BeginListRoutesTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - poller, err := client.BeginListRoutesTable(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientListRoutesTableResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitRouteTableSummaryList.json -func ExampleExpressRouteCircuitsClient_BeginListRoutesTableSummary() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - poller, err := client.BeginListRoutesTableSummary(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientListRoutesTableSummaryResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitStats.json -func ExampleExpressRouteCircuitsClient_GetStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - res, err := client.GetStats(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientGetStatsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitPeeringStats.json -func ExampleExpressRouteCircuitsClient_GetPeeringStats() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - res, err := client.GetPeeringStats(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCircuitsClientGetPeeringStatsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitListByResourceGroup.json -func ExampleExpressRouteCircuitsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCircuitListBySubscription.json -func ExampleExpressRouteCircuitsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCircuitsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go deleted file mode 100644 index db824d108d4e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteconnections_client_test.go +++ /dev/null @@ -1,113 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteConnectionCreate.json -func ExampleExpressRouteConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ExpressRouteConnection{ - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.ExpressRouteConnectionProperties{ - AuthorizationKey: to.StringPtr(""), - ExpressRouteCircuitPeering: &armnetwork.ExpressRouteCircuitPeeringID{ - ID: to.StringPtr(""), - }, - RoutingWeight: to.Int32Ptr(2), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteConnectionGet.json -func ExampleExpressRouteConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteConnectionDelete.json -func ExampleExpressRouteConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteConnectionList.json -func ExampleExpressRouteConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteConnectionsClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteConnectionsClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go deleted file mode 100644 index 1db9a1b13e4a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnectionpeerings_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionBgpPeeringList.json -func ExampleExpressRouteCrossConnectionPeeringsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionBgpPeeringDelete.json -func ExampleExpressRouteCrossConnectionPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionBgpPeeringGet.json -func ExampleExpressRouteCrossConnectionPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionPeeringsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionBgpPeeringCreate.json -func ExampleExpressRouteCrossConnectionPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionPeeringsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ExpressRouteCrossConnectionPeering{ - Properties: &armnetwork.ExpressRouteCrossConnectionPeeringProperties{ - IPv6PeeringConfig: &armnetwork.IPv6ExpressRouteCircuitPeeringConfig{ - PrimaryPeerAddressPrefix: to.StringPtr(""), - SecondaryPeerAddressPrefix: to.StringPtr(""), - }, - PeerASN: to.Int64Ptr(200), - PrimaryPeerAddressPrefix: to.StringPtr(""), - SecondaryPeerAddressPrefix: to.StringPtr(""), - VlanID: to.Int32Ptr(200), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_test.go deleted file mode 100644 index acab7c4c398f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutecrossconnections_client_test.go +++ /dev/null @@ -1,208 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionList.json -func ExampleExpressRouteCrossConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionListByResourceGroup.json -func ExampleExpressRouteCrossConnectionsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionGet.json -func ExampleExpressRouteCrossConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionUpdate.json -func ExampleExpressRouteCrossConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ExpressRouteCrossConnection{ - Properties: &armnetwork.ExpressRouteCrossConnectionProperties{ - ServiceProviderProvisioningState: armnetwork.ServiceProviderProvisioningState("NotProvisioned").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionUpdateTags.json -func ExampleExpressRouteCrossConnectionsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionsArpTable.json -func ExampleExpressRouteCrossConnectionsClient_BeginListArpTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - poller, err := client.BeginListArpTable(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientListArpTableResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionsRouteTableSummary.json -func ExampleExpressRouteCrossConnectionsClient_BeginListRoutesTableSummary() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - poller, err := client.BeginListRoutesTableSummary(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteCrossConnectionsRouteTable.json -func ExampleExpressRouteCrossConnectionsClient_BeginListRoutesTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteCrossConnectionsClient("", cred, nil) - poller, err := client.BeginListRoutesTable(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteCrossConnectionsClientListRoutesTableResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go deleted file mode 100644 index 23271e0cd878..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutegateways_client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayListBySubscription.json -func ExampleExpressRouteGatewaysClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - res, err := client.ListBySubscription(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteGatewaysClientListBySubscriptionResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayListByResourceGroup.json -func ExampleExpressRouteGatewaysClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - res, err := client.ListByResourceGroup(ctx, - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteGatewaysClientListByResourceGroupResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayCreate.json -func ExampleExpressRouteGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ExpressRouteGateway{ - Location: to.StringPtr(""), - Properties: &armnetwork.ExpressRouteGatewayProperties{ - AutoScaleConfiguration: &armnetwork.ExpressRouteGatewayPropertiesAutoScaleConfiguration{ - Bounds: &armnetwork.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds{ - Min: to.Int32Ptr(3), - }, - }, - VirtualHub: &armnetwork.VirtualHubID{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayUpdateTags.json -func ExampleExpressRouteGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayGet.json -func ExampleExpressRouteGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteGatewayDelete.json -func ExampleExpressRouteGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go deleted file mode 100644 index 53b88d05beaa..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressroutelinks_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteLinkGet.json -func ExampleExpressRouteLinksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteLinksClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRouteLinksClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteLinkList.json -func ExampleExpressRouteLinksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteLinksClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go deleted file mode 100644 index 9a3133e8c390..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteports_client_test.go +++ /dev/null @@ -1,181 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortDelete.json -func ExampleExpressRoutePortsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortGet.json -func ExampleExpressRoutePortsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRoutePortsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortCreate.json -func ExampleExpressRoutePortsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ExpressRoutePort{ - Location: to.StringPtr(""), - Properties: &armnetwork.ExpressRoutePortPropertiesFormat{ - BandwidthInGbps: to.Int32Ptr(100), - Encapsulation: armnetwork.ExpressRoutePortsEncapsulation("QinQ").ToPtr(), - PeeringLocation: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRoutePortsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortUpdateTags.json -func ExampleExpressRoutePortsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRoutePortsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortListByResourceGroup.json -func ExampleExpressRoutePortsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortList.json -func ExampleExpressRoutePortsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/GenerateExpressRoutePortsLOA.json -func ExampleExpressRoutePortsClient_GenerateLOA() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsClient("", cred, nil) - res, err := client.GenerateLOA(ctx, - "", - "", - armnetwork.GenerateExpressRoutePortsLOARequest{ - CustomerName: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRoutePortsClientGenerateLOAResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go deleted file mode 100644 index 9e2cf4681ad9..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteportslocations_client_test.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortsLocationList.json -func ExampleExpressRoutePortsLocationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsLocationsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRoutePortsLocationGet.json -func ExampleExpressRoutePortsLocationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRoutePortsLocationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ExpressRoutePortsLocationsClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_test.go deleted file mode 100644 index bf5e360a7ba0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_expressrouteserviceproviders_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ExpressRouteProviderList.json -func ExampleExpressRouteServiceProvidersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewExpressRouteServiceProvidersClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go deleted file mode 100644 index ac47c7780b69..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicies_client_test.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyDelete.json -func ExampleFirewallPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPoliciesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyGet.json -func ExampleFirewallPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPoliciesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.FirewallPoliciesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPoliciesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyPut.json -func ExampleFirewallPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPoliciesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.FirewallPolicy{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.FirewallPolicyPropertiesFormat{ - DNSSettings: &armnetwork.DNSSettings{ - EnableProxy: to.BoolPtr(true), - RequireProxyForNetworkRules: to.BoolPtr(false), - Servers: []*string{ - to.StringPtr("30.3.4.5")}, - }, - ExplicitProxySettings: &armnetwork.ExplicitProxySettings{ - EnableExplicitProxy: to.BoolPtr(true), - HTTPPort: to.Int32Ptr(8087), - HTTPSPort: to.Int32Ptr(8087), - PacFile: to.StringPtr(""), - PacFilePort: to.Int32Ptr(8087), - }, - Insights: &armnetwork.FirewallPolicyInsights{ - IsEnabled: to.BoolPtr(true), - LogAnalyticsResources: &armnetwork.FirewallPolicyLogAnalyticsResources{ - DefaultWorkspaceID: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Workspaces: []*armnetwork.FirewallPolicyLogAnalyticsWorkspace{ - { - Region: to.StringPtr(""), - WorkspaceID: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - { - Region: to.StringPtr(""), - WorkspaceID: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }}, - }, - RetentionDays: to.Int32Ptr(100), - }, - IntrusionDetection: &armnetwork.FirewallPolicyIntrusionDetection{ - Configuration: &armnetwork.FirewallPolicyIntrusionDetectionConfiguration{ - BypassTrafficSettings: []*armnetwork.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications{ - { - Name: to.StringPtr(""), - Description: to.StringPtr(""), - DestinationAddresses: []*string{ - to.StringPtr("5.6.7.8")}, - DestinationPorts: []*string{ - to.StringPtr("*")}, - SourceAddresses: []*string{ - to.StringPtr("1.2.3.4")}, - Protocol: armnetwork.FirewallPolicyIntrusionDetectionProtocol("TCP").ToPtr(), - }}, - SignatureOverrides: []*armnetwork.FirewallPolicyIntrusionDetectionSignatureSpecification{ - { - ID: to.StringPtr(""), - Mode: armnetwork.FirewallPolicyIntrusionDetectionStateType("Deny").ToPtr(), - }}, - }, - Mode: armnetwork.FirewallPolicyIntrusionDetectionStateType("Alert").ToPtr(), - }, - SKU: &armnetwork.FirewallPolicySKU{ - Tier: armnetwork.FirewallPolicySKUTier("Premium").ToPtr(), - }, - Snat: &armnetwork.FirewallPolicySNAT{ - PrivateRanges: []*string{ - to.StringPtr("IANAPrivateRanges")}, - }, - SQL: &armnetwork.FirewallPolicySQL{ - AllowSQLRedirect: to.BoolPtr(true), - }, - ThreatIntelMode: armnetwork.AzureFirewallThreatIntelMode("Alert").ToPtr(), - ThreatIntelWhitelist: &armnetwork.FirewallPolicyThreatIntelWhitelist{ - Fqdns: []*string{ - to.StringPtr("*.microsoft.com")}, - IPAddresses: []*string{ - to.StringPtr("20.3.4.5")}, - }, - TransportSecurity: &armnetwork.FirewallPolicyTransportSecurity{ - CertificateAuthority: &armnetwork.FirewallPolicyCertificateAuthority{ - Name: to.StringPtr(""), - KeyVaultSecretID: to.StringPtr(""), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPoliciesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyListByResourceGroup.json -func ExampleFirewallPoliciesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPoliciesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyListBySubscription.json -func ExampleFirewallPoliciesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPoliciesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go deleted file mode 100644 index 6b744a12668c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignatures_client_test.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyQuerySignatureOverrides.json -func ExampleFirewallPolicyIdpsSignaturesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - armnetwork.IDPSQueryObject{ - Filters: []*armnetwork.FilterItems{ - { - Field: to.StringPtr(""), - Values: []*string{ - to.StringPtr("Deny")}, - }}, - OrderBy: &armnetwork.OrderBy{ - Field: to.StringPtr(""), - Order: armnetwork.OrderByOrder("Ascending").ToPtr(), - }, - ResultsPerPage: to.Int32Ptr(20), - Search: to.StringPtr(""), - Skip: to.Int32Ptr(0), - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go deleted file mode 100644 index d428665db4ec..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesfiltervalues_client_test.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyQuerySignatureOverridesFilterValues.json -func ExampleFirewallPolicyIdpsSignaturesFilterValuesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesFilterValuesClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - armnetwork.SignatureOverridesFilterValuesQuery{ - FilterName: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesFilterValuesClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go deleted file mode 100644 index 7b8098e66e12..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyidpssignaturesoverrides_client_test.go +++ /dev/null @@ -1,112 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicySignatureOverridesPatch.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Patch() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("", cred, nil) - res, err := client.Patch(ctx, - "", - "", - armnetwork.SignaturesOverrides{ - Name: to.StringPtr(""), - Type: to.StringPtr(""), - ID: to.StringPtr(""), - Properties: &armnetwork.SignaturesOverridesProperties{ - Signatures: map[string]*string{ - "2000105": to.StringPtr("Off"), - "2000106": to.StringPtr("Deny"), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesOverridesClientPatchResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicySignatureOverridesPut.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Put() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("", cred, nil) - res, err := client.Put(ctx, - "", - "", - armnetwork.SignaturesOverrides{ - Name: to.StringPtr(""), - Type: to.StringPtr(""), - ID: to.StringPtr(""), - Properties: &armnetwork.SignaturesOverridesProperties{ - Signatures: map[string]*string{ - "2000105": to.StringPtr("Off"), - "2000106": to.StringPtr("Deny"), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesOverridesClientPutResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicySignatureOverridesGet.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesOverridesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicySignatureOverridesList.json -func ExampleFirewallPolicyIdpsSignaturesOverridesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyIdpsSignaturesOverridesClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyIdpsSignaturesOverridesClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go deleted file mode 100644 index deddf815cd35..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_firewallpolicyrulecollectiongroups_client_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyRuleCollectionGroupDelete.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyNatRuleCollectionGroupGet.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyRuleCollectionGroupsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyNatRuleCollectionGroupPut.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.FirewallPolicyRuleCollectionGroup{ - Properties: &armnetwork.FirewallPolicyRuleCollectionGroupProperties{ - Priority: to.Int32Ptr(100), - RuleCollections: []armnetwork.FirewallPolicyRuleCollectionClassification{ - &armnetwork.FirewallPolicyNatRuleCollection{ - Name: to.StringPtr(""), - Priority: to.Int32Ptr(100), - RuleCollectionType: armnetwork.FirewallPolicyRuleCollectionType("FirewallPolicyNatRuleCollection").ToPtr(), - Action: &armnetwork.FirewallPolicyNatRuleCollectionAction{ - Type: armnetwork.FirewallPolicyNatRuleCollectionActionType("DNAT").ToPtr(), - }, - Rules: []armnetwork.FirewallPolicyRuleClassification{ - &armnetwork.NatRule{ - Name: to.StringPtr(""), - RuleType: armnetwork.FirewallPolicyRuleType("NatRule").ToPtr(), - DestinationAddresses: []*string{ - to.StringPtr("152.23.32.23")}, - DestinationPorts: []*string{ - to.StringPtr("8080")}, - IPProtocols: []*armnetwork.FirewallPolicyRuleNetworkProtocol{ - armnetwork.FirewallPolicyRuleNetworkProtocol("TCP").ToPtr(), - armnetwork.FirewallPolicyRuleNetworkProtocol("UDP").ToPtr()}, - SourceAddresses: []*string{ - to.StringPtr("2.2.2.2")}, - SourceIPGroups: []*string{}, - TranslatedFqdn: to.StringPtr(""), - TranslatedPort: to.StringPtr(""), - }}, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/FirewallPolicyRuleCollectionGroupWithWebCategoriesList.json -func ExampleFirewallPolicyRuleCollectionGroupsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFirewallPolicyRuleCollectionGroupsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go deleted file mode 100644 index 90ccbe3592c3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_flowlogs_client_test.go +++ /dev/null @@ -1,146 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogCreate.json -func ExampleFlowLogsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFlowLogsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.FlowLog{ - Location: to.StringPtr(""), - Properties: &armnetwork.FlowLogPropertiesFormat{ - Format: &armnetwork.FlowLogFormatParameters{ - Type: armnetwork.FlowLogFormatType("JSON").ToPtr(), - Version: to.Int32Ptr(1), - }, - Enabled: to.BoolPtr(true), - StorageID: to.StringPtr(""), - TargetResourceID: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FlowLogsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogUpdateTags.json -func ExampleFlowLogsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFlowLogsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FlowLogsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogGet.json -func ExampleFlowLogsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFlowLogsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.FlowLogsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogDelete.json -func ExampleFlowLogsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFlowLogsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogList.json -func ExampleFlowLogsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewFlowLogsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go deleted file mode 100644 index a76d6b6c0445..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubroutetables_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubRouteTablePut.json -func ExampleHubRouteTablesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubRouteTablesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.HubRouteTable{ - Properties: &armnetwork.HubRouteTableProperties{ - Labels: []*string{ - to.StringPtr("label1"), - to.StringPtr("label2")}, - Routes: []*armnetwork.HubRoute{ - { - Name: to.StringPtr(""), - DestinationType: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("10.0.0.0/8"), - to.StringPtr("20.0.0.0/8"), - to.StringPtr("30.0.0.0/8")}, - NextHop: to.StringPtr(""), - NextHopType: to.StringPtr(""), - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.HubRouteTablesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubRouteTableGet.json -func ExampleHubRouteTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubRouteTablesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.HubRouteTablesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubRouteTableDelete.json -func ExampleHubRouteTablesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubRouteTablesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubRouteTableList.json -func ExampleHubRouteTablesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubRouteTablesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_test.go deleted file mode 100644 index 39bacedd683d..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_hubvirtualnetworkconnections_client_test.go +++ /dev/null @@ -1,148 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubVirtualNetworkConnectionPut.json -func ExampleHubVirtualNetworkConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubVirtualNetworkConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.HubVirtualNetworkConnection{ - Properties: &armnetwork.HubVirtualNetworkConnectionProperties{ - EnableInternetSecurity: to.BoolPtr(false), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - Labels: []*string{ - to.StringPtr("label1"), - to.StringPtr("label2")}, - }, - VnetRoutes: &armnetwork.VnetRoute{ - StaticRoutes: []*armnetwork.StaticRoute{ - { - Name: to.StringPtr(""), - AddressPrefixes: []*string{ - to.StringPtr("10.1.0.0/16"), - to.StringPtr("10.2.0.0/16")}, - NextHopIPAddress: to.StringPtr(""), - }, - { - Name: to.StringPtr(""), - AddressPrefixes: []*string{ - to.StringPtr("10.3.0.0/16"), - to.StringPtr("10.4.0.0/16")}, - NextHopIPAddress: to.StringPtr(""), - }}, - }, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.HubVirtualNetworkConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubVirtualNetworkConnectionDelete.json -func ExampleHubVirtualNetworkConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubVirtualNetworkConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubVirtualNetworkConnectionGet.json -func ExampleHubVirtualNetworkConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubVirtualNetworkConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.HubVirtualNetworkConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/HubVirtualNetworkConnectionList.json -func ExampleHubVirtualNetworkConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewHubVirtualNetworkConnectionsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go deleted file mode 100644 index 412ff1f33c13..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundnatrules_client_test.go +++ /dev/null @@ -1,122 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/InboundNatRuleList.json -func ExampleInboundNatRulesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInboundNatRulesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/InboundNatRuleDelete.json -func ExampleInboundNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInboundNatRulesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/InboundNatRuleGet.json -func ExampleInboundNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInboundNatRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - &armnetwork.InboundNatRulesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InboundNatRulesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/InboundNatRuleCreate.json -func ExampleInboundNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInboundNatRulesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.InboundNatRule{ - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Int32Ptr(3389), - EnableFloatingIP: to.BoolPtr(false), - EnableTCPReset: to.BoolPtr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - FrontendPort: to.Int32Ptr(3390), - IdleTimeoutInMinutes: to.Int32Ptr(4), - Protocol: armnetwork.TransportProtocol("Tcp").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InboundNatRulesClientCreateOrUpdateResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go deleted file mode 100644 index e7b5397a40a3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_inboundsecurityrule_client_test.go +++ /dev/null @@ -1,53 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/InboundSecurityRulePut.json -func ExampleInboundSecurityRuleClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInboundSecurityRuleClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.InboundSecurityRule{ - Properties: &armnetwork.InboundSecurityRuleProperties{ - Rules: []*armnetwork.InboundSecurityRules{ - { - DestinationPortRange: to.Int32Ptr(22), - SourceAddressPrefix: to.StringPtr(""), - Protocol: armnetwork.InboundSecurityRulesProtocol("TCP").ToPtr(), - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InboundSecurityRuleClientCreateOrUpdateResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go deleted file mode 100644 index 3936fee9faaf..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipallocations_client_test.go +++ /dev/null @@ -1,162 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationDelete.json -func ExampleIPAllocationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationGet.json -func ExampleIPAllocationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.IPAllocationsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPAllocationsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationCreate.json -func ExampleIPAllocationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.IPAllocation{ - Location: to.StringPtr(""), - Properties: &armnetwork.IPAllocationPropertiesFormat{ - Type: armnetwork.IPAllocationType("Hypernet").ToPtr(), - AllocationTags: map[string]*string{ - "VNetID": to.StringPtr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/HypernetVnet1"), - }, - Prefix: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPAllocationsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationUpdateTags.json -func ExampleIPAllocationsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPAllocationsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationList.json -func ExampleIPAllocationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpAllocationListByResourceGroup.json -func ExampleIPAllocationsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPAllocationsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go deleted file mode 100644 index 69cd39cbb983..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_ipgroups_client_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsGet.json -func ExampleIPGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.IPGroupsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPGroupsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsCreate.json -func ExampleIPGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.IPGroup{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.IPGroupPropertiesFormat{ - IPAddresses: []*string{ - to.StringPtr("13.64.39.16/32"), - to.StringPtr("40.74.146.80/31"), - to.StringPtr("40.74.147.32/28")}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPGroupsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsUpdateTags.json -func ExampleIPGroupsClient_UpdateGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - res, err := client.UpdateGroups(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.IPGroupsClientUpdateGroupsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsDelete.json -func ExampleIPGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsListByResourceGroup.json -func ExampleIPGroupsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/IpGroupsListBySubscription.json -func ExampleIPGroupsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewIPGroupsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go deleted file mode 100644 index 2e13a2618417..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerbackendaddresspools_client_test.go +++ /dev/null @@ -1,132 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LBBackendAddressPoolListWithBackendAddressesPoolType.json -func ExampleLoadBalancerBackendAddressPoolsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerBackendAddressPoolsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LBBackendAddressPoolWithBackendAddressesGet.json -func ExampleLoadBalancerBackendAddressPoolsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerBackendAddressPoolsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerBackendAddressPoolsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LBBackendAddressPoolWithBackendAddressesPut.json -func ExampleLoadBalancerBackendAddressPoolsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerBackendAddressPoolsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.BackendAddressPool{ - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{ - LoadBalancerBackendAddresses: []*armnetwork.LoadBalancerBackendAddress{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.LoadBalancerBackendAddressPropertiesFormat{ - IPAddress: to.StringPtr(""), - VirtualNetwork: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - { - Name: to.StringPtr(""), - Properties: &armnetwork.LoadBalancerBackendAddressPropertiesFormat{ - IPAddress: to.StringPtr(""), - VirtualNetwork: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerBackendAddressPoolDelete.json -func ExampleLoadBalancerBackendAddressPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerBackendAddressPoolsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go deleted file mode 100644 index 8ea539c6fd6e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerfrontendipconfigurations_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerFrontendIPConfigurationList.json -func ExampleLoadBalancerFrontendIPConfigurationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerFrontendIPConfigurationsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerFrontendIPConfigurationGet.json -func ExampleLoadBalancerFrontendIPConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerFrontendIPConfigurationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerFrontendIPConfigurationsClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go deleted file mode 100644 index 1bbafdc1412e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerloadbalancingrules_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerLoadBalancingRuleList.json -func ExampleLoadBalancerLoadBalancingRulesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerLoadBalancingRulesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerLoadBalancingRuleGet.json -func ExampleLoadBalancerLoadBalancingRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerLoadBalancingRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerLoadBalancingRulesClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_test.go deleted file mode 100644 index d04a445d2ca3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancernetworkinterfaces_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerNetworkInterfaceListSimple.json -func ExampleLoadBalancerNetworkInterfacesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerNetworkInterfacesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go deleted file mode 100644 index 93ec10fa24fc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalanceroutboundrules_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerOutboundRuleList.json -func ExampleLoadBalancerOutboundRulesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerOutboundRulesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerOutboundRuleGet.json -func ExampleLoadBalancerOutboundRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerOutboundRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerOutboundRulesClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go deleted file mode 100644 index 4739e0fcf25a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancerprobes_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerProbeList.json -func ExampleLoadBalancerProbesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerProbesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerProbeGet.json -func ExampleLoadBalancerProbesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancerProbesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancerProbesClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go deleted file mode 100644 index 9196c7f44f87..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_loadbalancers_client_test.go +++ /dev/null @@ -1,246 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerDelete.json -func ExampleLoadBalancersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerGet.json -func ExampleLoadBalancersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.LoadBalancersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancersClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerCreate.json -func ExampleLoadBalancersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.LoadBalancer{ - Location: to.StringPtr(""), - Properties: &armnetwork.LoadBalancerPropertiesFormat{ - BackendAddressPools: []*armnetwork.BackendAddressPool{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.BackendAddressPoolPropertiesFormat{}, - }}, - FrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.FrontendIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }}, - InboundNatPools: []*armnetwork.InboundNatPool{}, - InboundNatRules: []*armnetwork.InboundNatRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.InboundNatRulePropertiesFormat{ - BackendPort: to.Int32Ptr(3389), - EnableFloatingIP: to.BoolPtr(true), - EnableTCPReset: to.BoolPtr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - FrontendPort: to.Int32Ptr(3389), - IdleTimeoutInMinutes: to.Int32Ptr(15), - Protocol: armnetwork.TransportProtocol("Tcp").ToPtr(), - }, - }}, - LoadBalancingRules: []*armnetwork.LoadBalancingRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.LoadBalancingRulePropertiesFormat{ - BackendAddressPool: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - BackendPort: to.Int32Ptr(80), - EnableFloatingIP: to.BoolPtr(true), - EnableTCPReset: to.BoolPtr(false), - FrontendIPConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - FrontendPort: to.Int32Ptr(80), - IdleTimeoutInMinutes: to.Int32Ptr(15), - LoadDistribution: armnetwork.LoadDistribution("Default").ToPtr(), - Probe: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Protocol: armnetwork.TransportProtocol("Tcp").ToPtr(), - }, - }}, - Probes: []*armnetwork.Probe{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ProbePropertiesFormat{ - IntervalInSeconds: to.Int32Ptr(15), - NumberOfProbes: to.Int32Ptr(2), - Port: to.Int32Ptr(80), - RequestPath: to.StringPtr(""), - Protocol: armnetwork.ProbeProtocol("Http").ToPtr(), - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancersClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerUpdateTags.json -func ExampleLoadBalancersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancersClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerListAll.json -func ExampleLoadBalancersClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LoadBalancerList.json -func ExampleLoadBalancersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/QueryInboundNatRulePortMapping.json -func ExampleLoadBalancersClient_BeginListInboundNatRulePortMappings() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLoadBalancersClient("", cred, nil) - poller, err := client.BeginListInboundNatRulePortMappings(ctx, - "", - "", - "", - armnetwork.QueryInboundNatRulePortMappingRequest{ - IPAddress: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LoadBalancersClientListInboundNatRulePortMappingsResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go deleted file mode 100644 index 47cc292502a7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_localnetworkgateways_client_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LocalNetworkGatewayCreate.json -func ExampleLocalNetworkGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLocalNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.LocalNetworkGateway{ - Location: to.StringPtr(""), - Properties: &armnetwork.LocalNetworkGatewayPropertiesFormat{ - Fqdn: to.StringPtr(""), - GatewayIPAddress: to.StringPtr(""), - LocalNetworkAddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("10.1.0.0/16")}, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LocalNetworkGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LocalNetworkGatewayGet.json -func ExampleLocalNetworkGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLocalNetworkGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LocalNetworkGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LocalNetworkGatewayDelete.json -func ExampleLocalNetworkGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLocalNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LocalNetworkGatewayUpdateTags.json -func ExampleLocalNetworkGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLocalNetworkGatewaysClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.LocalNetworkGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/LocalNetworkGatewayList.json -func ExampleLocalNetworkGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewLocalNetworkGatewaysClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go deleted file mode 100644 index bcb70b777386..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natgateways_client_test.go +++ /dev/null @@ -1,168 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayDelete.json -func ExampleNatGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayGet.json -func ExampleNatGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.NatGatewaysClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.NatGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayCreateOrUpdate.json -func ExampleNatGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.NatGateway{ - Location: to.StringPtr(""), - Properties: &armnetwork.NatGatewayPropertiesFormat{ - PublicIPAddresses: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - PublicIPPrefixes: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - }, - SKU: &armnetwork.NatGatewaySKU{ - Name: armnetwork.NatGatewaySKUName("Standard").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.NatGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayUpdateTags.json -func ExampleNatGatewaysClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.NatGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayListAll.json -func ExampleNatGatewaysClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatGatewayList.json -func ExampleNatGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatGatewaysClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go deleted file mode 100644 index 416fa06a253f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_natrules_client_test.go +++ /dev/null @@ -1,99 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatRuleGet.json -func ExampleNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.NatRulesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatRulePut.json -func ExampleNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatRulesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VPNGatewayNatRule{ - Properties: &armnetwork.VPNGatewayNatRuleProperties{ - Type: armnetwork.VPNNatRuleType("Static").ToPtr(), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - IPConfigurationID: to.StringPtr(""), - Mode: armnetwork.VPNNatRuleMode("EgressSnat").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.NatRulesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NatRuleDelete.json -func ExampleNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewNatRulesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go deleted file mode 100644 index f220382d3a40..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceipconfigurations_client_test.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceIPConfigurationList.json -func ExampleInterfaceIPConfigurationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceIPConfigurationsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceIPConfigurationGet.json -func ExampleInterfaceIPConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceIPConfigurationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfaceIPConfigurationsClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_test.go deleted file mode 100644 index 7f3c9d7cb208..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaceloadbalancers_client_test.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceLoadBalancerList.json -func ExampleInterfaceLoadBalancersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceLoadBalancersClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go deleted file mode 100644 index ce464659adc7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfaces_client_test.go +++ /dev/null @@ -1,356 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServiceRoleInstanceNetworkInterfaceList.json -func ExampleInterfacesClient_ListCloudServiceRoleInstanceNetworkInterfaces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.ListCloudServiceRoleInstanceNetworkInterfaces("", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServiceNetworkInterfaceList.json -func ExampleInterfacesClient_ListCloudServiceNetworkInterfaces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.ListCloudServiceNetworkInterfaces("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServiceNetworkInterfaceGet.json -func ExampleInterfacesClient_GetCloudServiceNetworkInterface() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - res, err := client.GetCloudServiceNetworkInterface(ctx, - "", - "", - "", - "", - &armnetwork.InterfacesClientGetCloudServiceNetworkInterfaceOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientGetCloudServiceNetworkInterfaceResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceDelete.json -func ExampleInterfacesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceGet.json -func ExampleInterfacesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.InterfacesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceCreate.json -func ExampleInterfacesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.Interface{ - Location: to.StringPtr(""), - Properties: &armnetwork.InterfacePropertiesFormat{ - EnableAcceleratedNetworking: to.BoolPtr(true), - IPConfigurations: []*armnetwork.InterfaceIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.InterfaceIPConfigurationPropertiesFormat{ - PublicIPAddress: &armnetwork.PublicIPAddress{ - ID: to.StringPtr(""), - }, - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceUpdateTags.json -func ExampleInterfacesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceListAll.json -func ExampleInterfacesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceList.json -func ExampleInterfacesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceEffectiveRouteTableList.json -func ExampleInterfacesClient_BeginGetEffectiveRouteTable() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - poller, err := client.BeginGetEffectiveRouteTable(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientGetEffectiveRouteTableResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceEffectiveNSGList.json -func ExampleInterfacesClient_BeginListEffectiveNetworkSecurityGroups() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - poller, err := client.BeginListEffectiveNetworkSecurityGroups(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientListEffectiveNetworkSecurityGroupsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssVmNetworkInterfaceList.json -func ExampleInterfacesClient_ListVirtualMachineScaleSetVMNetworkInterfaces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.ListVirtualMachineScaleSetVMNetworkInterfaces("", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssNetworkInterfaceList.json -func ExampleInterfacesClient_ListVirtualMachineScaleSetNetworkInterfaces() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - pager := client.ListVirtualMachineScaleSetNetworkInterfaces("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssNetworkInterfaceGet.json -func ExampleInterfacesClient_GetVirtualMachineScaleSetNetworkInterface() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfacesClient("", cred, nil) - res, err := client.GetVirtualMachineScaleSetNetworkInterface(ctx, - "", - "", - "", - "", - &armnetwork.InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go deleted file mode 100644 index 1ef48c59308e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkinterfacetapconfigurations_client_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceTapConfigurationDelete.json -func ExampleInterfaceTapConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceTapConfigurationsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceTapConfigurationGet.json -func ExampleInterfaceTapConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceTapConfigurationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfaceTapConfigurationsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceTapConfigurationCreate.json -func ExampleInterfaceTapConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceTapConfigurationsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.InterfaceTapConfiguration{ - Properties: &armnetwork.InterfaceTapConfigurationPropertiesFormat{ - VirtualNetworkTap: &armnetwork.VirtualNetworkTap{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.InterfaceTapConfigurationsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkInterfaceTapConfigurationList.json -func ExampleInterfaceTapConfigurationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewInterfaceTapConfigurationsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go deleted file mode 100644 index d4fb8fe8f129..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkmanagementclient_client_test.go +++ /dev/null @@ -1,241 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionShareableLinkCreate.json -func ExampleManagementClient_BeginPutBastionShareableLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - poller, err := client.BeginPutBastionShareableLink(ctx, - "", - "", - armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }}, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - for { - nextResult := res.NextPage(ctx) - if err := res.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range res.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionShareableLinkDelete.json -func ExampleManagementClient_BeginDeleteBastionShareableLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - poller, err := client.BeginDeleteBastionShareableLink(ctx, - "", - "", - armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }}, - }, - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionShareableLinkGet.json -func ExampleManagementClient_GetBastionShareableLink() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - pager := client.GetBastionShareableLink("", - "", - armnetwork.BastionShareableLinkListRequest{ - VMs: []*armnetwork.BastionShareableLink{ - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }, - { - VM: &armnetwork.VM{ - ID: to.StringPtr(""), - }, - }}, - }, - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionSessionsList.json -func ExampleManagementClient_BeginGetActiveSessions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - poller, err := client.BeginGetActiveSessions(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - for { - nextResult := res.NextPage(ctx) - if err := res.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range res.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/BastionSessionDelete.json -func ExampleManagementClient_DisconnectActiveSessions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - pager := client.DisconnectActiveSessions("", - "", - armnetwork.SessionIDs{}, - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWanSupportedSecurityProviders.json -func ExampleManagementClient_SupportedSecurityProviders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - res, err := client.SupportedSecurityProviders(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ManagementClientSupportedSecurityProvidersResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/GenerateVirtualWanVpnServerConfigurationVpnProfile.json -func ExampleManagementClient_BeginGeneratevirtualwanvpnserverconfigurationvpnprofile() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewManagementClient("", cred, nil) - poller, err := client.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx, - "", - "", - armnetwork.VirtualWanVPNProfileParameters{ - AuthenticationMethod: armnetwork.AuthenticationMethod("EAPTLS").ToPtr(), - VPNServerConfigurationResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go deleted file mode 100644 index 224340d6550f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkprofiles_client_test.go +++ /dev/null @@ -1,168 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileDelete.json -func ExampleProfilesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileGetConfigOnly.json -func ExampleProfilesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.ProfilesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ProfilesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileCreateConfigOnly.json -func ExampleProfilesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - res, err := client.CreateOrUpdate(ctx, - "", - "", - armnetwork.Profile{ - Location: to.StringPtr(""), - Properties: &armnetwork.ProfilePropertiesFormat{ - ContainerNetworkInterfaceConfigurations: []*armnetwork.ContainerNetworkInterfaceConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.ContainerNetworkInterfaceConfigurationPropertiesFormat{ - IPConfigurations: []*armnetwork.IPConfigurationProfile{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.IPConfigurationProfilePropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ProfilesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileUpdateTags.json -func ExampleProfilesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ProfilesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileListAll.json -func ExampleProfilesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkProfileList.json -func ExampleProfilesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewProfilesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_test.go deleted file mode 100644 index 0d8234ae141f..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networksecuritygroups_client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupDelete.json -func ExampleSecurityGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupGet.json -func ExampleSecurityGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.SecurityGroupsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityGroupsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupCreate.json -func ExampleSecurityGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.SecurityGroup{ - Location: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityGroupsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupUpdateTags.json -func ExampleSecurityGroupsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityGroupsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupListAll.json -func ExampleSecurityGroupsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupList.json -func ExampleSecurityGroupsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityGroupsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_test.go deleted file mode 100644 index f28f8a9683d7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkvirtualappliances_client_test.go +++ /dev/null @@ -1,179 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceDelete.json -func ExampleVirtualAppliancesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceGet.json -func ExampleVirtualAppliancesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.VirtualAppliancesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualAppliancesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceUpdateTags.json -func ExampleVirtualAppliancesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualAppliancesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualAppliancePut.json -func ExampleVirtualAppliancesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualAppliance{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Identity: &armnetwork.ManagedServiceIdentity{ - Type: armnetwork.ResourceIdentityTypeUserAssigned.ToPtr(), - UserAssignedIdentities: map[string]*armnetwork.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties{ - "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, - Properties: &armnetwork.VirtualAppliancePropertiesFormat{ - BootStrapConfigurationBlobs: []*string{ - to.StringPtr("https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrbootstrapconfig")}, - CloudInitConfigurationBlobs: []*string{ - to.StringPtr("https://csrncvhdstorage1.blob.core.windows.net/csrncvhdstoragecont/csrcloudinitconfig")}, - NvaSKU: &armnetwork.VirtualApplianceSKUProperties{ - BundledScaleUnit: to.StringPtr(""), - MarketPlaceVersion: to.StringPtr(""), - Vendor: to.StringPtr(""), - }, - VirtualApplianceAsn: to.Int64Ptr(10000), - VirtualHub: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualAppliancesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceListByResourceGroup.json -func ExampleVirtualAppliancesClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceListBySubscription.json -func ExampleVirtualAppliancesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualAppliancesClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go deleted file mode 100644 index 054d228727ea..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_networkwatchers_client_test.go +++ /dev/null @@ -1,479 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherCreate.json -func ExampleWatchersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.CreateOrUpdate(ctx, - "", - "", - armnetwork.Watcher{ - Location: to.StringPtr(""), - Properties: &armnetwork.WatcherPropertiesFormat{}, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherGet.json -func ExampleWatchersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherDelete.json -func ExampleWatchersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherUpdateTags.json -func ExampleWatchersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherList.json -func ExampleWatchersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.List(ctx, - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientListResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherListAll.json -func ExampleWatchersClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.ListAll(ctx, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientListAllResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherTopologyGet.json -func ExampleWatchersClient_GetTopology() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - res, err := client.GetTopology(ctx, - "", - "", - armnetwork.TopologyParameters{ - TargetResourceGroupName: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetTopologyResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherIpFlowVerify.json -func ExampleWatchersClient_BeginVerifyIPFlow() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginVerifyIPFlow(ctx, - "", - "", - armnetwork.VerificationIPFlowParameters{ - Direction: armnetwork.Direction("Outbound").ToPtr(), - LocalIPAddress: to.StringPtr(""), - LocalPort: to.StringPtr(""), - RemoteIPAddress: to.StringPtr(""), - RemotePort: to.StringPtr(""), - TargetResourceID: to.StringPtr(""), - Protocol: armnetwork.IPFlowProtocol("TCP").ToPtr(), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientVerifyIPFlowResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherNextHopGet.json -func ExampleWatchersClient_BeginGetNextHop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetNextHop(ctx, - "", - "", - armnetwork.NextHopParameters{ - DestinationIPAddress: to.StringPtr(""), - SourceIPAddress: to.StringPtr(""), - TargetNicResourceID: to.StringPtr(""), - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetNextHopResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherSecurityGroupViewGet.json -func ExampleWatchersClient_BeginGetVMSecurityRules() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetVMSecurityRules(ctx, - "", - "", - armnetwork.SecurityGroupViewParameters{ - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetVMSecurityRulesResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherTroubleshootGet.json -func ExampleWatchersClient_BeginGetTroubleshooting() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetTroubleshooting(ctx, - "", - "", - armnetwork.TroubleshootingParameters{ - Properties: &armnetwork.TroubleshootingProperties{ - StorageID: to.StringPtr(""), - StoragePath: to.StringPtr(""), - }, - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetTroubleshootingResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherTroubleshootResultQuery.json -func ExampleWatchersClient_BeginGetTroubleshootingResult() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetTroubleshootingResult(ctx, - "", - "", - armnetwork.QueryTroubleshootingParameters{ - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetTroubleshootingResultResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogConfigure.json -func ExampleWatchersClient_BeginSetFlowLogConfiguration() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginSetFlowLogConfiguration(ctx, - "", - "", - armnetwork.FlowLogInformation{ - Properties: &armnetwork.FlowLogProperties{ - Enabled: to.BoolPtr(true), - StorageID: to.StringPtr(""), - }, - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientSetFlowLogConfigurationResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherFlowLogStatusQuery.json -func ExampleWatchersClient_BeginGetFlowLogStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetFlowLogStatus(ctx, - "", - "", - armnetwork.FlowLogStatusParameters{ - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetFlowLogStatusResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherConnectivityCheck.json -func ExampleWatchersClient_BeginCheckConnectivity() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginCheckConnectivity(ctx, - "", - "", - armnetwork.ConnectivityParameters{ - Destination: &armnetwork.ConnectivityDestination{ - Address: to.StringPtr("
"), - Port: to.Int32Ptr(3389), - }, - PreferredIPVersion: armnetwork.IPVersion("IPv4").ToPtr(), - Source: &armnetwork.ConnectivitySource{ - ResourceID: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientCheckConnectivityResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherAzureReachabilityReportGet.json -func ExampleWatchersClient_BeginGetAzureReachabilityReport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetAzureReachabilityReport(ctx, - "", - "", - armnetwork.AzureReachabilityReportParameters{ - AzureLocations: []*string{ - to.StringPtr("West US")}, - EndTime: to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-10T00:00:00Z"); return t }()), - ProviderLocation: &armnetwork.AzureReachabilityReportLocation{ - Country: to.StringPtr(""), - State: to.StringPtr(""), - }, - Providers: []*string{ - to.StringPtr("Frontier Communications of America, Inc. - ASN 5650")}, - StartTime: to.TimePtr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-09-07T00:00:00Z"); return t }()), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetAzureReachabilityReportResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherAvailableProvidersListGet.json -func ExampleWatchersClient_BeginListAvailableProviders() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginListAvailableProviders(ctx, - "", - "", - armnetwork.AvailableProvidersListParameters{ - AzureLocations: []*string{ - to.StringPtr("West US")}, - City: to.StringPtr(""), - Country: to.StringPtr(""), - State: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientListAvailableProvidersResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherNetworkConfigurationDiagnostic.json -func ExampleWatchersClient_BeginGetNetworkConfigurationDiagnostic() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWatchersClient("", cred, nil) - poller, err := client.BeginGetNetworkConfigurationDiagnostic(ctx, - "", - "", - armnetwork.ConfigurationDiagnosticParameters{ - Profiles: []*armnetwork.ConfigurationDiagnosticProfile{ - { - Destination: to.StringPtr(""), - DestinationPort: to.StringPtr(""), - Direction: armnetwork.Direction("Inbound").ToPtr(), - Source: to.StringPtr(""), - Protocol: to.StringPtr(""), - }}, - TargetResourceID: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WatchersClientGetNetworkConfigurationDiagnosticResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_test.go deleted file mode 100644 index ba59bf9ab388..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_operations_client_test.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/OperationList.json -func ExampleOperationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewOperationsClient(cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go deleted file mode 100644 index 1bac040a2d2a..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_p2svpngateways_client_test.go +++ /dev/null @@ -1,231 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayGet.json -func ExampleP2SVPNGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.P2SVPNGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayPut.json -func ExampleP2SVPNGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.P2SVPNGateway{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.P2SVPNGatewayProperties{ - CustomDNSServers: []*string{ - to.StringPtr("1.1.1.1"), - to.StringPtr("2.2.2.2")}, - IsRoutingPreferenceInternet: to.BoolPtr(false), - P2SConnectionConfigurations: []*armnetwork.P2SConnectionConfiguration{ - { - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.P2SConnectionConfigurationProperties{ - RoutingConfiguration: &armnetwork.RoutingConfiguration{ - AssociatedRouteTable: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - PropagatedRouteTables: &armnetwork.PropagatedRouteTable{ - IDs: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }, - { - ID: to.StringPtr(""), - }, - { - ID: to.StringPtr(""), - }}, - Labels: []*string{ - to.StringPtr("label1"), - to.StringPtr("label2")}, - }, - VnetRoutes: &armnetwork.VnetRoute{ - StaticRoutes: []*armnetwork.StaticRoute{}, - }, - }, - VPNClientAddressPool: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("101.3.0.0/16")}, - }, - }, - }}, - VirtualHub: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - VPNGatewayScaleUnit: to.Int32Ptr(1), - VPNServerConfiguration: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.P2SVPNGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayUpdateTags.json -func ExampleP2SVPNGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.P2SVPNGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayDelete.json -func ExampleP2SVPNGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayListByResourceGroup.json -func ExampleP2SVPNGatewaysClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayList.json -func ExampleP2SVPNGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/P2SVpnGatewayReset.json -func ExampleP2SVPNGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewP2SVPNGatewaysClient("", cred, nil) - poller, err := client.BeginReset(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.P2SVPNGatewaysClientResetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go deleted file mode 100644 index 90618326db93..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_packetcaptures_client_test.go +++ /dev/null @@ -1,165 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCaptureCreate.json -func ExamplePacketCapturesClient_BeginCreate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - poller, err := client.BeginCreate(ctx, - "", - "", - "", - armnetwork.PacketCapture{ - Properties: &armnetwork.PacketCaptureParameters{ - BytesToCapturePerPacket: to.Int64Ptr(10000), - Filters: []*armnetwork.PacketCaptureFilter{ - { - LocalIPAddress: to.StringPtr(""), - LocalPort: to.StringPtr(""), - Protocol: armnetwork.PcProtocol("TCP").ToPtr(), - }}, - StorageLocation: &armnetwork.PacketCaptureStorageLocation{ - FilePath: to.StringPtr(""), - StorageID: to.StringPtr(""), - StoragePath: to.StringPtr(""), - }, - Target: to.StringPtr(""), - TimeLimitInSeconds: to.Int32Ptr(100), - TotalBytesPerSession: to.Int64Ptr(100000), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCaptureGet.json -func ExamplePacketCapturesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PacketCapturesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCaptureDelete.json -func ExamplePacketCapturesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCaptureStop.json -func ExamplePacketCapturesClient_BeginStop() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - poller, err := client.BeginStop(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCaptureQueryStatus.json -func ExamplePacketCapturesClient_BeginGetStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - poller, err := client.BeginGetStatus(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PacketCapturesClientGetStatusResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkWatcherPacketCapturesList.json -func ExamplePacketCapturesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPacketCapturesClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PacketCapturesClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go deleted file mode 100644 index 32980aebdefc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_peerexpressroutecircuitconnections_client_test.go +++ /dev/null @@ -1,63 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PeerExpressRouteCircuitConnectionGet.json -func ExamplePeerExpressRouteCircuitConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPeerExpressRouteCircuitConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PeerExpressRouteCircuitConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PeerExpressRouteCircuitConnectionList.json -func ExamplePeerExpressRouteCircuitConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPeerExpressRouteCircuitConnectionsClient("", cred, nil) - pager := client.List("", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go deleted file mode 100644 index d5f5025d1a69..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatednszonegroups_client_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointDnsZoneGroupDelete.json -func ExamplePrivateDNSZoneGroupsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateDNSZoneGroupsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointDnsZoneGroupGet.json -func ExamplePrivateDNSZoneGroupsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateDNSZoneGroupsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateDNSZoneGroupsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointDnsZoneGroupCreate.json -func ExamplePrivateDNSZoneGroupsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateDNSZoneGroupsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.PrivateDNSZoneGroup{ - Properties: &armnetwork.PrivateDNSZoneGroupPropertiesFormat{ - PrivateDNSZoneConfigs: []*armnetwork.PrivateDNSZoneConfig{ - { - Properties: &armnetwork.PrivateDNSZonePropertiesFormat{ - PrivateDNSZoneID: to.StringPtr(""), - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateDNSZoneGroupsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointDnsZoneGroupList.json -func ExamplePrivateDNSZoneGroupsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateDNSZoneGroupsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go deleted file mode 100644 index 309abdd4b709..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privateendpoints_client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointDelete.json -func ExamplePrivateEndpointsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateEndpointsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointGet.json -func ExamplePrivateEndpointsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateEndpointsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.PrivateEndpointsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateEndpointsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointCreate.json -func ExamplePrivateEndpointsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateEndpointsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.PrivateEndpoint{ - Location: to.StringPtr(""), - Properties: &armnetwork.PrivateEndpointProperties{ - CustomNetworkInterfaceName: to.StringPtr(""), - IPConfigurations: []*armnetwork.PrivateEndpointIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.PrivateEndpointIPConfigurationProperties{ - GroupID: to.StringPtr(""), - MemberName: to.StringPtr(""), - PrivateIPAddress: to.StringPtr(""), - }, - }}, - PrivateLinkServiceConnections: []*armnetwork.PrivateLinkServiceConnection{ - { - Properties: &armnetwork.PrivateLinkServiceConnectionProperties{ - GroupIDs: []*string{ - to.StringPtr("groupIdFromResource")}, - PrivateLinkServiceID: to.StringPtr(""), - RequestMessage: to.StringPtr(""), - }, - }}, - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateEndpointsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointList.json -func ExamplePrivateEndpointsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateEndpointsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateEndpointListAll.json -func ExamplePrivateEndpointsClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateEndpointsClient("", cred, nil) - pager := client.ListBySubscription(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go deleted file mode 100644 index 2cd481c78b93..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_privatelinkservices_client_test.go +++ /dev/null @@ -1,359 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceDelete.json -func ExamplePrivateLinkServicesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceGet.json -func ExamplePrivateLinkServicesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.PrivateLinkServicesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceCreate.json -func ExamplePrivateLinkServicesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.PrivateLinkService{ - Location: to.StringPtr(""), - Properties: &armnetwork.PrivateLinkServiceProperties{ - AutoApproval: &armnetwork.PrivateLinkServicePropertiesAutoApproval{ - Subscriptions: []*string{ - to.StringPtr("subscription1"), - to.StringPtr("subscription2")}, - }, - Fqdns: []*string{ - to.StringPtr("fqdn1"), - to.StringPtr("fqdn2"), - to.StringPtr("fqdn3")}, - IPConfigurations: []*armnetwork.PrivateLinkServiceIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.PrivateLinkServiceIPConfigurationProperties{ - PrivateIPAddress: to.StringPtr(""), - PrivateIPAddressVersion: armnetwork.IPVersion("IPv4").ToPtr(), - PrivateIPAllocationMethod: armnetwork.IPAllocationMethod("Static").ToPtr(), - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }}, - LoadBalancerFrontendIPConfigurations: []*armnetwork.FrontendIPConfiguration{ - { - ID: to.StringPtr(""), - }}, - Visibility: &armnetwork.PrivateLinkServicePropertiesVisibility{ - Subscriptions: []*string{ - to.StringPtr("subscription1"), - to.StringPtr("subscription2"), - to.StringPtr("subscription3")}, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceList.json -func ExamplePrivateLinkServicesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceListAll.json -func ExamplePrivateLinkServicesClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - pager := client.ListBySubscription(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceGetPrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_GetPrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - res, err := client.GetPrivateEndpointConnection(ctx, - "", - "", - "", - &armnetwork.PrivateLinkServicesClientGetPrivateEndpointConnectionOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientGetPrivateEndpointConnectionResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceUpdatePrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_UpdatePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - res, err := client.UpdatePrivateEndpointConnection(ctx, - "", - "", - "", - armnetwork.PrivateEndpointConnection{ - Name: to.StringPtr(""), - Properties: &armnetwork.PrivateEndpointConnectionProperties{ - PrivateEndpoint: &armnetwork.PrivateEndpoint{ - ID: to.StringPtr(""), - }, - PrivateLinkServiceConnectionState: &armnetwork.PrivateLinkServiceConnectionState{ - Description: to.StringPtr(""), - Status: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceDeletePrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_BeginDeletePrivateEndpointConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - poller, err := client.BeginDeletePrivateEndpointConnection(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PrivateLinkServiceListPrivateEndpointConnection.json -func ExamplePrivateLinkServicesClient_ListPrivateEndpointConnections() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - pager := client.ListPrivateEndpointConnections("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CheckPrivateLinkServiceVisibility.json -func ExamplePrivateLinkServicesClient_BeginCheckPrivateLinkServiceVisibility() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - poller, err := client.BeginCheckPrivateLinkServiceVisibility(ctx, - "", - armnetwork.CheckPrivateLinkServiceVisibilityRequest{ - PrivateLinkServiceAlias: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CheckPrivateLinkServiceVisibilityByResourceGroup.json -func ExamplePrivateLinkServicesClient_BeginCheckPrivateLinkServiceVisibilityByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - poller, err := client.BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx, - "", - "", - armnetwork.CheckPrivateLinkServiceVisibilityRequest{ - PrivateLinkServiceAlias: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AutoApprovedPrivateLinkServicesGet.json -func ExamplePrivateLinkServicesClient_ListAutoApprovedPrivateLinkServices() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - pager := client.ListAutoApprovedPrivateLinkServices("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AutoApprovedPrivateLinkServicesResourceGroupGet.json -func ExamplePrivateLinkServicesClient_ListAutoApprovedPrivateLinkServicesByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPrivateLinkServicesClient("", cred, nil) - pager := client.ListAutoApprovedPrivateLinkServicesByResourceGroup("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go deleted file mode 100644 index 88703abb65f6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipaddresses_client_test.go +++ /dev/null @@ -1,310 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServicePublicIpListAll.json -func ExamplePublicIPAddressesClient_ListCloudServicePublicIPAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.ListCloudServicePublicIPAddresses("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServiceRoleInstancePublicIpList.json -func ExamplePublicIPAddressesClient_ListCloudServiceRoleInstancePublicIPAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.ListCloudServiceRoleInstancePublicIPAddresses("", - "", - "", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/CloudServicePublicIpGet.json -func ExamplePublicIPAddressesClient_GetCloudServicePublicIPAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - res, err := client.GetCloudServicePublicIPAddress(ctx, - "", - "", - "", - "", - "", - "", - &armnetwork.PublicIPAddressesClientGetCloudServicePublicIPAddressOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPAddressesClientGetCloudServicePublicIPAddressResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressDelete.json -func ExamplePublicIPAddressesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressGet.json -func ExamplePublicIPAddressesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.PublicIPAddressesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPAddressesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressCreateDns.json -func ExamplePublicIPAddressesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.PublicIPAddress{ - Location: to.StringPtr(""), - Properties: &armnetwork.PublicIPAddressPropertiesFormat{ - DNSSettings: &armnetwork.PublicIPAddressDNSSettings{ - DomainNameLabel: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPAddressesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressUpdateTags.json -func ExamplePublicIPAddressesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPAddressesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressListAll.json -func ExamplePublicIPAddressesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpAddressList.json -func ExamplePublicIPAddressesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssPublicIpListAll.json -func ExamplePublicIPAddressesClient_ListVirtualMachineScaleSetPublicIPAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.ListVirtualMachineScaleSetPublicIPAddresses("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssVmPublicIpList.json -func ExamplePublicIPAddressesClient_ListVirtualMachineScaleSetVMPublicIPAddresses() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - pager := client.ListVirtualMachineScaleSetVMPublicIPAddresses("", - "", - "", - "", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VmssPublicIpGet.json -func ExamplePublicIPAddressesClient_GetVirtualMachineScaleSetPublicIPAddress() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPAddressesClient("", cred, nil) - res, err := client.GetVirtualMachineScaleSetPublicIPAddress(ctx, - "", - "", - "", - "", - "", - "", - &armnetwork.PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go deleted file mode 100644 index 68d554ac83ca..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_publicipprefixes_client_test.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixDelete.json -func ExamplePublicIPPrefixesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixGet.json -func ExamplePublicIPPrefixesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.PublicIPPrefixesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPPrefixesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixCreateCustomizedValues.json -func ExamplePublicIPPrefixesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.PublicIPPrefix{ - Location: to.StringPtr(""), - Properties: &armnetwork.PublicIPPrefixPropertiesFormat{ - PrefixLength: to.Int32Ptr(30), - PublicIPAddressVersion: armnetwork.IPVersion("IPv4").ToPtr(), - }, - SKU: &armnetwork.PublicIPPrefixSKU{ - Name: armnetwork.PublicIPPrefixSKUName("Standard").ToPtr(), - Tier: armnetwork.PublicIPPrefixSKUTier("Regional").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPPrefixesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixUpdateTags.json -func ExamplePublicIPPrefixesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.PublicIPPrefixesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixListAll.json -func ExamplePublicIPPrefixesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/PublicIpPrefixList.json -func ExamplePublicIPPrefixesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewPublicIPPrefixesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_test.go deleted file mode 100644 index d5109fae5199..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_resourcenavigationlinks_client_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGetResourceNavigationLinks.json -func ExampleResourceNavigationLinksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewResourceNavigationLinksClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ResourceNavigationLinksClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_test.go deleted file mode 100644 index 22faa652942b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilterrules_client_test.go +++ /dev/null @@ -1,118 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterRuleDelete.json -func ExampleRouteFilterRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFilterRulesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterRuleGet.json -func ExampleRouteFilterRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFilterRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteFilterRulesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterRuleCreate.json -func ExampleRouteFilterRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFilterRulesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.RouteFilterRule{ - Properties: &armnetwork.RouteFilterRulePropertiesFormat{ - Access: armnetwork.Access("Allow").ToPtr(), - Communities: []*string{ - to.StringPtr("12076:5030"), - to.StringPtr("12076:5040")}, - RouteFilterRuleType: armnetwork.RouteFilterRuleType("Community").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteFilterRulesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterRuleListByRouteFilter.json -func ExampleRouteFilterRulesClient_ListByRouteFilter() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFilterRulesClient("", cred, nil) - pager := client.ListByRouteFilter("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go deleted file mode 100644 index 3d2e3482fdfe..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routefilters_client_test.go +++ /dev/null @@ -1,170 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterDelete.json -func ExampleRouteFiltersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterGet.json -func ExampleRouteFiltersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.RouteFiltersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteFiltersClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterCreate.json -func ExampleRouteFiltersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.RouteFilter{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.RouteFilterPropertiesFormat{ - Rules: []*armnetwork.RouteFilterRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.RouteFilterRulePropertiesFormat{ - Access: armnetwork.Access("Allow").ToPtr(), - Communities: []*string{ - to.StringPtr("12076:5030"), - to.StringPtr("12076:5040")}, - RouteFilterRuleType: armnetwork.RouteFilterRuleType("Community").ToPtr(), - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteFiltersClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterUpdateTags.json -func ExampleRouteFiltersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteFiltersClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterListByResourceGroup.json -func ExampleRouteFiltersClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteFilterList.json -func ExampleRouteFiltersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteFiltersClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go deleted file mode 100644 index 54e5984e4550..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routes_client_test.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableRouteDelete.json -func ExampleRoutesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableRouteGet.json -func ExampleRoutesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RoutesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableRouteCreate.json -func ExampleRoutesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.Route{ - Properties: &armnetwork.RoutePropertiesFormat{ - AddressPrefix: to.StringPtr(""), - NextHopType: armnetwork.RouteNextHopType("VirtualNetworkGateway").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RoutesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableRouteList.json -func ExampleRoutesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_test.go deleted file mode 100644 index ce35dd4b4b20..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routetables_client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableDelete.json -func ExampleRouteTablesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableGet.json -func ExampleRouteTablesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.RouteTablesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteTablesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableCreate.json -func ExampleRouteTablesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.RouteTable{ - Location: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteTablesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableUpdateTags.json -func ExampleRouteTablesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RouteTablesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableList.json -func ExampleRouteTablesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RouteTableListAll.json -func ExampleRouteTablesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRouteTablesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_test.go deleted file mode 100644 index 8dbecfbc8008..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_routingintent_client_test.go +++ /dev/null @@ -1,126 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RoutingIntentPut.json -func ExampleRoutingIntentClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutingIntentClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.RoutingIntent{ - Properties: &armnetwork.RoutingIntentProperties{ - RoutingPolicies: []*armnetwork.RoutingPolicy{ - { - Name: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("Internet")}, - NextHop: to.StringPtr(""), - }, - { - Name: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("PrivateTraffic")}, - NextHop: to.StringPtr(""), - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RoutingIntentClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RoutingIntentGet.json -func ExampleRoutingIntentClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutingIntentClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.RoutingIntentClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RoutingIntentDelete.json -func ExampleRoutingIntentClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutingIntentClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/RoutingIntentList.json -func ExampleRoutingIntentClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewRoutingIntentClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go deleted file mode 100644 index c3e576437c86..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securitypartnerproviders_client_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderDelete.json -func ExampleSecurityPartnerProvidersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderGet.json -func ExampleSecurityPartnerProvidersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityPartnerProvidersClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderPut.json -func ExampleSecurityPartnerProvidersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.SecurityPartnerProvider{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.SecurityPartnerProviderPropertiesFormat{ - SecurityProviderName: armnetwork.SecurityProviderName("ZScaler").ToPtr(), - VirtualHub: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityPartnerProvidersClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderUpdateTags.json -func ExampleSecurityPartnerProvidersClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityPartnerProvidersClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderListByResourceGroup.json -func ExampleSecurityPartnerProvidersClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SecurityPartnerProviderListBySubscription.json -func ExampleSecurityPartnerProvidersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityPartnerProvidersClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go deleted file mode 100644 index ea760e593d70..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_securityrules_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupRuleDelete.json -func ExampleSecurityRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityRulesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupRuleGet.json -func ExampleSecurityRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityRulesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupRuleCreate.json -func ExampleSecurityRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityRulesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.SecurityRule{ - Properties: &armnetwork.SecurityRulePropertiesFormat{ - Access: armnetwork.SecurityRuleAccess("Deny").ToPtr(), - DestinationAddressPrefix: to.StringPtr(""), - DestinationPortRange: to.StringPtr(""), - Direction: armnetwork.SecurityRuleDirection("Outbound").ToPtr(), - Priority: to.Int32Ptr(100), - SourceAddressPrefix: to.StringPtr(""), - SourcePortRange: to.StringPtr(""), - Protocol: armnetwork.SecurityRuleProtocol("*").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SecurityRulesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkSecurityGroupRuleList.json -func ExampleSecurityRulesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSecurityRulesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_test.go deleted file mode 100644 index f9e16c6a6956..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceassociationlinks_client_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGetServiceAssociationLinks.json -func ExampleServiceAssociationLinksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceAssociationLinksClient("", cred, nil) - res, err := client.List(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceAssociationLinksClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_test.go deleted file mode 100644 index d8782b145e47..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicies_client_test.go +++ /dev/null @@ -1,155 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyDelete.json -func ExampleServiceEndpointPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyGet.json -func ExampleServiceEndpointPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.ServiceEndpointPoliciesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceEndpointPoliciesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyCreate.json -func ExampleServiceEndpointPoliciesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.ServiceEndpointPolicy{ - Location: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceEndpointPoliciesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyUpdateTags.json -func ExampleServiceEndpointPoliciesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceEndpointPoliciesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyListAll.json -func ExampleServiceEndpointPoliciesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyList.json -func ExampleServiceEndpointPoliciesClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPoliciesClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go deleted file mode 100644 index 7b398759da28..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_serviceendpointpolicydefinitions_client_test.go +++ /dev/null @@ -1,119 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyDefinitionDelete.json -func ExampleServiceEndpointPolicyDefinitionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPolicyDefinitionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyDefinitionGet.json -func ExampleServiceEndpointPolicyDefinitionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPolicyDefinitionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceEndpointPolicyDefinitionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyDefinitionCreate.json -func ExampleServiceEndpointPolicyDefinitionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPolicyDefinitionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.ServiceEndpointPolicyDefinition{ - Properties: &armnetwork.ServiceEndpointPolicyDefinitionPropertiesFormat{ - Description: to.StringPtr(""), - Service: to.StringPtr(""), - ServiceResources: []*string{ - to.StringPtr("/subscriptions/subid1"), - to.StringPtr("/subscriptions/subid1/resourceGroups/storageRg"), - to.StringPtr("/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount")}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceEndpointPolicyDefinitionList.json -func ExampleServiceEndpointPolicyDefinitionsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceEndpointPolicyDefinitionsClient("", cred, nil) - pager := client.ListByResourceGroup("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go deleted file mode 100644 index a5567fae0b27..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetaginformation_client_test.go +++ /dev/null @@ -1,43 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceTagInformationListResult.json -func ExampleServiceTagInformationClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceTagInformationClient("", cred, nil) - pager := client.List("", - &armnetwork.ServiceTagInformationClientListOptions{NoAddressPrefixes: nil, - TagName: nil, - }) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go deleted file mode 100644 index 4bc4703227f1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_servicetags_client_test.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/ServiceTagsList.json -func ExampleServiceTagsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewServiceTagsClient("", cred, nil) - res, err := client.List(ctx, - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.ServiceTagsClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go deleted file mode 100644 index 5a540b2d6ff7..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_subnets_client_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetDelete.json -func ExampleSubnetsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetGet.json -func ExampleSubnetsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - &armnetwork.SubnetsClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SubnetsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetCreate.json -func ExampleSubnetsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.Subnet{ - Properties: &armnetwork.SubnetPropertiesFormat{ - AddressPrefix: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.SubnetsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetPrepareNetworkPolicies.json -func ExampleSubnetsClient_BeginPrepareNetworkPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - poller, err := client.BeginPrepareNetworkPolicies(ctx, - "", - "", - "", - armnetwork.PrepareNetworkPoliciesRequest{ - ServiceName: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetUnprepareNetworkPolicies.json -func ExampleSubnetsClient_BeginUnprepareNetworkPolicies() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - poller, err := client.BeginUnprepareNetworkPolicies(ctx, - "", - "", - "", - armnetwork.UnprepareNetworkPoliciesRequest{ - ServiceName: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/SubnetList.json -func ExampleSubnetsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewSubnetsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go deleted file mode 100644 index 1f64dda43ba3..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_usages_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/UsageList.json -func ExampleUsagesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewUsagesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go deleted file mode 100644 index a8f09a7d9bc8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualappliancesites_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSiteDelete.json -func ExampleVirtualApplianceSitesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSitesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSiteGet.json -func ExampleVirtualApplianceSitesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSitesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualApplianceSitesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSitePut.json -func ExampleVirtualApplianceSitesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSitesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VirtualApplianceSite{ - Properties: &armnetwork.VirtualApplianceSiteProperties{ - AddressPrefix: to.StringPtr(""), - O365Policy: &armnetwork.Office365PolicyProperties{ - BreakOutCategories: &armnetwork.BreakOutCategoryPolicies{ - Default: to.BoolPtr(true), - Allow: to.BoolPtr(true), - Optimize: to.BoolPtr(true), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualApplianceSitesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSiteList.json -func ExampleVirtualApplianceSitesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSitesClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go deleted file mode 100644 index ca0f722c3aca..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualapplianceskus_client_test.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSkuList.json -func ExampleVirtualApplianceSKUsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSKUsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/NetworkVirtualApplianceSkuGet.json -func ExampleVirtualApplianceSKUsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualApplianceSKUsClient("", cred, nil) - res, err := client.Get(ctx, - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualApplianceSKUsClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go deleted file mode 100644 index 86e638ebe716..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnection_client_test.go +++ /dev/null @@ -1,93 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubBgpConnectionGet.json -func ExampleVirtualHubBgpConnectionClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubBgpConnectionClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubBgpConnectionPut.json -func ExampleVirtualHubBgpConnectionClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.BgpConnection{ - Properties: &armnetwork.BgpConnectionProperties{ - HubVirtualNetworkConnection: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - PeerAsn: to.Int64Ptr(20000), - PeerIP: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubBgpConnectionClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubBgpConnectionDelete.json -func ExampleVirtualHubBgpConnectionClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go deleted file mode 100644 index d5930eefe5c0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubbgpconnections_client_test.go +++ /dev/null @@ -1,90 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubBgpConnectionList.json -func ExampleVirtualHubBgpConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeerListLearnedRoute.json -func ExampleVirtualHubBgpConnectionsClient_BeginListLearnedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionsClient("", cred, nil) - poller, err := client.BeginListLearnedRoutes(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubBgpConnectionsClientListLearnedRoutesResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeerListAdvertisedRoute.json -func ExampleVirtualHubBgpConnectionsClient_BeginListAdvertisedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubBgpConnectionsClient("", cred, nil) - poller, err := client.BeginListAdvertisedRoutes(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubBgpConnectionsClientListAdvertisedRoutesResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go deleted file mode 100644 index 2e33f2e44236..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubipconfiguration_client_test.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubIpConfigurationGet.json -func ExampleVirtualHubIPConfigurationClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubIPConfigurationClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubIPConfigurationClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubIpConfigurationPut.json -func ExampleVirtualHubIPConfigurationClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubIPConfigurationClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.HubIPConfiguration{ - Properties: &armnetwork.HubIPConfigurationPropertiesFormat{ - Subnet: &armnetwork.Subnet{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubIPConfigurationClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubIpConfigurationDelete.json -func ExampleVirtualHubIPConfigurationClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubIPConfigurationClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubIpConfigurationList.json -func ExampleVirtualHubIPConfigurationClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubIPConfigurationClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go deleted file mode 100644 index a477deee3343..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubroutetablev2s_client_test.go +++ /dev/null @@ -1,133 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubRouteTableV2Get.json -func ExampleVirtualHubRouteTableV2SClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubRouteTableV2SClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubRouteTableV2SClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubRouteTableV2Put.json -func ExampleVirtualHubRouteTableV2SClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubRouteTableV2SClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VirtualHubRouteTableV2{ - Properties: &armnetwork.VirtualHubRouteTableV2Properties{ - AttachedConnections: []*string{ - to.StringPtr("All_Vnets")}, - Routes: []*armnetwork.VirtualHubRouteV2{ - { - DestinationType: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("20.10.0.0/16"), - to.StringPtr("20.20.0.0/16")}, - NextHopType: to.StringPtr(""), - NextHops: []*string{ - to.StringPtr("10.0.0.68")}, - }, - { - DestinationType: to.StringPtr(""), - Destinations: []*string{ - to.StringPtr("0.0.0.0/0")}, - NextHopType: to.StringPtr(""), - NextHops: []*string{ - to.StringPtr("10.0.0.68")}, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubRouteTableV2SClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubRouteTableV2Delete.json -func ExampleVirtualHubRouteTableV2SClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubRouteTableV2SClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubRouteTableV2List.json -func ExampleVirtualHubRouteTableV2SClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubRouteTableV2SClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go deleted file mode 100644 index bd79cebb4dc1..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualhubs_client_test.go +++ /dev/null @@ -1,190 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubGet.json -func ExampleVirtualHubsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubPut.json -func ExampleVirtualHubsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualHub{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VirtualHubProperties{ - AddressPrefix: to.StringPtr(""), - SKU: to.StringPtr(""), - VirtualWan: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubUpdateTags.json -func ExampleVirtualHubsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualHubsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubDelete.json -func ExampleVirtualHubsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubListByResourceGroup.json -func ExampleVirtualHubsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualHubList.json -func ExampleVirtualHubsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/EffectiveRoutesListForConnection.json -func ExampleVirtualHubsClient_BeginGetEffectiveVirtualHubRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualHubsClient("", cred, nil) - poller, err := client.BeginGetEffectiveVirtualHubRoutes(ctx, - "", - "", - &armnetwork.VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions{EffectiveRoutesParameters: &armnetwork.EffectiveRoutesParameters{ - ResourceID: to.StringPtr(""), - VirtualWanResourceType: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go deleted file mode 100644 index dbb82ec0ca5e..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewayconnections_client_test.go +++ /dev/null @@ -1,363 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionCreate.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualNetworkGatewayConnection{ - Location: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayConnectionPropertiesFormat{ - ConnectionMode: armnetwork.VirtualNetworkGatewayConnectionMode("Default").ToPtr(), - ConnectionProtocol: armnetwork.VirtualNetworkGatewayConnectionProtocol("IKEv2").ToPtr(), - ConnectionType: armnetwork.VirtualNetworkGatewayConnectionType("IPsec").ToPtr(), - DpdTimeoutSeconds: to.Int32Ptr(30), - EgressNatRules: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - EnableBgp: to.BoolPtr(false), - IngressNatRules: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - IPSecPolicies: []*armnetwork.IPSecPolicy{}, - LocalNetworkGateway2: &armnetwork.LocalNetworkGateway{ - ID: to.StringPtr(""), - Location: to.StringPtr(""), - Tags: map[string]*string{}, - Properties: &armnetwork.LocalNetworkGatewayPropertiesFormat{ - GatewayIPAddress: to.StringPtr(""), - LocalNetworkAddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("10.1.0.0/16")}, - }, - }, - }, - RoutingWeight: to.Int32Ptr(0), - SharedKey: to.StringPtr(""), - TrafficSelectorPolicies: []*armnetwork.TrafficSelectorPolicy{}, - UsePolicyBasedTrafficSelectors: to.BoolPtr(false), - VirtualNetworkGateway1: &armnetwork.VirtualNetworkGateway{ - ID: to.StringPtr(""), - Location: to.StringPtr(""), - Tags: map[string]*string{}, - Properties: &armnetwork.VirtualNetworkGatewayPropertiesFormat{ - Active: to.BoolPtr(false), - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Int64Ptr(65514), - BgpPeeringAddress: to.StringPtr(""), - PeerWeight: to.Int32Ptr(0), - }, - EnableBgp: to.BoolPtr(false), - GatewayType: armnetwork.VirtualNetworkGatewayType("Vpn").ToPtr(), - IPConfigurations: []*armnetwork.VirtualNetworkGatewayIPConfiguration{ - { - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayIPConfigurationPropertiesFormat{ - PrivateIPAllocationMethod: armnetwork.IPAllocationMethod("Dynamic").ToPtr(), - PublicIPAddress: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Subnet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - SKU: &armnetwork.VirtualNetworkGatewaySKU{ - Name: armnetwork.VirtualNetworkGatewaySKUName("VpnGw1").ToPtr(), - Tier: armnetwork.VirtualNetworkGatewaySKUTier("VpnGw1").ToPtr(), - }, - VPNType: armnetwork.VPNType("RouteBased").ToPtr(), - }, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionGet.json -func ExampleVirtualNetworkGatewayConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionDelete.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionSetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginSetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginSetSharedKey(ctx, - "", - "", - armnetwork.ConnectionSharedKey{ - Value: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientSetSharedKeyResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionGetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_GetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - res, err := client.GetSharedKey(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientGetSharedKeyResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionsList.json -func ExampleVirtualNetworkGatewayConnectionsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionResetSharedKey.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginResetSharedKey() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginResetSharedKey(ctx, - "", - "", - armnetwork.ConnectionResetSharedKey{ - KeyLength: to.Int32Ptr(128), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientResetSharedKeyResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStartPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginStartPacketCapture(ctx, - "", - "", - &armnetwork.VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNPacketCaptureStartParameters{ - FilterData: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionStopPacketCapture.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginStopPacketCapture(ctx, - "", - "", - armnetwork.VPNPacketCaptureStopParameters{ - SasURL: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionGetIkeSas.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginGetIkeSas() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginGetIkeSas(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayConnectionsClientGetIkeSasResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayConnectionReset.json -func ExampleVirtualNetworkGatewayConnectionsClient_BeginResetConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayConnectionsClient("", cred, nil) - poller, err := client.BeginResetConnection(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go deleted file mode 100644 index 1d57a4b989a8..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgatewaynatrules_client_test.go +++ /dev/null @@ -1,126 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayNatRuleGet.json -func ExampleVirtualNetworkGatewayNatRulesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayNatRulesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayNatRulesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayNatRulePut.json -func ExampleVirtualNetworkGatewayNatRulesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayNatRulesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VirtualNetworkGatewayNatRule{ - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: armnetwork.VPNNatRuleType("Static").ToPtr(), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - PortRange: to.StringPtr(""), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - PortRange: to.StringPtr(""), - }}, - IPConfigurationID: to.StringPtr(""), - Mode: armnetwork.VPNNatRuleMode("EgressSnat").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayNatRuleDelete.json -func ExampleVirtualNetworkGatewayNatRulesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayNatRulesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayNatRuleList.json -func ExampleVirtualNetworkGatewayNatRulesClient_ListByVirtualNetworkGateway() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewayNatRulesClient("", cred, nil) - pager := client.ListByVirtualNetworkGateway("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go deleted file mode 100644 index 6b45ce0bd2bc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkgateways_client_test.go +++ /dev/null @@ -1,427 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayUpdate.json -func ExampleVirtualNetworkGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualNetworkGateway{ - Location: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayPropertiesFormat{ - Active: to.BoolPtr(false), - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Int64Ptr(65515), - BgpPeeringAddress: to.StringPtr(""), - PeerWeight: to.Int32Ptr(0), - }, - CustomRoutes: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("101.168.0.6/32")}, - }, - DisableIPSecReplayProtection: to.BoolPtr(false), - EnableBgp: to.BoolPtr(false), - EnableBgpRouteTranslationForNat: to.BoolPtr(false), - EnableDNSForwarding: to.BoolPtr(true), - GatewayType: armnetwork.VirtualNetworkGatewayType("Vpn").ToPtr(), - IPConfigurations: []*armnetwork.VirtualNetworkGatewayIPConfiguration{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayIPConfigurationPropertiesFormat{ - PrivateIPAllocationMethod: armnetwork.IPAllocationMethod("Dynamic").ToPtr(), - PublicIPAddress: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - Subnet: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - NatRules: []*armnetwork.VirtualNetworkGatewayNatRule{ - { - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: armnetwork.VPNNatRuleType("Static").ToPtr(), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - IPConfigurationID: to.StringPtr(""), - Mode: armnetwork.VPNNatRuleMode("EgressSnat").ToPtr(), - }, - }, - { - ID: to.StringPtr(""), - Name: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkGatewayNatRuleProperties{ - Type: armnetwork.VPNNatRuleType("Static").ToPtr(), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - IPConfigurationID: to.StringPtr(""), - Mode: armnetwork.VPNNatRuleMode("IngressSnat").ToPtr(), - }, - }}, - SKU: &armnetwork.VirtualNetworkGatewaySKU{ - Name: armnetwork.VirtualNetworkGatewaySKUName("VpnGw1").ToPtr(), - Tier: armnetwork.VirtualNetworkGatewaySKUTier("VpnGw1").ToPtr(), - }, - VPNClientConfiguration: &armnetwork.VPNClientConfiguration{ - RadiusServers: []*armnetwork.RadiusServer{ - { - RadiusServerAddress: to.StringPtr(""), - RadiusServerScore: to.Int64Ptr(20), - RadiusServerSecret: to.StringPtr(""), - }}, - VPNClientProtocols: []*armnetwork.VPNClientProtocol{ - armnetwork.VPNClientProtocol("OpenVPN").ToPtr()}, - VPNClientRevokedCertificates: []*armnetwork.VPNClientRevokedCertificate{}, - VPNClientRootCertificates: []*armnetwork.VPNClientRootCertificate{}, - }, - VPNType: armnetwork.VPNType("RouteBased").ToPtr(), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayGet.json -func ExampleVirtualNetworkGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayDelete.json -func ExampleVirtualNetworkGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayUpdateTags.json -func ExampleVirtualNetworkGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayList.json -func ExampleVirtualNetworkGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewaysListConnections.json -func ExampleVirtualNetworkGatewaysClient_ListConnections() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - pager := client.ListConnections("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayReset.json -func ExampleVirtualNetworkGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginReset(ctx, - "", - "", - &armnetwork.VirtualNetworkGatewaysClientBeginResetOptions{GatewayVip: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientResetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayGenerateVpnClientPackage.json -func ExampleVirtualNetworkGatewaysClient_BeginGeneratevpnclientpackage() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginGeneratevpnclientpackage(ctx, - "", - "", - armnetwork.VPNClientParameters{}, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGeneratevpnclientpackageResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayGetBGPPeerStatus.json -func ExampleVirtualNetworkGatewaysClient_BeginGetBgpPeerStatus() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginGetBgpPeerStatus(ctx, - "", - "", - &armnetwork.VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions{Peer: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGetBgpPeerStatusResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayLearnedRoutes.json -func ExampleVirtualNetworkGatewaysClient_BeginGetLearnedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginGetLearnedRoutes(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGetLearnedRoutesResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayGetAdvertisedRoutes.json -func ExampleVirtualNetworkGatewaysClient_BeginGetAdvertisedRoutes() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginGetAdvertisedRoutes(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGetAdvertisedRoutesResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayStartPacketCaptureFilterData.json -func ExampleVirtualNetworkGatewaysClient_BeginStartPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginStartPacketCapture(ctx, - "", - "", - &armnetwork.VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNPacketCaptureStartParameters{ - FilterData: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientStartPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayStopPacketCapture.json -func ExampleVirtualNetworkGatewaysClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginStopPacketCapture(ctx, - "", - "", - armnetwork.VPNPacketCaptureStopParameters{ - SasURL: to.StringPtr(""), - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientStopPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGatewayGetVpnclientConnectionHealth.json -func ExampleVirtualNetworkGatewaysClient_BeginGetVpnclientConnectionHealth() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkGatewaysClient("", cred, nil) - poller, err := client.BeginGetVpnclientConnectionHealth(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go deleted file mode 100644 index 58ee4fdb8780..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworkpeerings_client_test.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkPeeringDelete.json -func ExampleVirtualNetworkPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkPeeringsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkPeeringGet.json -func ExampleVirtualNetworkPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkPeeringsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkPeeringsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkPeeringCreate.json -func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkPeeringsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VirtualNetworkPeering{ - Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{ - AllowForwardedTraffic: to.BoolPtr(true), - AllowGatewayTransit: to.BoolPtr(false), - AllowVirtualNetworkAccess: to.BoolPtr(true), - RemoteVirtualNetwork: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - UseRemoteGateways: to.BoolPtr(false), - }, - }, - &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: nil}) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkPeeringsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkPeeringList.json -func ExampleVirtualNetworkPeeringsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkPeeringsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go deleted file mode 100644 index f60b5df4fc9b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworks_client_test.go +++ /dev/null @@ -1,206 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkDelete.json -func ExampleVirtualNetworksClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkGet.json -func ExampleVirtualNetworksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.VirtualNetworksClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworksClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkCreate.json -func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualNetwork{ - Location: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkPropertiesFormat{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("10.0.0.0/16")}, - }, - FlowTimeoutInMinutes: to.Int32Ptr(10), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworksClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkUpdateTags.json -func ExampleVirtualNetworksClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworksClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkListAll.json -func ExampleVirtualNetworksClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkList.json -func ExampleVirtualNetworksClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkCheckIPAddressAvailability.json -func ExampleVirtualNetworksClient_CheckIPAddressAvailability() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - res, err := client.CheckIPAddressAvailability(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworksClientCheckIPAddressAvailabilityResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkListUsage.json -func ExampleVirtualNetworksClient_ListUsage() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworksClient("", cred, nil) - pager := client.ListUsage("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go deleted file mode 100644 index 25651d4f0e96..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualnetworktaps_client_test.go +++ /dev/null @@ -1,160 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapDelete.json -func ExampleVirtualNetworkTapsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapGet.json -func ExampleVirtualNetworkTapsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkTapsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapCreate.json -func ExampleVirtualNetworkTapsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualNetworkTap{ - Location: to.StringPtr(""), - Properties: &armnetwork.VirtualNetworkTapPropertiesFormat{ - DestinationNetworkInterfaceIPConfiguration: &armnetwork.InterfaceIPConfiguration{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkTapsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapUpdateTags.json -func ExampleVirtualNetworkTapsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualNetworkTapsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapListAll.json -func ExampleVirtualNetworkTapsClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualNetworkTapList.json -func ExampleVirtualNetworkTapsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualNetworkTapsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go deleted file mode 100644 index 07e570e1b3fc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouterpeerings_client_test.go +++ /dev/null @@ -1,115 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeeringDelete.json -func ExampleVirtualRouterPeeringsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRouterPeeringsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeeringGet.json -func ExampleVirtualRouterPeeringsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRouterPeeringsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualRouterPeeringsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeeringPut.json -func ExampleVirtualRouterPeeringsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRouterPeeringsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VirtualRouterPeering{ - Properties: &armnetwork.VirtualRouterPeeringProperties{ - PeerAsn: to.Int64Ptr(20000), - PeerIP: to.StringPtr(""), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualRouterPeeringsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPeeringList.json -func ExampleVirtualRouterPeeringsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRouterPeeringsClient("", cred, nil) - pager := client.List("", - "", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go deleted file mode 100644 index b1aa688dc40c..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualrouters_client_test.go +++ /dev/null @@ -1,139 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterDelete.json -func ExampleVirtualRoutersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRoutersClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterGet.json -func ExampleVirtualRoutersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRoutersClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - &armnetwork.VirtualRoutersClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualRoutersClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterPut.json -func ExampleVirtualRoutersClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRoutersClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualRouter{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VirtualRouterPropertiesFormat{ - HostedGateway: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualRoutersClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterListByResourceGroup.json -func ExampleVirtualRoutersClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRoutersClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualRouterListBySubscription.json -func ExampleVirtualRoutersClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualRoutersClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go deleted file mode 100644 index 9f1a5d1108ef..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_virtualwans_client_test.go +++ /dev/null @@ -1,162 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANGet.json -func ExampleVirtualWansClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualWansClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANPut.json -func ExampleVirtualWansClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VirtualWAN{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VirtualWanProperties{ - Type: to.StringPtr(""), - DisableVPNEncryption: to.BoolPtr(false), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualWansClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANUpdateTags.json -func ExampleVirtualWansClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VirtualWansClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANDelete.json -func ExampleVirtualWansClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANListByResourceGroup.json -func ExampleVirtualWansClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VirtualWANList.json -func ExampleVirtualWansClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVirtualWansClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go deleted file mode 100644 index c65bb7277376..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnconnections_client_test.go +++ /dev/null @@ -1,164 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnConnectionGet.json -func ExampleVPNConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNConnectionsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnConnectionPut.json -func ExampleVPNConnectionsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNConnectionsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - "", - armnetwork.VPNConnection{ - Properties: &armnetwork.VPNConnectionProperties{ - RemoteVPNSite: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - TrafficSelectorPolicies: []*armnetwork.TrafficSelectorPolicy{}, - VPNLinkConnections: []*armnetwork.VPNSiteLinkConnection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VPNSiteLinkConnectionProperties{ - ConnectionBandwidth: to.Int32Ptr(200), - SharedKey: to.StringPtr(""), - UsePolicyBasedTrafficSelectors: to.BoolPtr(false), - VPNConnectionProtocolType: armnetwork.VirtualNetworkGatewayConnectionProtocol("IKEv2").ToPtr(), - VPNLinkConnectionMode: armnetwork.VPNLinkConnectionMode("Default").ToPtr(), - VPNSiteLink: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNConnectionsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnConnectionDelete.json -func ExampleVPNConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNConnectionsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnConnectionStartPacketCaptureFilterData.json -func ExampleVPNConnectionsClient_BeginStartPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNConnectionsClient("", cred, nil) - poller, err := client.BeginStartPacketCapture(ctx, - "", - "", - "", - &armnetwork.VPNConnectionsClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNConnectionPacketCaptureStartParameters{ - FilterData: to.StringPtr(""), - LinkConnectionNames: []*string{ - to.StringPtr("siteLink1"), - to.StringPtr("siteLink2")}, - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNConnectionsClientStartPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnConnectionStopPacketCapture.json -func ExampleVPNConnectionsClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNConnectionsClient("", cred, nil) - poller, err := client.BeginStopPacketCapture(ctx, - "", - "", - "", - &armnetwork.VPNConnectionsClientBeginStopPacketCaptureOptions{Parameters: &armnetwork.VPNConnectionPacketCaptureStopParameters{ - LinkConnectionNames: []*string{ - to.StringPtr("vpnSiteLink1"), - to.StringPtr("vpnSiteLink2")}, - SasURL: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNConnectionsClientStopPacketCaptureResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go deleted file mode 100644 index 55a93a378ceb..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpngateways_client_test.go +++ /dev/null @@ -1,298 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayGet.json -func ExampleVPNGatewaysClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayPut.json -func ExampleVPNGatewaysClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VPNGateway{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VPNGatewayProperties{ - BgpSettings: &armnetwork.BgpSettings{ - Asn: to.Int64Ptr(65515), - BgpPeeringAddresses: []*armnetwork.IPConfigurationBgpPeeringAddress{ - { - CustomBgpIPAddresses: []*string{ - to.StringPtr("169.254.21.5")}, - IPConfigurationID: to.StringPtr(""), - }, - { - CustomBgpIPAddresses: []*string{ - to.StringPtr("169.254.21.10")}, - IPConfigurationID: to.StringPtr(""), - }}, - PeerWeight: to.Int32Ptr(0), - }, - Connections: []*armnetwork.VPNConnection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VPNConnectionProperties{ - RemoteVPNSite: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - VPNLinkConnections: []*armnetwork.VPNSiteLinkConnection{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VPNSiteLinkConnectionProperties{ - ConnectionBandwidth: to.Int32Ptr(200), - EgressNatRules: []*armnetwork.SubResource{ - { - ID: to.StringPtr(""), - }}, - SharedKey: to.StringPtr(""), - VPNConnectionProtocolType: armnetwork.VirtualNetworkGatewayConnectionProtocol("IKEv2").ToPtr(), - VPNSiteLink: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }}, - }, - }}, - EnableBgpRouteTranslationForNat: to.BoolPtr(false), - IsRoutingPreferenceInternet: to.BoolPtr(false), - NatRules: []*armnetwork.VPNGatewayNatRule{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VPNGatewayNatRuleProperties{ - Type: armnetwork.VPNNatRuleType("Static").ToPtr(), - ExternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - InternalMappings: []*armnetwork.VPNNatRuleMapping{ - { - AddressSpace: to.StringPtr(""), - }}, - IPConfigurationID: to.StringPtr(""), - Mode: armnetwork.VPNNatRuleMode("EgressSnat").ToPtr(), - }, - }}, - VirtualHub: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayUpdateTags.json -func ExampleVPNGatewaysClient_BeginUpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginUpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "tag1": to.StringPtr("value1"), - "tag2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayDelete.json -func ExampleVPNGatewaysClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayReset.json -func ExampleVPNGatewaysClient_BeginReset() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginReset(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientResetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayStartPacketCaptureFilterData.json -func ExampleVPNGatewaysClient_BeginStartPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginStartPacketCapture(ctx, - "", - "", - &armnetwork.VPNGatewaysClientBeginStartPacketCaptureOptions{Parameters: &armnetwork.VPNGatewayPacketCaptureStartParameters{ - FilterData: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientStartPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayStopPacketCapture.json -func ExampleVPNGatewaysClient_BeginStopPacketCapture() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - poller, err := client.BeginStopPacketCapture(ctx, - "", - "", - &armnetwork.VPNGatewaysClientBeginStopPacketCaptureOptions{Parameters: &armnetwork.VPNGatewayPacketCaptureStopParameters{ - SasURL: to.StringPtr(""), - }, - }) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNGatewaysClientStopPacketCaptureResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayListByResourceGroup.json -func ExampleVPNGatewaysClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnGatewayList.json -func ExampleVPNGatewaysClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNGatewaysClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go deleted file mode 100644 index 05e0d09c5367..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnlinkconnections_client_test.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteLinkConnectionReset.json -func ExampleVPNLinkConnectionsClient_BeginResetConnection() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNLinkConnectionsClient("", cred, nil) - poller, err := client.BeginResetConnection(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteLinkConnectionGetIkeSas.json -func ExampleVPNLinkConnectionsClient_BeginGetIkeSas() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNLinkConnectionsClient("", cred, nil) - poller, err := client.BeginGetIkeSas(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNLinkConnectionsClientGetIkeSasResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go deleted file mode 100644 index 2f6d6ad94861..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurations_client_test.go +++ /dev/null @@ -1,199 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationGet.json -func ExampleVPNServerConfigurationsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNServerConfigurationsClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationPut.json -func ExampleVPNServerConfigurationsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VPNServerConfiguration{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VPNServerConfigurationProperties{ - RadiusClientRootCertificates: []*armnetwork.VPNServerConfigRadiusClientRootCertificate{ - { - Name: to.StringPtr(""), - Thumbprint: to.StringPtr(""), - }}, - RadiusServerRootCertificates: []*armnetwork.VPNServerConfigRadiusServerRootCertificate{ - { - Name: to.StringPtr(""), - PublicCertData: to.StringPtr(""), - }}, - RadiusServers: []*armnetwork.RadiusServer{ - { - RadiusServerAddress: to.StringPtr(""), - RadiusServerScore: to.Int64Ptr(25), - RadiusServerSecret: to.StringPtr(""), - }}, - VPNClientIPSecPolicies: []*armnetwork.IPSecPolicy{ - { - DhGroup: armnetwork.DhGroup("DHGroup14").ToPtr(), - IkeEncryption: armnetwork.IkeEncryption("AES256").ToPtr(), - IkeIntegrity: armnetwork.IkeIntegrity("SHA384").ToPtr(), - IPSecEncryption: armnetwork.IPSecEncryption("AES256").ToPtr(), - IPSecIntegrity: armnetwork.IPSecIntegrity("SHA256").ToPtr(), - PfsGroup: armnetwork.PfsGroup("PFS14").ToPtr(), - SaDataSizeKilobytes: to.Int32Ptr(429497), - SaLifeTimeSeconds: to.Int32Ptr(86472), - }}, - VPNClientRevokedCertificates: []*armnetwork.VPNServerConfigVPNClientRevokedCertificate{ - { - Name: to.StringPtr(""), - Thumbprint: to.StringPtr(""), - }}, - VPNClientRootCertificates: []*armnetwork.VPNServerConfigVPNClientRootCertificate{ - { - Name: to.StringPtr(""), - PublicCertData: to.StringPtr(""), - }}, - VPNProtocols: []*armnetwork.VPNGatewayTunnelingProtocol{ - armnetwork.VPNGatewayTunnelingProtocol("IkeV2").ToPtr()}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNServerConfigurationsClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationUpdateTags.json -func ExampleVPNServerConfigurationsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNServerConfigurationsClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationDelete.json -func ExampleVPNServerConfigurationsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationListByResourceGroup.json -func ExampleVPNServerConfigurationsClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnServerConfigurationList.json -func ExampleVPNServerConfigurationsClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go deleted file mode 100644 index 4dd8a26180f6..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnserverconfigurationsassociatedwithvirtualwan_client_test.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/GetVirtualWanVpnServerConfigurations.json -func ExampleVPNServerConfigurationsAssociatedWithVirtualWanClient_BeginList() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNServerConfigurationsAssociatedWithVirtualWanClient("", cred, nil) - poller, err := client.BeginList(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNServerConfigurationsAssociatedWithVirtualWanClientListResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_test.go deleted file mode 100644 index 1dfd7fbd3ef0..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinkconnections_client_test.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteLinkConnectionGet.json -func ExampleVPNSiteLinkConnectionsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSiteLinkConnectionsClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNSiteLinkConnectionsClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_test.go deleted file mode 100644 index 3cf7ded986bc..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitelinks_client_test.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteLinkGet.json -func ExampleVPNSiteLinksClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSiteLinksClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNSiteLinksClientGetResult) -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go deleted file mode 100644 index a5df129756df..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsites_client_test.go +++ /dev/null @@ -1,191 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteGet.json -func ExampleVPNSitesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNSitesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSitePut.json -func ExampleVPNSitesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - poller, err := client.BeginCreateOrUpdate(ctx, - "", - "", - armnetwork.VPNSite{ - Location: to.StringPtr(""), - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - }, - Properties: &armnetwork.VPNSiteProperties{ - AddressSpace: &armnetwork.AddressSpace{ - AddressPrefixes: []*string{ - to.StringPtr("10.0.0.0/16")}, - }, - IsSecuritySite: to.BoolPtr(false), - O365Policy: &armnetwork.O365PolicyProperties{ - BreakOutCategories: &armnetwork.O365BreakOutCategoryPolicies{ - Default: to.BoolPtr(false), - Allow: to.BoolPtr(true), - Optimize: to.BoolPtr(true), - }, - }, - VirtualWan: &armnetwork.SubResource{ - ID: to.StringPtr(""), - }, - VPNSiteLinks: []*armnetwork.VPNSiteLink{ - { - Name: to.StringPtr(""), - Properties: &armnetwork.VPNSiteLinkProperties{ - BgpProperties: &armnetwork.VPNLinkBgpSettings{ - Asn: to.Int64Ptr(1234), - BgpPeeringAddress: to.StringPtr(""), - }, - Fqdn: to.StringPtr(""), - IPAddress: to.StringPtr(""), - LinkProperties: &armnetwork.VPNLinkProviderProperties{ - LinkProviderName: to.StringPtr(""), - LinkSpeedInMbps: to.Int32Ptr(0), - }, - }, - }}, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - res, err := poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNSitesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteUpdateTags.json -func ExampleVPNSitesClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - res, err := client.UpdateTags(ctx, - "", - "", - armnetwork.TagsObject{ - Tags: map[string]*string{ - "key1": to.StringPtr("value1"), - "key2": to.StringPtr("value2"), - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.VPNSitesClientUpdateTagsResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteDelete.json -func ExampleVPNSitesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteListByResourceGroup.json -func ExampleVPNSitesClient_ListByResourceGroup() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - pager := client.ListByResourceGroup("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSiteList.json -func ExampleVPNSitesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesClient("", cred, nil) - pager := client.List(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_test.go deleted file mode 100644 index 85cb14b9a110..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_vpnsitesconfiguration_client_test.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/VpnSitesConfigurationDownload.json -func ExampleVPNSitesConfigurationClient_BeginDownload() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewVPNSitesConfigurationClient("", cred, nil) - poller, err := client.BeginDownload(ctx, - "", - "", - armnetwork.GetVPNSitesConfigurationRequest{ - OutputBlobSasURL: to.StringPtr(""), - VPNSites: []*string{ - to.StringPtr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/vpnSites/abc")}, - }, - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go deleted file mode 100644 index 7f6709a60432..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webapplicationfirewallpolicies_client_test.go +++ /dev/null @@ -1,223 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "time" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/WafListPolicies.json -func ExampleWebApplicationFirewallPoliciesClient_List() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebApplicationFirewallPoliciesClient("", cred, nil) - pager := client.List("", - nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/WafListAllPolicies.json -func ExampleWebApplicationFirewallPoliciesClient_ListAll() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebApplicationFirewallPoliciesClient("", cred, nil) - pager := client.ListAll(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/WafPolicyGet.json -func ExampleWebApplicationFirewallPoliciesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebApplicationFirewallPoliciesClient("", cred, nil) - res, err := client.Get(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WebApplicationFirewallPoliciesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/WafPolicyCreateOrUpdate.json -func ExampleWebApplicationFirewallPoliciesClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebApplicationFirewallPoliciesClient("", cred, nil) - res, err := client.CreateOrUpdate(ctx, - "", - "", - armnetwork.WebApplicationFirewallPolicy{ - Location: to.StringPtr(""), - Properties: &armnetwork.WebApplicationFirewallPolicyPropertiesFormat{ - CustomRules: []*armnetwork.WebApplicationFirewallCustomRule{ - { - Name: to.StringPtr(""), - Action: armnetwork.WebApplicationFirewallAction("Block").ToPtr(), - MatchConditions: []*armnetwork.MatchCondition{ - { - MatchValues: []*string{ - to.StringPtr("192.168.1.0/24"), - to.StringPtr("10.0.0.0/24")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - VariableName: armnetwork.WebApplicationFirewallMatchVariable("RemoteAddr").ToPtr(), - }}, - Operator: armnetwork.WebApplicationFirewallOperator("IPMatch").ToPtr(), - }}, - Priority: to.Int32Ptr(1), - RuleType: armnetwork.WebApplicationFirewallRuleType("MatchRule").ToPtr(), - }, - { - Name: to.StringPtr(""), - Action: armnetwork.WebApplicationFirewallAction("Block").ToPtr(), - MatchConditions: []*armnetwork.MatchCondition{ - { - MatchValues: []*string{ - to.StringPtr("192.168.1.0/24")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - VariableName: armnetwork.WebApplicationFirewallMatchVariable("RemoteAddr").ToPtr(), - }}, - Operator: armnetwork.WebApplicationFirewallOperator("IPMatch").ToPtr(), - }, - { - MatchValues: []*string{ - to.StringPtr("Windows")}, - MatchVariables: []*armnetwork.MatchVariable{ - { - Selector: to.StringPtr(""), - VariableName: armnetwork.WebApplicationFirewallMatchVariable("RequestHeaders").ToPtr(), - }}, - Operator: armnetwork.WebApplicationFirewallOperator("Contains").ToPtr(), - }}, - Priority: to.Int32Ptr(2), - RuleType: armnetwork.WebApplicationFirewallRuleType("MatchRule").ToPtr(), - }}, - ManagedRules: &armnetwork.ManagedRulesDefinition{ - Exclusions: []*armnetwork.OwaspCrsExclusionEntry{ - { - ExclusionManagedRuleSets: []*armnetwork.ExclusionManagedRuleSet{ - { - RuleGroups: []*armnetwork.ExclusionManagedRuleGroup{ - { - RuleGroupName: to.StringPtr(""), - Rules: []*armnetwork.ExclusionManagedRule{ - { - RuleID: to.StringPtr(""), - }}, - }, - { - RuleGroupName: to.StringPtr(""), - }}, - RuleSetType: to.StringPtr(""), - RuleSetVersion: to.StringPtr(""), - }}, - MatchVariable: armnetwork.OwaspCrsExclusionEntryMatchVariable("RequestArgNames").ToPtr(), - Selector: to.StringPtr(""), - SelectorMatchOperator: armnetwork.OwaspCrsExclusionEntrySelectorMatchOperator("StartsWith").ToPtr(), - }, - { - ExclusionManagedRuleSets: []*armnetwork.ExclusionManagedRuleSet{ - { - RuleGroups: []*armnetwork.ExclusionManagedRuleGroup{}, - RuleSetType: to.StringPtr(""), - RuleSetVersion: to.StringPtr(""), - }}, - MatchVariable: armnetwork.OwaspCrsExclusionEntryMatchVariable("RequestArgNames").ToPtr(), - Selector: to.StringPtr(""), - SelectorMatchOperator: armnetwork.OwaspCrsExclusionEntrySelectorMatchOperator("EndsWith").ToPtr(), - }, - { - MatchVariable: armnetwork.OwaspCrsExclusionEntryMatchVariable("RequestArgNames").ToPtr(), - Selector: to.StringPtr(""), - SelectorMatchOperator: armnetwork.OwaspCrsExclusionEntrySelectorMatchOperator("StartsWith").ToPtr(), - }, - { - MatchVariable: armnetwork.OwaspCrsExclusionEntryMatchVariable("RequestArgValues").ToPtr(), - Selector: to.StringPtr(""), - SelectorMatchOperator: armnetwork.OwaspCrsExclusionEntrySelectorMatchOperator("StartsWith").ToPtr(), - }}, - ManagedRuleSets: []*armnetwork.ManagedRuleSet{ - { - RuleSetType: to.StringPtr(""), - RuleSetVersion: to.StringPtr(""), - }}, - }, - }, - }, - nil) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WebApplicationFirewallPoliciesClientCreateOrUpdateResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/WafPolicyDelete.json -func ExampleWebApplicationFirewallPoliciesClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebApplicationFirewallPoliciesClient("", cred, nil) - poller, err := client.BeginDelete(ctx, - "", - "", - nil) - if err != nil { - log.Fatal(err) - } - _, err = poller.PollUntilDone(ctx, 30*time.Second) - if err != nil { - log.Fatal(err) - } -} diff --git a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go b/sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go deleted file mode 100644 index 46c49b2c7fb5..000000000000 --- a/sdk/resourcemanager/network/armnetwork/ze_generated_example_webcategories_client_test.go +++ /dev/null @@ -1,57 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" -) - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureWebCategoryGet.json -func ExampleWebCategoriesClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebCategoriesClient("", cred, nil) - res, err := client.Get(ctx, - "", - &armnetwork.WebCategoriesClientGetOptions{Expand: nil}) - if err != nil { - log.Fatal(err) - } - log.Printf("Response result: %#v\n", res.WebCategoriesClientGetResult) -} - -// x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/examples/AzureWebCategoriesListBySubscription.json -func ExampleWebCategoriesClient_ListBySubscription() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - client := armnetwork.NewWebCategoriesClient("", cred, nil) - pager := client.ListBySubscription(nil) - for { - nextResult := pager.NextPage(ctx) - if err := pager.Err(); err != nil { - log.Fatalf("failed to advance page: %v", err) - } - if !nextResult { - break - } - for _, v := range pager.PageResponse().Value { - log.Printf("Pager result: %#v\n", v) - } - } -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go index d089167f1037..b2bf5d10dc1e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivateendpointconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ApplicationGatewayPrivateEndpointConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ApplicationGatewayPrivateEndpointConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateEndpointConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ApplicationGatewayPrivateEndpointConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginDelete - Deletes the specified private endpoint connection on application gateway. @@ -57,22 +62,18 @@ func NewApplicationGatewayPrivateEndpointConnectionsClient(subscriptionID string // connectionName - The name of the application gateway private endpoint connection. // options - ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the // ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, connectionName, options) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse{}, err - } - result := ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ApplicationGatewayPrivateEndpointConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller{ - pt: pt, +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions) (*armruntime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified private endpoint connection on application gateway. @@ -176,7 +177,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getCreateReque // getHandleResponse handles the Get response. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientGetResponse, error) { - result := ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{RawResponse: resp} + result := ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnection); err != nil { return ApplicationGatewayPrivateEndpointConnectionsClientGetResponse{}, err } @@ -189,16 +190,32 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) getHandleRespo // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewayPrivateEndpointConnectionsClientListOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.List // method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) List(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) *ApplicationGatewayPrivateEndpointConnectionsClientListPager { - return &ApplicationGatewayPrivateEndpointConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) List(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateEndpointConnectionsClientListOptions) *runtime.Pager[ApplicationGatewayPrivateEndpointConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationGatewayPrivateEndpointConnectionsClientListResponse]{ + More: func(page ApplicationGatewayPrivateEndpointConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationGatewayPrivateEndpointConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -229,7 +246,7 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listCreateRequ // listHandleResponse handles the List response. func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateEndpointConnectionsClientListResponse, error) { - result := ApplicationGatewayPrivateEndpointConnectionsClientListResponse{RawResponse: resp} + result := ApplicationGatewayPrivateEndpointConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateEndpointConnectionListResult); err != nil { return ApplicationGatewayPrivateEndpointConnectionsClientListResponse{}, err } @@ -244,22 +261,18 @@ func (client *ApplicationGatewayPrivateEndpointConnectionsClient) listHandleResp // parameters - Parameters supplied to update application gateway private endpoint connection operation. // options - ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the // ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate method. -func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse, error) { - resp, err := client.update(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse{}, err - } - result := ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse{ - RawResponse: resp, +func (client *ApplicationGatewayPrivateEndpointConnectionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, connectionName string, parameters ApplicationGatewayPrivateEndpointConnection, options *ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions) (*armruntime.Poller[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.update(ctx, resourceGroupName, applicationGatewayName, connectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ApplicationGatewayPrivateEndpointConnectionsClient.Update", "azure-async-operation", resp, client.pl) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse{}, err - } - result.Poller = &ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller{ - pt: pt, - } - return result, nil } // Update - Updates the specified private endpoint connection on application gateway. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go index 423aa4276343..24f44772643f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgatewayprivatelinkresources_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ApplicationGatewayPrivateLinkResourcesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ApplicationGatewayPrivateLinkResourcesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewayPrivateLinkResourcesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ApplicationGatewayPrivateLinkResourcesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Lists all private link resources on an application gateway. @@ -56,16 +61,32 @@ func NewApplicationGatewayPrivateLinkResourcesClient(subscriptionID string, cred // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List // method. -func (client *ApplicationGatewayPrivateLinkResourcesClient) List(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) *ApplicationGatewayPrivateLinkResourcesClientListPager { - return &ApplicationGatewayPrivateLinkResourcesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) +func (client *ApplicationGatewayPrivateLinkResourcesClient) List(resourceGroupName string, applicationGatewayName string, options *ApplicationGatewayPrivateLinkResourcesClientListOptions) *runtime.Pager[ApplicationGatewayPrivateLinkResourcesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationGatewayPrivateLinkResourcesClientListResponse]{ + More: func(page ApplicationGatewayPrivateLinkResourcesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationGatewayPrivateLinkResourcesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationGatewayPrivateLinkResourceListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationGatewayPrivateLinkResourcesClientListResponse) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, applicationGatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -96,7 +117,7 @@ func (client *ApplicationGatewayPrivateLinkResourcesClient) listCreateRequest(ct // listHandleResponse handles the List response. func (client *ApplicationGatewayPrivateLinkResourcesClient) listHandleResponse(resp *http.Response) (ApplicationGatewayPrivateLinkResourcesClientListResponse, error) { - result := ApplicationGatewayPrivateLinkResourcesClientListResponse{RawResponse: resp} + result := ApplicationGatewayPrivateLinkResourcesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayPrivateLinkResourceListResult); err != nil { return ApplicationGatewayPrivateLinkResourcesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go index dbdc67fd4089..e63aaf3d53a3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationgateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ApplicationGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ApplicationGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewApplicationGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ApplicationGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginBackendHealth - Gets the backend health of the specified application gateway in a resource group. @@ -56,22 +61,18 @@ func NewApplicationGatewaysClient(subscriptionID string, credential azcore.Token // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewaysClientBeginBackendHealthOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealth // method. -func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (ApplicationGatewaysClientBackendHealthPollerResponse, error) { - resp, err := client.backendHealth(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return ApplicationGatewaysClientBackendHealthPollerResponse{}, err - } - result := ApplicationGatewaysClientBackendHealthPollerResponse{ - RawResponse: resp, +func (client *ApplicationGatewaysClient) BeginBackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginBackendHealthOptions) (*armruntime.Poller[ApplicationGatewaysClientBackendHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backendHealth(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientBackendHealthResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.BackendHealth", "location", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientBackendHealthPollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientBackendHealthPoller{ - pt: pt, - } - return result, nil } // BackendHealth - Gets the backend health of the specified application gateway in a resource group. @@ -128,22 +129,18 @@ func (client *ApplicationGatewaysClient) backendHealthCreateRequest(ctx context. // probeRequest - Request body for on-demand test probe operation. // options - ApplicationGatewaysClientBeginBackendHealthOnDemandOptions contains the optional parameters for the ApplicationGatewaysClient.BeginBackendHealthOnDemand // method. -func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (ApplicationGatewaysClientBackendHealthOnDemandPollerResponse, error) { - resp, err := client.backendHealthOnDemand(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) - if err != nil { - return ApplicationGatewaysClientBackendHealthOnDemandPollerResponse{}, err - } - result := ApplicationGatewaysClientBackendHealthOnDemandPollerResponse{ - RawResponse: resp, +func (client *ApplicationGatewaysClient) BeginBackendHealthOnDemand(ctx context.Context, resourceGroupName string, applicationGatewayName string, probeRequest ApplicationGatewayOnDemandProbe, options *ApplicationGatewaysClientBeginBackendHealthOnDemandOptions) (*armruntime.Poller[ApplicationGatewaysClientBackendHealthOnDemandResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.backendHealthOnDemand(ctx, resourceGroupName, applicationGatewayName, probeRequest, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientBackendHealthOnDemandResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientBackendHealthOnDemandResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.BackendHealthOnDemand", "location", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientBackendHealthOnDemandPollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientBackendHealthOnDemandPoller{ - pt: pt, - } - return result, nil } // BackendHealthOnDemand - Gets the backend health for given combination of backend pool and http setting of the specified @@ -200,22 +197,18 @@ func (client *ApplicationGatewaysClient) backendHealthOnDemandCreateRequest(ctx // parameters - Parameters supplied to the create or update application gateway operation. // options - ApplicationGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationGatewaysClient.BeginCreateOrUpdate // method. -func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (ApplicationGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationGatewayName, parameters, options) - if err != nil { - return ApplicationGatewaysClientCreateOrUpdatePollerResponse{}, err +func (client *ApplicationGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, options *ApplicationGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ApplicationGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result := ApplicationGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified application gateway. @@ -267,22 +260,18 @@ func (client *ApplicationGatewaysClient) createOrUpdateCreateRequest(ctx context // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete // method. -func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (ApplicationGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return ApplicationGatewaysClientDeletePollerResponse{}, err - } - result := ApplicationGatewaysClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientDeletePoller{ - pt: pt, +func (client *ApplicationGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginDeleteOptions) (*armruntime.Poller[ApplicationGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified application gateway. @@ -376,7 +365,7 @@ func (client *ApplicationGatewaysClient) getCreateRequest(ctx context.Context, r // getHandleResponse handles the Get response. func (client *ApplicationGatewaysClient) getHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetResponse, error) { - result := ApplicationGatewaysClientGetResponse{RawResponse: resp} + result := ApplicationGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { return ApplicationGatewaysClientGetResponse{}, err } @@ -427,7 +416,7 @@ func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyCreateRequest(ctx // getSSLPredefinedPolicyHandleResponse handles the GetSSLPredefinedPolicy response. func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(resp *http.Response) (ApplicationGatewaysClientGetSSLPredefinedPolicyResponse, error) { - result := ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{RawResponse: resp} + result := ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewaySSLPredefinedPolicy); err != nil { return ApplicationGatewaysClientGetSSLPredefinedPolicyResponse{}, err } @@ -439,16 +428,32 @@ func (client *ApplicationGatewaysClient) getSSLPredefinedPolicyHandleResponse(re // resourceGroupName - The name of the resource group. // options - ApplicationGatewaysClientListOptions contains the optional parameters for the ApplicationGatewaysClient.List // method. -func (client *ApplicationGatewaysClient) List(resourceGroupName string, options *ApplicationGatewaysClientListOptions) *ApplicationGatewaysClientListPager { - return &ApplicationGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *ApplicationGatewaysClient) List(resourceGroupName string, options *ApplicationGatewaysClientListOptions) *runtime.Pager[ApplicationGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationGatewaysClientListResponse]{ + More: func(page ApplicationGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListResponse) (ApplicationGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -475,7 +480,7 @@ func (client *ApplicationGatewaysClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) (ApplicationGatewaysClientListResponse, error) { - result := ApplicationGatewaysClientListResponse{RawResponse: resp} + result := ApplicationGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { return ApplicationGatewaysClientListResponse{}, err } @@ -486,16 +491,32 @@ func (client *ApplicationGatewaysClient) listHandleResponse(resp *http.Response) // If the operation fails it returns an *azcore.ResponseError type. // options - ApplicationGatewaysClientListAllOptions contains the optional parameters for the ApplicationGatewaysClient.ListAll // method. -func (client *ApplicationGatewaysClient) ListAll(options *ApplicationGatewaysClientListAllOptions) *ApplicationGatewaysClientListAllPager { - return &ApplicationGatewaysClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *ApplicationGatewaysClient) ListAll(options *ApplicationGatewaysClientListAllOptions) *runtime.Pager[ApplicationGatewaysClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationGatewaysClientListAllResponse]{ + More: func(page ApplicationGatewaysClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationGatewaysClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAllResponse) (ApplicationGatewaysClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationGatewaysClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationGatewaysClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -518,7 +539,7 @@ func (client *ApplicationGatewaysClient) listAllCreateRequest(ctx context.Contex // listAllHandleResponse handles the ListAll response. func (client *ApplicationGatewaysClient) listAllHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAllResponse, error) { - result := ApplicationGatewaysClientListAllResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayListResult); err != nil { return ApplicationGatewaysClientListAllResponse{}, err } @@ -564,7 +585,7 @@ func (client *ApplicationGatewaysClient) listAvailableRequestHeadersCreateReques // listAvailableRequestHeadersHandleResponse handles the ListAvailableRequestHeaders response. func (client *ApplicationGatewaysClient) listAvailableRequestHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableRequestHeadersResponse, error) { - result := ApplicationGatewaysClientListAvailableRequestHeadersResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableRequestHeadersResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { return ApplicationGatewaysClientListAvailableRequestHeadersResponse{}, err } @@ -610,7 +631,7 @@ func (client *ApplicationGatewaysClient) listAvailableResponseHeadersCreateReque // listAvailableResponseHeadersHandleResponse handles the ListAvailableResponseHeaders response. func (client *ApplicationGatewaysClient) listAvailableResponseHeadersHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableResponseHeadersResponse, error) { - result := ApplicationGatewaysClientListAvailableResponseHeadersResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableResponseHeadersResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { return ApplicationGatewaysClientListAvailableResponseHeadersResponse{}, err } @@ -656,7 +677,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLOptionsCreateRequest(ct // listAvailableSSLOptionsHandleResponse handles the ListAvailableSSLOptions response. func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLOptionsResponse, error) { - result := ApplicationGatewaysClientListAvailableSSLOptionsResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableSSLOptionsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLOptions); err != nil { return ApplicationGatewaysClientListAvailableSSLOptionsResponse{}, err } @@ -667,16 +688,32 @@ func (client *ApplicationGatewaysClient) listAvailableSSLOptionsHandleResponse(r // If the operation fails it returns an *azcore.ResponseError type. // options - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions contains the optional parameters for the ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies // method. -func (client *ApplicationGatewaysClient) ListAvailableSSLPredefinedPolicies(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager { - return &ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) +func (client *ApplicationGatewaysClient) ListAvailableSSLPredefinedPolicies(options *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesOptions) *runtime.Pager[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse]{ + More: func(page ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationGatewayAvailableSSLPredefinedPolicies.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAvailableSSLPredefinedPoliciesCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, runtime.NewResponseError(resp) + } + return client.listAvailableSSLPredefinedPoliciesHandleResponse(resp) }, - } + }) } // listAvailableSSLPredefinedPoliciesCreateRequest creates the ListAvailableSSLPredefinedPolicies request. @@ -699,7 +736,7 @@ func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesCreat // listAvailableSSLPredefinedPoliciesHandleResponse handles the ListAvailableSSLPredefinedPolicies response. func (client *ApplicationGatewaysClient) listAvailableSSLPredefinedPoliciesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse, error) { - result := ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableSSLPredefinedPolicies); err != nil { return ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse{}, err } @@ -745,7 +782,7 @@ func (client *ApplicationGatewaysClient) listAvailableServerVariablesCreateReque // listAvailableServerVariablesHandleResponse handles the ListAvailableServerVariables response. func (client *ApplicationGatewaysClient) listAvailableServerVariablesHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableServerVariablesResponse, error) { - result := ApplicationGatewaysClientListAvailableServerVariablesResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableServerVariablesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.StringArray); err != nil { return ApplicationGatewaysClientListAvailableServerVariablesResponse{}, err } @@ -791,7 +828,7 @@ func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsCreateRequest(c // listAvailableWafRuleSetsHandleResponse handles the ListAvailableWafRuleSets response. func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse(resp *http.Response) (ApplicationGatewaysClientListAvailableWafRuleSetsResponse, error) { - result := ApplicationGatewaysClientListAvailableWafRuleSetsResponse{RawResponse: resp} + result := ApplicationGatewaysClientListAvailableWafRuleSetsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGatewayAvailableWafRuleSetsResult); err != nil { return ApplicationGatewaysClientListAvailableWafRuleSetsResponse{}, err } @@ -804,22 +841,18 @@ func (client *ApplicationGatewaysClient) listAvailableWafRuleSetsHandleResponse( // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart // method. -func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (ApplicationGatewaysClientStartPollerResponse, error) { - resp, err := client.start(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return ApplicationGatewaysClientStartPollerResponse{}, err - } - result := ApplicationGatewaysClientStartPollerResponse{ - RawResponse: resp, +func (client *ApplicationGatewaysClient) BeginStart(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStartOptions) (*armruntime.Poller[ApplicationGatewaysClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientStartResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientStartResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.Start", "location", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientStartPollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientStartPoller{ - pt: pt, - } - return result, nil } // Start - Starts the specified application gateway. @@ -871,22 +904,18 @@ func (client *ApplicationGatewaysClient) startCreateRequest(ctx context.Context, // applicationGatewayName - The name of the application gateway. // options - ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop // method. -func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (ApplicationGatewaysClientStopPollerResponse, error) { - resp, err := client.stop(ctx, resourceGroupName, applicationGatewayName, options) - if err != nil { - return ApplicationGatewaysClientStopPollerResponse{}, err +func (client *ApplicationGatewaysClient) BeginStop(ctx context.Context, resourceGroupName string, applicationGatewayName string, options *ApplicationGatewaysClientBeginStopOptions) (*armruntime.Poller[ApplicationGatewaysClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, applicationGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationGatewaysClientStopResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationGatewaysClientStopResponse](options.ResumeToken, client.pl, nil) } - result := ApplicationGatewaysClientStopPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ApplicationGatewaysClient.Stop", "location", resp, client.pl) - if err != nil { - return ApplicationGatewaysClientStopPollerResponse{}, err - } - result.Poller = &ApplicationGatewaysClientStopPoller{ - pt: pt, - } - return result, nil } // Stop - Stops the specified application gateway in a resource group. @@ -982,7 +1011,7 @@ func (client *ApplicationGatewaysClient) updateTagsCreateRequest(ctx context.Con // updateTagsHandleResponse handles the UpdateTags response. func (client *ApplicationGatewaysClient) updateTagsHandleResponse(resp *http.Response) (ApplicationGatewaysClientUpdateTagsResponse, error) { - result := ApplicationGatewaysClientUpdateTagsResponse{RawResponse: resp} + result := ApplicationGatewaysClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationGateway); err != nil { return ApplicationGatewaysClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go index 06b7f1c3319c..e65d346b1f91 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_applicationsecuritygroups_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ApplicationSecurityGroupsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ApplicationSecurityGroupsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ApplicationSecurityGroupsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ApplicationSecurityGroupsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an application security group. @@ -57,22 +62,18 @@ func NewApplicationSecurityGroupsClient(subscriptionID string, credential azcore // parameters - Parameters supplied to the create or update ApplicationSecurityGroup operation. // options - ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate // method. -func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) - if err != nil { - return ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse{}, err - } - result := ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ApplicationSecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, options *ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ApplicationSecurityGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, applicationSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationSecurityGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ApplicationSecurityGroupsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ApplicationSecurityGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an application security group. @@ -124,22 +125,18 @@ func (client *ApplicationSecurityGroupsClient) createOrUpdateCreateRequest(ctx c // applicationSecurityGroupName - The name of the application security group. // options - ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete // method. -func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (ApplicationSecurityGroupsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, applicationSecurityGroupName, options) - if err != nil { - return ApplicationSecurityGroupsClientDeletePollerResponse{}, err - } - result := ApplicationSecurityGroupsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ApplicationSecurityGroupsClient.Delete", "location", resp, client.pl) - if err != nil { - return ApplicationSecurityGroupsClientDeletePollerResponse{}, err +func (client *ApplicationSecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, options *ApplicationSecurityGroupsClientBeginDeleteOptions) (*armruntime.Poller[ApplicationSecurityGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, applicationSecurityGroupName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ApplicationSecurityGroupsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ApplicationSecurityGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &ApplicationSecurityGroupsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified application security group. @@ -234,7 +231,7 @@ func (client *ApplicationSecurityGroupsClient) getCreateRequest(ctx context.Cont // getHandleResponse handles the Get response. func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientGetResponse, error) { - result := ApplicationSecurityGroupsClientGetResponse{RawResponse: resp} + result := ApplicationSecurityGroupsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { return ApplicationSecurityGroupsClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *ApplicationSecurityGroupsClient) getHandleResponse(resp *http.Resp // resourceGroupName - The name of the resource group. // options - ApplicationSecurityGroupsClientListOptions contains the optional parameters for the ApplicationSecurityGroupsClient.List // method. -func (client *ApplicationSecurityGroupsClient) List(resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) *ApplicationSecurityGroupsClientListPager { - return &ApplicationSecurityGroupsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *ApplicationSecurityGroupsClient) List(resourceGroupName string, options *ApplicationSecurityGroupsClientListOptions) *runtime.Pager[ApplicationSecurityGroupsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationSecurityGroupsClientListResponse]{ + More: func(page ApplicationSecurityGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationSecurityGroupsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationSecurityGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListResponse) (ApplicationSecurityGroupsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationSecurityGroupsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationSecurityGroupsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationSecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -282,7 +295,7 @@ func (client *ApplicationSecurityGroupsClient) listCreateRequest(ctx context.Con // listHandleResponse handles the List response. func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListResponse, error) { - result := ApplicationSecurityGroupsClientListResponse{RawResponse: resp} + result := ApplicationSecurityGroupsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { return ApplicationSecurityGroupsClientListResponse{}, err } @@ -293,16 +306,32 @@ func (client *ApplicationSecurityGroupsClient) listHandleResponse(resp *http.Res // If the operation fails it returns an *azcore.ResponseError type. // options - ApplicationSecurityGroupsClientListAllOptions contains the optional parameters for the ApplicationSecurityGroupsClient.ListAll // method. -func (client *ApplicationSecurityGroupsClient) ListAll(options *ApplicationSecurityGroupsClientListAllOptions) *ApplicationSecurityGroupsClientListAllPager { - return &ApplicationSecurityGroupsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *ApplicationSecurityGroupsClient) ListAll(options *ApplicationSecurityGroupsClientListAllOptions) *runtime.Pager[ApplicationSecurityGroupsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[ApplicationSecurityGroupsClientListAllResponse]{ + More: func(page ApplicationSecurityGroupsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ApplicationSecurityGroupsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ApplicationSecurityGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *ApplicationSecurityGroupsClientListAllResponse) (ApplicationSecurityGroupsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ApplicationSecurityGroupsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ApplicationSecurityGroupsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ApplicationSecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -325,7 +354,7 @@ func (client *ApplicationSecurityGroupsClient) listAllCreateRequest(ctx context. // listAllHandleResponse handles the ListAll response. func (client *ApplicationSecurityGroupsClient) listAllHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientListAllResponse, error) { - result := ApplicationSecurityGroupsClientListAllResponse{RawResponse: resp} + result := ApplicationSecurityGroupsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroupListResult); err != nil { return ApplicationSecurityGroupsClientListAllResponse{}, err } @@ -382,7 +411,7 @@ func (client *ApplicationSecurityGroupsClient) updateTagsCreateRequest(ctx conte // updateTagsHandleResponse handles the UpdateTags response. func (client *ApplicationSecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (ApplicationSecurityGroupsClientUpdateTagsResponse, error) { - result := ApplicationSecurityGroupsClientUpdateTagsResponse{RawResponse: resp} + result := ApplicationSecurityGroupsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ApplicationSecurityGroup); err != nil { return ApplicationSecurityGroupsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go index fb3295dfac32..7166e2798da4 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availabledelegations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AvailableDelegationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailableDelegationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAvailableDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableDelegationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AvailableDelegationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets all of the available subnet delegations for this subscription in this region. @@ -55,16 +60,32 @@ func NewAvailableDelegationsClient(subscriptionID string, credential azcore.Toke // location - The location of the subnet. // options - AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List // method. -func (client *AvailableDelegationsClient) List(location string, options *AvailableDelegationsClientListOptions) *AvailableDelegationsClientListPager { - return &AvailableDelegationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *AvailableDelegationsClient) List(location string, options *AvailableDelegationsClientListOptions) *runtime.Pager[AvailableDelegationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailableDelegationsClientListResponse]{ + More: func(page AvailableDelegationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailableDelegationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailableDelegationsResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailableDelegationsClientListResponse) (AvailableDelegationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailableDelegationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailableDelegationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailableDelegationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -91,7 +112,7 @@ func (client *AvailableDelegationsClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *AvailableDelegationsClient) listHandleResponse(resp *http.Response) (AvailableDelegationsClientListResponse, error) { - result := AvailableDelegationsClientListResponse{RawResponse: resp} + result := AvailableDelegationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { return AvailableDelegationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go index 4b045b6a9836..661c39a8c874 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableendpointservices_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AvailableEndpointServicesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailableEndpointServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableEndpointServicesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AvailableEndpointServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - List what values of endpoint services are available for use. @@ -55,16 +60,32 @@ func NewAvailableEndpointServicesClient(subscriptionID string, credential azcore // location - The location to check available endpoint services. // options - AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List // method. -func (client *AvailableEndpointServicesClient) List(location string, options *AvailableEndpointServicesClientListOptions) *AvailableEndpointServicesClientListPager { - return &AvailableEndpointServicesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *AvailableEndpointServicesClient) List(location string, options *AvailableEndpointServicesClientListOptions) *runtime.Pager[AvailableEndpointServicesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailableEndpointServicesClientListResponse]{ + More: func(page AvailableEndpointServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailableEndpointServicesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.EndpointServicesListResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailableEndpointServicesClientListResponse) (AvailableEndpointServicesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailableEndpointServicesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailableEndpointServicesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailableEndpointServicesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -91,7 +112,7 @@ func (client *AvailableEndpointServicesClient) listCreateRequest(ctx context.Con // listHandleResponse handles the List response. func (client *AvailableEndpointServicesClient) listHandleResponse(resp *http.Response) (AvailableEndpointServicesClientListResponse, error) { - result := AvailableEndpointServicesClientListResponse{RawResponse: resp} + result := AvailableEndpointServicesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.EndpointServicesListResult); err != nil { return AvailableEndpointServicesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go index 2be7b3c48933..352f838f9bb5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableprivateendpointtypes_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AvailablePrivateEndpointTypesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailablePrivateEndpointTypesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailablePrivateEndpointTypesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AvailablePrivateEndpointTypesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. @@ -55,16 +60,32 @@ func NewAvailablePrivateEndpointTypesClient(subscriptionID string, credential az // location - The location of the domain name. // options - AvailablePrivateEndpointTypesClientListOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.List // method. -func (client *AvailablePrivateEndpointTypesClient) List(location string, options *AvailablePrivateEndpointTypesClientListOptions) *AvailablePrivateEndpointTypesClientListPager { - return &AvailablePrivateEndpointTypesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *AvailablePrivateEndpointTypesClient) List(location string, options *AvailablePrivateEndpointTypesClientListOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailablePrivateEndpointTypesClientListResponse]{ + More: func(page AvailablePrivateEndpointTypesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailablePrivateEndpointTypesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailablePrivateEndpointTypesResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListResponse) (AvailablePrivateEndpointTypesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailablePrivateEndpointTypesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailablePrivateEndpointTypesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailablePrivateEndpointTypesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -91,7 +112,7 @@ func (client *AvailablePrivateEndpointTypesClient) listCreateRequest(ctx context // listHandleResponse handles the List response. func (client *AvailablePrivateEndpointTypesClient) listHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListResponse, error) { - result := AvailablePrivateEndpointTypesClientListResponse{RawResponse: resp} + result := AvailablePrivateEndpointTypesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { return AvailablePrivateEndpointTypesClientListResponse{}, err } @@ -105,16 +126,32 @@ func (client *AvailablePrivateEndpointTypesClient) listHandleResponse(resp *http // resourceGroupName - The name of the resource group. // options - AvailablePrivateEndpointTypesClientListByResourceGroupOptions contains the optional parameters for the AvailablePrivateEndpointTypesClient.ListByResourceGroup // method. -func (client *AvailablePrivateEndpointTypesClient) ListByResourceGroup(location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) *AvailablePrivateEndpointTypesClientListByResourceGroupPager { - return &AvailablePrivateEndpointTypesClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) +func (client *AvailablePrivateEndpointTypesClient) ListByResourceGroup(location string, resourceGroupName string, options *AvailablePrivateEndpointTypesClientListByResourceGroupOptions) *runtime.Pager[AvailablePrivateEndpointTypesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailablePrivateEndpointTypesClientListByResourceGroupResponse]{ + More: func(page AvailablePrivateEndpointTypesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailablePrivateEndpointTypesResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -145,7 +182,7 @@ func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupCreateRequ // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *AvailablePrivateEndpointTypesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailablePrivateEndpointTypesClientListByResourceGroupResponse, error) { - result := AvailablePrivateEndpointTypesClientListByResourceGroupResponse{RawResponse: resp} + result := AvailablePrivateEndpointTypesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailablePrivateEndpointTypesResult); err != nil { return AvailablePrivateEndpointTypesClientListByResourceGroupResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go index aaaf46c8c958..d774d2bb7029 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableresourcegroupdelegations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AvailableResourceGroupDelegationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailableResourceGroupDelegationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableResourceGroupDelegationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AvailableResourceGroupDelegationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets all of the available subnet delegations for this resource group in this region. @@ -56,16 +61,32 @@ func NewAvailableResourceGroupDelegationsClient(subscriptionID string, credentia // resourceGroupName - The name of the resource group. // options - AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List // method. -func (client *AvailableResourceGroupDelegationsClient) List(location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) *AvailableResourceGroupDelegationsClientListPager { - return &AvailableResourceGroupDelegationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, resourceGroupName, options) +func (client *AvailableResourceGroupDelegationsClient) List(location string, resourceGroupName string, options *AvailableResourceGroupDelegationsClientListOptions) *runtime.Pager[AvailableResourceGroupDelegationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailableResourceGroupDelegationsClientListResponse]{ + More: func(page AvailableResourceGroupDelegationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailableResourceGroupDelegationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailableDelegationsResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailableResourceGroupDelegationsClientListResponse) (AvailableResourceGroupDelegationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailableResourceGroupDelegationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailableResourceGroupDelegationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailableResourceGroupDelegationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -96,7 +117,7 @@ func (client *AvailableResourceGroupDelegationsClient) listCreateRequest(ctx con // listHandleResponse handles the List response. func (client *AvailableResourceGroupDelegationsClient) listHandleResponse(resp *http.Response) (AvailableResourceGroupDelegationsClientListResponse, error) { - result := AvailableResourceGroupDelegationsClientListResponse{RawResponse: resp} + result := AvailableResourceGroupDelegationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailableDelegationsResult); err != nil { return AvailableResourceGroupDelegationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go index bef066c4ad8a..b8233af33236 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_availableservicealiases_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AvailableServiceAliasesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AvailableServiceAliasesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailableServiceAliasesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AvailableServiceAliasesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets all available service aliases for this subscription in this region. @@ -55,16 +60,32 @@ func NewAvailableServiceAliasesClient(subscriptionID string, credential azcore.T // location - The location. // options - AvailableServiceAliasesClientListOptions contains the optional parameters for the AvailableServiceAliasesClient.List // method. -func (client *AvailableServiceAliasesClient) List(location string, options *AvailableServiceAliasesClientListOptions) *AvailableServiceAliasesClientListPager { - return &AvailableServiceAliasesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *AvailableServiceAliasesClient) List(location string, options *AvailableServiceAliasesClientListOptions) *runtime.Pager[AvailableServiceAliasesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailableServiceAliasesClientListResponse]{ + More: func(page AvailableServiceAliasesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailableServiceAliasesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailableServiceAliasesResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListResponse) (AvailableServiceAliasesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailableServiceAliasesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailableServiceAliasesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailableServiceAliasesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -91,7 +112,7 @@ func (client *AvailableServiceAliasesClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListResponse, error) { - result := AvailableServiceAliasesClientListResponse{RawResponse: resp} + result := AvailableServiceAliasesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { return AvailableServiceAliasesClientListResponse{}, err } @@ -104,16 +125,32 @@ func (client *AvailableServiceAliasesClient) listHandleResponse(resp *http.Respo // location - The location. // options - AvailableServiceAliasesClientListByResourceGroupOptions contains the optional parameters for the AvailableServiceAliasesClient.ListByResourceGroup // method. -func (client *AvailableServiceAliasesClient) ListByResourceGroup(resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) *AvailableServiceAliasesClientListByResourceGroupPager { - return &AvailableServiceAliasesClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) +func (client *AvailableServiceAliasesClient) ListByResourceGroup(resourceGroupName string, location string, options *AvailableServiceAliasesClientListByResourceGroupOptions) *runtime.Pager[AvailableServiceAliasesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[AvailableServiceAliasesClientListByResourceGroupResponse]{ + More: func(page AvailableServiceAliasesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AvailableServiceAliasesClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AvailableServiceAliasesResult.NextLink) + Fetcher: func(ctx context.Context, page *AvailableServiceAliasesClientListByResourceGroupResponse) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AvailableServiceAliasesClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AvailableServiceAliasesClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AvailableServiceAliasesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -144,7 +181,7 @@ func (client *AvailableServiceAliasesClient) listByResourceGroupCreateRequest(ct // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *AvailableServiceAliasesClient) listByResourceGroupHandleResponse(resp *http.Response) (AvailableServiceAliasesClientListByResourceGroupResponse, error) { - result := AvailableServiceAliasesClientListByResourceGroupResponse{RawResponse: resp} + result := AvailableServiceAliasesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AvailableServiceAliasesResult); err != nil { return AvailableServiceAliasesClientListByResourceGroupResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go index bd88f4a5cbd7..6251c5f6c12d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewallfqdntags_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,36 +35,56 @@ type AzureFirewallFqdnTagsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AzureFirewallFqdnTagsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAzureFirewallFqdnTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallFqdnTagsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AzureFirewallFqdnTagsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // ListAll - Gets all the Azure Firewall FQDN Tags in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - AzureFirewallFqdnTagsClientListAllOptions contains the optional parameters for the AzureFirewallFqdnTagsClient.ListAll // method. -func (client *AzureFirewallFqdnTagsClient) ListAll(options *AzureFirewallFqdnTagsClientListAllOptions) *AzureFirewallFqdnTagsClientListAllPager { - return &AzureFirewallFqdnTagsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *AzureFirewallFqdnTagsClient) ListAll(options *AzureFirewallFqdnTagsClientListAllOptions) *runtime.Pager[AzureFirewallFqdnTagsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[AzureFirewallFqdnTagsClientListAllResponse]{ + More: func(page AzureFirewallFqdnTagsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AzureFirewallFqdnTagsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AzureFirewallFqdnTagListResult.NextLink) + Fetcher: func(ctx context.Context, page *AzureFirewallFqdnTagsClientListAllResponse) (AzureFirewallFqdnTagsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AzureFirewallFqdnTagsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AzureFirewallFqdnTagsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AzureFirewallFqdnTagsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -86,7 +107,7 @@ func (client *AzureFirewallFqdnTagsClient) listAllCreateRequest(ctx context.Cont // listAllHandleResponse handles the ListAll response. func (client *AzureFirewallFqdnTagsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallFqdnTagsClientListAllResponse, error) { - result := AzureFirewallFqdnTagsClientListAllResponse{RawResponse: resp} + result := AzureFirewallFqdnTagsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallFqdnTagListResult); err != nil { return AzureFirewallFqdnTagsClientListAllResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go index 508a95988ae1..18e13700fadf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_azurefirewalls_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type AzureFirewallsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *AzureFirewallsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AzureFirewallsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &AzureFirewallsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Azure Firewall. @@ -57,22 +62,18 @@ func NewAzureFirewallsClient(subscriptionID string, credential azcore.TokenCrede // parameters - Parameters supplied to the create or update Azure Firewall operation. // options - AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate // method. -func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (AzureFirewallsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return AzureFirewallsClientCreateOrUpdatePollerResponse{}, err - } - result := AzureFirewallsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("AzureFirewallsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return AzureFirewallsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &AzureFirewallsClientCreateOrUpdatePoller{ - pt: pt, +func (client *AzureFirewallsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall, options *AzureFirewallsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[AzureFirewallsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[AzureFirewallsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[AzureFirewallsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified Azure Firewall. @@ -124,22 +125,18 @@ func (client *AzureFirewallsClient) createOrUpdateCreateRequest(ctx context.Cont // azureFirewallName - The name of the Azure Firewall. // options - AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete // method. -func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (AzureFirewallsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, azureFirewallName, options) - if err != nil { - return AzureFirewallsClientDeletePollerResponse{}, err - } - result := AzureFirewallsClientDeletePollerResponse{ - RawResponse: resp, +func (client *AzureFirewallsClient) BeginDelete(ctx context.Context, resourceGroupName string, azureFirewallName string, options *AzureFirewallsClientBeginDeleteOptions) (*armruntime.Poller[AzureFirewallsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, azureFirewallName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[AzureFirewallsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[AzureFirewallsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("AzureFirewallsClient.Delete", "location", resp, client.pl) - if err != nil { - return AzureFirewallsClientDeletePollerResponse{}, err - } - result.Poller = &AzureFirewallsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Azure Firewall. @@ -233,7 +230,7 @@ func (client *AzureFirewallsClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (AzureFirewallsClientGetResponse, error) { - result := AzureFirewallsClientGetResponse{RawResponse: resp} + result := AzureFirewallsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewall); err != nil { return AzureFirewallsClientGetResponse{}, err } @@ -244,16 +241,32 @@ func (client *AzureFirewallsClient) getHandleResponse(resp *http.Response) (Azur // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - AzureFirewallsClientListOptions contains the optional parameters for the AzureFirewallsClient.List method. -func (client *AzureFirewallsClient) List(resourceGroupName string, options *AzureFirewallsClientListOptions) *AzureFirewallsClientListPager { - return &AzureFirewallsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *AzureFirewallsClient) List(resourceGroupName string, options *AzureFirewallsClientListOptions) *runtime.Pager[AzureFirewallsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[AzureFirewallsClientListResponse]{ + More: func(page AzureFirewallsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AzureFirewallsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AzureFirewallListResult.NextLink) + Fetcher: func(ctx context.Context, page *AzureFirewallsClientListResponse) (AzureFirewallsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AzureFirewallsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AzureFirewallsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AzureFirewallsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -280,7 +293,7 @@ func (client *AzureFirewallsClient) listCreateRequest(ctx context.Context, resou // listHandleResponse handles the List response. func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (AzureFirewallsClientListResponse, error) { - result := AzureFirewallsClientListResponse{RawResponse: resp} + result := AzureFirewallsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { return AzureFirewallsClientListResponse{}, err } @@ -290,16 +303,32 @@ func (client *AzureFirewallsClient) listHandleResponse(resp *http.Response) (Azu // ListAll - Gets all the Azure Firewalls in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - AzureFirewallsClientListAllOptions contains the optional parameters for the AzureFirewallsClient.ListAll method. -func (client *AzureFirewallsClient) ListAll(options *AzureFirewallsClientListAllOptions) *AzureFirewallsClientListAllPager { - return &AzureFirewallsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *AzureFirewallsClient) ListAll(options *AzureFirewallsClientListAllOptions) *runtime.Pager[AzureFirewallsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[AzureFirewallsClientListAllResponse]{ + More: func(page AzureFirewallsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp AzureFirewallsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AzureFirewallListResult.NextLink) + Fetcher: func(ctx context.Context, page *AzureFirewallsClientListAllResponse) (AzureFirewallsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return AzureFirewallsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return AzureFirewallsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return AzureFirewallsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -322,7 +351,7 @@ func (client *AzureFirewallsClient) listAllCreateRequest(ctx context.Context, op // listAllHandleResponse handles the ListAll response. func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) (AzureFirewallsClientListAllResponse, error) { - result := AzureFirewallsClientListAllResponse{RawResponse: resp} + result := AzureFirewallsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureFirewallListResult); err != nil { return AzureFirewallsClientListAllResponse{}, err } @@ -336,22 +365,18 @@ func (client *AzureFirewallsClient) listAllHandleResponse(resp *http.Response) ( // parameters - Parameters supplied to update azure firewall tags. // options - AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags // method. -func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (AzureFirewallsClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, azureFirewallName, parameters, options) - if err != nil { - return AzureFirewallsClientUpdateTagsPollerResponse{}, err +func (client *AzureFirewallsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters TagsObject, options *AzureFirewallsClientBeginUpdateTagsOptions) (*armruntime.Poller[AzureFirewallsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, azureFirewallName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[AzureFirewallsClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[AzureFirewallsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - result := AzureFirewallsClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("AzureFirewallsClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return AzureFirewallsClientUpdateTagsPollerResponse{}, err - } - result.Poller = &AzureFirewallsClientUpdateTagsPoller{ - pt: pt, - } - return result, nil } // UpdateTags - Updates tags of an Azure Firewall resource. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go index 6c47504dd0b8..0c3ce86c39ac 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_bastionhosts_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type BastionHostsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BastionHostsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BastionHostsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &BastionHostsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Bastion Host. @@ -57,22 +62,18 @@ func NewBastionHostsClient(subscriptionID string, credential azcore.TokenCredent // parameters - Parameters supplied to the create or update Bastion Host operation. // options - BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate // method. -func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (BastionHostsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return BastionHostsClientCreateOrUpdatePollerResponse{}, err - } - result := BastionHostsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("BastionHostsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return BastionHostsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &BastionHostsClientCreateOrUpdatePoller{ - pt: pt, +func (client *BastionHostsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, bastionHostName string, parameters BastionHost, options *BastionHostsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[BastionHostsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[BastionHostsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[BastionHostsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified Bastion Host. @@ -124,22 +125,18 @@ func (client *BastionHostsClient) createOrUpdateCreateRequest(ctx context.Contex // bastionHostName - The name of the Bastion Host. // options - BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete // method. -func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (BastionHostsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return BastionHostsClientDeletePollerResponse{}, err - } - result := BastionHostsClientDeletePollerResponse{ - RawResponse: resp, +func (client *BastionHostsClient) BeginDelete(ctx context.Context, resourceGroupName string, bastionHostName string, options *BastionHostsClientBeginDeleteOptions) (*armruntime.Poller[BastionHostsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[BastionHostsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[BastionHostsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("BastionHostsClient.Delete", "location", resp, client.pl) - if err != nil { - return BastionHostsClientDeletePollerResponse{}, err - } - result.Poller = &BastionHostsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Bastion Host. @@ -233,7 +230,7 @@ func (client *BastionHostsClient) getCreateRequest(ctx context.Context, resource // getHandleResponse handles the Get response. func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (BastionHostsClientGetResponse, error) { - result := BastionHostsClientGetResponse{RawResponse: resp} + result := BastionHostsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionHost); err != nil { return BastionHostsClientGetResponse{}, err } @@ -243,16 +240,32 @@ func (client *BastionHostsClient) getHandleResponse(resp *http.Response) (Bastio // List - Lists all Bastion Hosts in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - BastionHostsClientListOptions contains the optional parameters for the BastionHostsClient.List method. -func (client *BastionHostsClient) List(options *BastionHostsClientListOptions) *BastionHostsClientListPager { - return &BastionHostsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *BastionHostsClient) List(options *BastionHostsClientListOptions) *runtime.Pager[BastionHostsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[BastionHostsClientListResponse]{ + More: func(page BastionHostsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp BastionHostsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.BastionHostListResult.NextLink) + Fetcher: func(ctx context.Context, page *BastionHostsClientListResponse) (BastionHostsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return BastionHostsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return BastionHostsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BastionHostsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -275,7 +288,7 @@ func (client *BastionHostsClient) listCreateRequest(ctx context.Context, options // listHandleResponse handles the List response. func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (BastionHostsClientListResponse, error) { - result := BastionHostsClientListResponse{RawResponse: resp} + result := BastionHostsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { return BastionHostsClientListResponse{}, err } @@ -287,16 +300,32 @@ func (client *BastionHostsClient) listHandleResponse(resp *http.Response) (Basti // resourceGroupName - The name of the resource group. // options - BastionHostsClientListByResourceGroupOptions contains the optional parameters for the BastionHostsClient.ListByResourceGroup // method. -func (client *BastionHostsClient) ListByResourceGroup(resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) *BastionHostsClientListByResourceGroupPager { - return &BastionHostsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *BastionHostsClient) ListByResourceGroup(resourceGroupName string, options *BastionHostsClientListByResourceGroupOptions) *runtime.Pager[BastionHostsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[BastionHostsClientListByResourceGroupResponse]{ + More: func(page BastionHostsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp BastionHostsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.BastionHostListResult.NextLink) + Fetcher: func(ctx context.Context, page *BastionHostsClientListByResourceGroupResponse) (BastionHostsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return BastionHostsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return BastionHostsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BastionHostsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -323,7 +352,7 @@ func (client *BastionHostsClient) listByResourceGroupCreateRequest(ctx context.C // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *BastionHostsClient) listByResourceGroupHandleResponse(resp *http.Response) (BastionHostsClientListByResourceGroupResponse, error) { - result := BastionHostsClientListByResourceGroupResponse{RawResponse: resp} + result := BastionHostsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionHostListResult); err != nil { return BastionHostsClientListByResourceGroupResponse{}, err } @@ -337,22 +366,18 @@ func (client *BastionHostsClient) listByResourceGroupHandleResponse(resp *http.R // parameters - Parameters supplied to update BastionHost tags. // options - BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags // method. -func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (BastionHostsClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, bastionHostName, parameters, options) - if err != nil { - return BastionHostsClientUpdateTagsPollerResponse{}, err +func (client *BastionHostsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, bastionHostName string, parameters TagsObject, options *BastionHostsClientBeginUpdateTagsOptions) (*armruntime.Poller[BastionHostsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, bastionHostName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[BastionHostsClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[BastionHostsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - result := BastionHostsClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("BastionHostsClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return BastionHostsClientUpdateTagsPollerResponse{}, err - } - result.Poller = &BastionHostsClientUpdateTagsPoller{ - pt: pt, - } - return result, nil } // UpdateTags - Updates Tags for BastionHost resource diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go index 967854cdc2ef..922adcab6b58 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_bgpservicecommunities_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,36 +35,56 @@ type BgpServiceCommunitiesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *BgpServiceCommunitiesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewBgpServiceCommunitiesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*BgpServiceCommunitiesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &BgpServiceCommunitiesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets all the available bgp service communities. // If the operation fails it returns an *azcore.ResponseError type. // options - BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List // method. -func (client *BgpServiceCommunitiesClient) List(options *BgpServiceCommunitiesClientListOptions) *BgpServiceCommunitiesClientListPager { - return &BgpServiceCommunitiesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *BgpServiceCommunitiesClient) List(options *BgpServiceCommunitiesClientListOptions) *runtime.Pager[BgpServiceCommunitiesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[BgpServiceCommunitiesClientListResponse]{ + More: func(page BgpServiceCommunitiesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp BgpServiceCommunitiesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.BgpServiceCommunityListResult.NextLink) + Fetcher: func(ctx context.Context, page *BgpServiceCommunitiesClientListResponse) (BgpServiceCommunitiesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return BgpServiceCommunitiesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return BgpServiceCommunitiesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return BgpServiceCommunitiesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -86,7 +107,7 @@ func (client *BgpServiceCommunitiesClient) listCreateRequest(ctx context.Context // listHandleResponse handles the List response. func (client *BgpServiceCommunitiesClient) listHandleResponse(resp *http.Response) (BgpServiceCommunitiesClientListResponse, error) { - result := BgpServiceCommunitiesClientListResponse{RawResponse: resp} + result := BgpServiceCommunitiesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BgpServiceCommunityListResult); err != nil { return BgpServiceCommunitiesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go index 698b93740e59..5e312f7a1b39 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_connectionmonitors_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ConnectionMonitorsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ConnectionMonitorsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ConnectionMonitorsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Create or update a connection monitor. @@ -58,22 +63,18 @@ func NewConnectionMonitorsClient(subscriptionID string, credential azcore.TokenC // parameters - Parameters that define the operation to create a connection monitor. // options - ConnectionMonitorsClientBeginCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorsClient.BeginCreateOrUpdate // method. -func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (ConnectionMonitorsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) - if err != nil { - return ConnectionMonitorsClientCreateOrUpdatePollerResponse{}, err - } - result := ConnectionMonitorsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ConnectionMonitorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor, options *ConnectionMonitorsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ConnectionMonitorsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ConnectionMonitorsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ConnectionMonitorsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ConnectionMonitorsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ConnectionMonitorsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ConnectionMonitorsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Create or update a connection monitor. @@ -133,22 +134,18 @@ func (client *ConnectionMonitorsClient) createOrUpdateCreateRequest(ctx context. // connectionMonitorName - The name of the connection monitor. // options - ConnectionMonitorsClientBeginDeleteOptions contains the optional parameters for the ConnectionMonitorsClient.BeginDelete // method. -func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (ConnectionMonitorsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return ConnectionMonitorsClientDeletePollerResponse{}, err - } - result := ConnectionMonitorsClientDeletePollerResponse{ - RawResponse: resp, +func (client *ConnectionMonitorsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginDeleteOptions) (*armruntime.Poller[ConnectionMonitorsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ConnectionMonitorsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ConnectionMonitorsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ConnectionMonitorsClient.Delete", "location", resp, client.pl) - if err != nil { - return ConnectionMonitorsClientDeletePollerResponse{}, err - } - result.Poller = &ConnectionMonitorsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified connection monitor. @@ -251,7 +248,7 @@ func (client *ConnectionMonitorsClient) getCreateRequest(ctx context.Context, re // getHandleResponse handles the Get response. func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) (ConnectionMonitorsClientGetResponse, error) { - result := ConnectionMonitorsClientGetResponse{RawResponse: resp} + result := ConnectionMonitorsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { return ConnectionMonitorsClientGetResponse{}, err } @@ -263,19 +260,26 @@ func (client *ConnectionMonitorsClient) getHandleResponse(resp *http.Response) ( // resourceGroupName - The name of the resource group containing Network Watcher. // networkWatcherName - The name of the Network Watcher resource. // options - ConnectionMonitorsClientListOptions contains the optional parameters for the ConnectionMonitorsClient.List method. -func (client *ConnectionMonitorsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) (ConnectionMonitorsClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return ConnectionMonitorsClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return ConnectionMonitorsClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return ConnectionMonitorsClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) +func (client *ConnectionMonitorsClient) List(resourceGroupName string, networkWatcherName string, options *ConnectionMonitorsClientListOptions) *runtime.Pager[ConnectionMonitorsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ConnectionMonitorsClientListResponse]{ + More: func(page ConnectionMonitorsClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *ConnectionMonitorsClientListResponse) (ConnectionMonitorsClientListResponse, error) { + req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return ConnectionMonitorsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ConnectionMonitorsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ConnectionMonitorsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) } // listCreateRequest creates the List request. @@ -306,7 +310,7 @@ func (client *ConnectionMonitorsClient) listCreateRequest(ctx context.Context, r // listHandleResponse handles the List response. func (client *ConnectionMonitorsClient) listHandleResponse(resp *http.Response) (ConnectionMonitorsClientListResponse, error) { - result := ConnectionMonitorsClientListResponse{RawResponse: resp} + result := ConnectionMonitorsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorListResult); err != nil { return ConnectionMonitorsClientListResponse{}, err } @@ -320,22 +324,18 @@ func (client *ConnectionMonitorsClient) listHandleResponse(resp *http.Response) // connectionMonitorName - The name given to the connection monitor. // options - ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery // method. -func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (ConnectionMonitorsClientQueryPollerResponse, error) { - resp, err := client.query(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return ConnectionMonitorsClientQueryPollerResponse{}, err - } - result := ConnectionMonitorsClientQueryPollerResponse{ - RawResponse: resp, +func (client *ConnectionMonitorsClient) BeginQuery(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginQueryOptions) (*armruntime.Poller[ConnectionMonitorsClientQueryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.query(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ConnectionMonitorsClientQueryResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ConnectionMonitorsClientQueryResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ConnectionMonitorsClient.Query", "location", resp, client.pl) - if err != nil { - return ConnectionMonitorsClientQueryPollerResponse{}, err - } - result.Poller = &ConnectionMonitorsClientQueryPoller{ - pt: pt, - } - return result, nil } // Query - Query a snapshot of the most recent connection states. @@ -392,22 +392,18 @@ func (client *ConnectionMonitorsClient) queryCreateRequest(ctx context.Context, // connectionMonitorName - The name of the connection monitor. // options - ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart // method. -func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (ConnectionMonitorsClientStartPollerResponse, error) { - resp, err := client.start(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return ConnectionMonitorsClientStartPollerResponse{}, err - } - result := ConnectionMonitorsClientStartPollerResponse{ - RawResponse: resp, +func (client *ConnectionMonitorsClient) BeginStart(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStartOptions) (*armruntime.Poller[ConnectionMonitorsClientStartResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.start(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ConnectionMonitorsClientStartResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ConnectionMonitorsClientStartResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ConnectionMonitorsClient.Start", "location", resp, client.pl) - if err != nil { - return ConnectionMonitorsClientStartPollerResponse{}, err - } - result.Poller = &ConnectionMonitorsClientStartPoller{ - pt: pt, - } - return result, nil } // Start - Starts the specified connection monitor. @@ -464,22 +460,18 @@ func (client *ConnectionMonitorsClient) startCreateRequest(ctx context.Context, // connectionMonitorName - The name of the connection monitor. // options - ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop // method. -func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (ConnectionMonitorsClientStopPollerResponse, error) { - resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) - if err != nil { - return ConnectionMonitorsClientStopPollerResponse{}, err +func (client *ConnectionMonitorsClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, options *ConnectionMonitorsClientBeginStopOptions) (*armruntime.Poller[ConnectionMonitorsClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, connectionMonitorName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ConnectionMonitorsClientStopResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ConnectionMonitorsClientStopResponse](options.ResumeToken, client.pl, nil) } - result := ConnectionMonitorsClientStopPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ConnectionMonitorsClient.Stop", "location", resp, client.pl) - if err != nil { - return ConnectionMonitorsClientStopPollerResponse{}, err - } - result.Poller = &ConnectionMonitorsClientStopPoller{ - pt: pt, - } - return result, nil } // Stop - Stops the specified connection monitor. @@ -584,7 +576,7 @@ func (client *ConnectionMonitorsClient) updateTagsCreateRequest(ctx context.Cont // updateTagsHandleResponse handles the UpdateTags response. func (client *ConnectionMonitorsClient) updateTagsHandleResponse(resp *http.Response) (ConnectionMonitorsClientUpdateTagsResponse, error) { - result := ConnectionMonitorsClientUpdateTagsResponse{RawResponse: resp} + result := ConnectionMonitorsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionMonitorResult); err != nil { return ConnectionMonitorsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go b/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go index 779e1c04c155..2e2321df1fb1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_constants.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -10,7 +10,7 @@ package armnetwork const ( moduleName = "armnetwork" - moduleVersion = "v0.3.1" + moduleVersion = "v0.4.0" ) // Access - Access to be allowed or denied. @@ -29,11 +29,6 @@ func PossibleAccessValues() []Access { } } -// ToPtr returns a *Access pointing to the current value. -func (c Access) ToPtr() *Access { - return &c -} - // ApplicationGatewayBackendHealthServerHealth - Health of backend server. type ApplicationGatewayBackendHealthServerHealth string @@ -56,11 +51,6 @@ func PossibleApplicationGatewayBackendHealthServerHealthValues() []ApplicationGa } } -// ToPtr returns a *ApplicationGatewayBackendHealthServerHealth pointing to the current value. -func (c ApplicationGatewayBackendHealthServerHealth) ToPtr() *ApplicationGatewayBackendHealthServerHealth { - return &c -} - // ApplicationGatewayCookieBasedAffinity - Cookie based affinity. type ApplicationGatewayCookieBasedAffinity string @@ -77,11 +67,6 @@ func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayC } } -// ToPtr returns a *ApplicationGatewayCookieBasedAffinity pointing to the current value. -func (c ApplicationGatewayCookieBasedAffinity) ToPtr() *ApplicationGatewayCookieBasedAffinity { - return &c -} - // ApplicationGatewayCustomErrorStatusCode - Status code of the application gateway customer error. type ApplicationGatewayCustomErrorStatusCode string @@ -98,11 +83,6 @@ func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewa } } -// ToPtr returns a *ApplicationGatewayCustomErrorStatusCode pointing to the current value. -func (c ApplicationGatewayCustomErrorStatusCode) ToPtr() *ApplicationGatewayCustomErrorStatusCode { - return &c -} - // ApplicationGatewayFirewallMode - Web application firewall mode. type ApplicationGatewayFirewallMode string @@ -119,11 +99,6 @@ func PossibleApplicationGatewayFirewallModeValues() []ApplicationGatewayFirewall } } -// ToPtr returns a *ApplicationGatewayFirewallMode pointing to the current value. -func (c ApplicationGatewayFirewallMode) ToPtr() *ApplicationGatewayFirewallMode { - return &c -} - // ApplicationGatewayLoadDistributionAlgorithm - Load Distribution Algorithm enums. type ApplicationGatewayLoadDistributionAlgorithm string @@ -142,11 +117,6 @@ func PossibleApplicationGatewayLoadDistributionAlgorithmValues() []ApplicationGa } } -// ToPtr returns a *ApplicationGatewayLoadDistributionAlgorithm pointing to the current value. -func (c ApplicationGatewayLoadDistributionAlgorithm) ToPtr() *ApplicationGatewayLoadDistributionAlgorithm { - return &c -} - // ApplicationGatewayOperationalState - Operational state of the application gateway resource. type ApplicationGatewayOperationalState string @@ -167,11 +137,6 @@ func PossibleApplicationGatewayOperationalStateValues() []ApplicationGatewayOper } } -// ToPtr returns a *ApplicationGatewayOperationalState pointing to the current value. -func (c ApplicationGatewayOperationalState) ToPtr() *ApplicationGatewayOperationalState { - return &c -} - // ApplicationGatewayProtocol - Application Gateway protocol. type ApplicationGatewayProtocol string @@ -188,11 +153,6 @@ func PossibleApplicationGatewayProtocolValues() []ApplicationGatewayProtocol { } } -// ToPtr returns a *ApplicationGatewayProtocol pointing to the current value. -func (c ApplicationGatewayProtocol) ToPtr() *ApplicationGatewayProtocol { - return &c -} - // ApplicationGatewayRedirectType - Redirect type enum. type ApplicationGatewayRedirectType string @@ -213,11 +173,6 @@ func PossibleApplicationGatewayRedirectTypeValues() []ApplicationGatewayRedirect } } -// ToPtr returns a *ApplicationGatewayRedirectType pointing to the current value. -func (c ApplicationGatewayRedirectType) ToPtr() *ApplicationGatewayRedirectType { - return &c -} - // ApplicationGatewayRequestRoutingRuleType - Rule type. type ApplicationGatewayRequestRoutingRuleType string @@ -234,11 +189,6 @@ func PossibleApplicationGatewayRequestRoutingRuleTypeValues() []ApplicationGatew } } -// ToPtr returns a *ApplicationGatewayRequestRoutingRuleType pointing to the current value. -func (c ApplicationGatewayRequestRoutingRuleType) ToPtr() *ApplicationGatewayRequestRoutingRuleType { - return &c -} - // ApplicationGatewaySKUName - Name of an application gateway SKU. type ApplicationGatewaySKUName string @@ -265,11 +215,6 @@ func PossibleApplicationGatewaySKUNameValues() []ApplicationGatewaySKUName { } } -// ToPtr returns a *ApplicationGatewaySKUName pointing to the current value. -func (c ApplicationGatewaySKUName) ToPtr() *ApplicationGatewaySKUName { - return &c -} - // ApplicationGatewaySSLCipherSuite - Ssl cipher suites enums. type ApplicationGatewaySSLCipherSuite string @@ -338,11 +283,6 @@ func PossibleApplicationGatewaySSLCipherSuiteValues() []ApplicationGatewaySSLCip } } -// ToPtr returns a *ApplicationGatewaySSLCipherSuite pointing to the current value. -func (c ApplicationGatewaySSLCipherSuite) ToPtr() *ApplicationGatewaySSLCipherSuite { - return &c -} - // ApplicationGatewaySSLPolicyName - Ssl predefined policy name enums. type ApplicationGatewaySSLPolicyName string @@ -361,11 +301,6 @@ func PossibleApplicationGatewaySSLPolicyNameValues() []ApplicationGatewaySSLPoli } } -// ToPtr returns a *ApplicationGatewaySSLPolicyName pointing to the current value. -func (c ApplicationGatewaySSLPolicyName) ToPtr() *ApplicationGatewaySSLPolicyName { - return &c -} - // ApplicationGatewaySSLPolicyType - Type of Ssl Policy. type ApplicationGatewaySSLPolicyType string @@ -382,11 +317,6 @@ func PossibleApplicationGatewaySSLPolicyTypeValues() []ApplicationGatewaySSLPoli } } -// ToPtr returns a *ApplicationGatewaySSLPolicyType pointing to the current value. -func (c ApplicationGatewaySSLPolicyType) ToPtr() *ApplicationGatewaySSLPolicyType { - return &c -} - // ApplicationGatewaySSLProtocol - Ssl protocol enums. type ApplicationGatewaySSLProtocol string @@ -405,11 +335,6 @@ func PossibleApplicationGatewaySSLProtocolValues() []ApplicationGatewaySSLProtoc } } -// ToPtr returns a *ApplicationGatewaySSLProtocol pointing to the current value. -func (c ApplicationGatewaySSLProtocol) ToPtr() *ApplicationGatewaySSLProtocol { - return &c -} - // ApplicationGatewayTier - Tier of an application gateway. type ApplicationGatewayTier string @@ -430,11 +355,6 @@ func PossibleApplicationGatewayTierValues() []ApplicationGatewayTier { } } -// ToPtr returns a *ApplicationGatewayTier pointing to the current value. -func (c ApplicationGatewayTier) ToPtr() *ApplicationGatewayTier { - return &c -} - // AssociationType - The association type of the child resource to the parent resource. type AssociationType string @@ -451,11 +371,6 @@ func PossibleAssociationTypeValues() []AssociationType { } } -// ToPtr returns a *AssociationType pointing to the current value. -func (c AssociationType) ToPtr() *AssociationType { - return &c -} - // AuthenticationMethod - VPN client authentication method. type AuthenticationMethod string @@ -472,11 +387,6 @@ func PossibleAuthenticationMethodValues() []AuthenticationMethod { } } -// ToPtr returns a *AuthenticationMethod pointing to the current value. -func (c AuthenticationMethod) ToPtr() *AuthenticationMethod { - return &c -} - // AuthorizationUseStatus - The authorization use status. type AuthorizationUseStatus string @@ -493,11 +403,6 @@ func PossibleAuthorizationUseStatusValues() []AuthorizationUseStatus { } } -// ToPtr returns a *AuthorizationUseStatus pointing to the current value. -func (c AuthorizationUseStatus) ToPtr() *AuthorizationUseStatus { - return &c -} - // AzureFirewallApplicationRuleProtocolType - The protocol type of a Application Rule resource. type AzureFirewallApplicationRuleProtocolType string @@ -516,11 +421,6 @@ func PossibleAzureFirewallApplicationRuleProtocolTypeValues() []AzureFirewallApp } } -// ToPtr returns a *AzureFirewallApplicationRuleProtocolType pointing to the current value. -func (c AzureFirewallApplicationRuleProtocolType) ToPtr() *AzureFirewallApplicationRuleProtocolType { - return &c -} - // AzureFirewallNatRCActionType - The action type of a NAT rule collection. type AzureFirewallNatRCActionType string @@ -537,11 +437,6 @@ func PossibleAzureFirewallNatRCActionTypeValues() []AzureFirewallNatRCActionType } } -// ToPtr returns a *AzureFirewallNatRCActionType pointing to the current value. -func (c AzureFirewallNatRCActionType) ToPtr() *AzureFirewallNatRCActionType { - return &c -} - // AzureFirewallNetworkRuleProtocol - The protocol of a Network Rule resource. type AzureFirewallNetworkRuleProtocol string @@ -562,11 +457,6 @@ func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRule } } -// ToPtr returns a *AzureFirewallNetworkRuleProtocol pointing to the current value. -func (c AzureFirewallNetworkRuleProtocol) ToPtr() *AzureFirewallNetworkRuleProtocol { - return &c -} - // AzureFirewallRCActionType - The action type of a rule collection. type AzureFirewallRCActionType string @@ -583,11 +473,6 @@ func PossibleAzureFirewallRCActionTypeValues() []AzureFirewallRCActionType { } } -// ToPtr returns a *AzureFirewallRCActionType pointing to the current value. -func (c AzureFirewallRCActionType) ToPtr() *AzureFirewallRCActionType { - return &c -} - // AzureFirewallSKUName - Name of an Azure Firewall SKU. type AzureFirewallSKUName string @@ -604,11 +489,6 @@ func PossibleAzureFirewallSKUNameValues() []AzureFirewallSKUName { } } -// ToPtr returns a *AzureFirewallSKUName pointing to the current value. -func (c AzureFirewallSKUName) ToPtr() *AzureFirewallSKUName { - return &c -} - // AzureFirewallSKUTier - Tier of an Azure Firewall. type AzureFirewallSKUTier string @@ -627,11 +507,6 @@ func PossibleAzureFirewallSKUTierValues() []AzureFirewallSKUTier { } } -// ToPtr returns a *AzureFirewallSKUTier pointing to the current value. -func (c AzureFirewallSKUTier) ToPtr() *AzureFirewallSKUTier { - return &c -} - // AzureFirewallThreatIntelMode - The operation mode for Threat Intel. type AzureFirewallThreatIntelMode string @@ -650,11 +525,6 @@ func PossibleAzureFirewallThreatIntelModeValues() []AzureFirewallThreatIntelMode } } -// ToPtr returns a *AzureFirewallThreatIntelMode pointing to the current value. -func (c AzureFirewallThreatIntelMode) ToPtr() *AzureFirewallThreatIntelMode { - return &c -} - // BastionConnectProtocol - The protocol used to connect to the target. type BastionConnectProtocol string @@ -671,11 +541,6 @@ func PossibleBastionConnectProtocolValues() []BastionConnectProtocol { } } -// ToPtr returns a *BastionConnectProtocol pointing to the current value. -func (c BastionConnectProtocol) ToPtr() *BastionConnectProtocol { - return &c -} - // BastionHostSKUName - The name of this Bastion Host. type BastionHostSKUName string @@ -692,11 +557,6 @@ func PossibleBastionHostSKUNameValues() []BastionHostSKUName { } } -// ToPtr returns a *BastionHostSKUName pointing to the current value. -func (c BastionHostSKUName) ToPtr() *BastionHostSKUName { - return &c -} - // BgpPeerState - The BGP peer state. type BgpPeerState string @@ -719,11 +579,6 @@ func PossibleBgpPeerStateValues() []BgpPeerState { } } -// ToPtr returns a *BgpPeerState pointing to the current value. -func (c BgpPeerState) ToPtr() *BgpPeerState { - return &c -} - // CircuitConnectionStatus - Express Route Circuit connection state. type CircuitConnectionStatus string @@ -742,11 +597,6 @@ func PossibleCircuitConnectionStatusValues() []CircuitConnectionStatus { } } -// ToPtr returns a *CircuitConnectionStatus pointing to the current value. -func (c CircuitConnectionStatus) ToPtr() *CircuitConnectionStatus { - return &c -} - // CommissionedState - The commissioned state of the Custom IP Prefix. type CommissionedState string @@ -771,11 +621,6 @@ func PossibleCommissionedStateValues() []CommissionedState { } } -// ToPtr returns a *CommissionedState pointing to the current value. -func (c CommissionedState) ToPtr() *CommissionedState { - return &c -} - // ConnectionMonitorEndpointFilterItemType - The type of item included in the filter. Currently only 'AgentAddress' is supported. type ConnectionMonitorEndpointFilterItemType string @@ -790,11 +635,6 @@ func PossibleConnectionMonitorEndpointFilterItemTypeValues() []ConnectionMonitor } } -// ToPtr returns a *ConnectionMonitorEndpointFilterItemType pointing to the current value. -func (c ConnectionMonitorEndpointFilterItemType) ToPtr() *ConnectionMonitorEndpointFilterItemType { - return &c -} - // ConnectionMonitorEndpointFilterType - The behavior of the endpoint filter. Currently only 'Include' is supported. type ConnectionMonitorEndpointFilterType string @@ -809,11 +649,6 @@ func PossibleConnectionMonitorEndpointFilterTypeValues() []ConnectionMonitorEndp } } -// ToPtr returns a *ConnectionMonitorEndpointFilterType pointing to the current value. -func (c ConnectionMonitorEndpointFilterType) ToPtr() *ConnectionMonitorEndpointFilterType { - return &c -} - // ConnectionMonitorSourceStatus - Status of connection monitor source. type ConnectionMonitorSourceStatus string @@ -832,11 +667,6 @@ func PossibleConnectionMonitorSourceStatusValues() []ConnectionMonitorSourceStat } } -// ToPtr returns a *ConnectionMonitorSourceStatus pointing to the current value. -func (c ConnectionMonitorSourceStatus) ToPtr() *ConnectionMonitorSourceStatus { - return &c -} - // ConnectionMonitorTestConfigurationProtocol - The protocol to use in test evaluation. type ConnectionMonitorTestConfigurationProtocol string @@ -855,11 +685,6 @@ func PossibleConnectionMonitorTestConfigurationProtocolValues() []ConnectionMoni } } -// ToPtr returns a *ConnectionMonitorTestConfigurationProtocol pointing to the current value. -func (c ConnectionMonitorTestConfigurationProtocol) ToPtr() *ConnectionMonitorTestConfigurationProtocol { - return &c -} - // ConnectionMonitorType - Type of connection monitor. type ConnectionMonitorType string @@ -876,11 +701,6 @@ func PossibleConnectionMonitorTypeValues() []ConnectionMonitorType { } } -// ToPtr returns a *ConnectionMonitorType pointing to the current value. -func (c ConnectionMonitorType) ToPtr() *ConnectionMonitorType { - return &c -} - // ConnectionState - The connection state. type ConnectionState string @@ -899,11 +719,6 @@ func PossibleConnectionStateValues() []ConnectionState { } } -// ToPtr returns a *ConnectionState pointing to the current value. -func (c ConnectionState) ToPtr() *ConnectionState { - return &c -} - // ConnectionStatus - The connection status. type ConnectionStatus string @@ -924,11 +739,6 @@ func PossibleConnectionStatusValues() []ConnectionStatus { } } -// ToPtr returns a *ConnectionStatus pointing to the current value. -func (c ConnectionStatus) ToPtr() *ConnectionStatus { - return &c -} - // CoverageLevel - Test coverage for the endpoint. type CoverageLevel string @@ -953,11 +763,6 @@ func PossibleCoverageLevelValues() []CoverageLevel { } } -// ToPtr returns a *CoverageLevel pointing to the current value. -func (c CoverageLevel) ToPtr() *CoverageLevel { - return &c -} - // DdosCustomPolicyProtocol - The protocol for which the DDoS protection policy is being customized. type DdosCustomPolicyProtocol string @@ -976,11 +781,6 @@ func PossibleDdosCustomPolicyProtocolValues() []DdosCustomPolicyProtocol { } } -// ToPtr returns a *DdosCustomPolicyProtocol pointing to the current value. -func (c DdosCustomPolicyProtocol) ToPtr() *DdosCustomPolicyProtocol { - return &c -} - // DdosCustomPolicyTriggerSensitivityOverride - The customized DDoS protection trigger rate sensitivity degrees. High: Trigger // rate set with most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity w.r.t. normal // traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity @@ -1004,11 +804,6 @@ func PossibleDdosCustomPolicyTriggerSensitivityOverrideValues() []DdosCustomPoli } } -// ToPtr returns a *DdosCustomPolicyTriggerSensitivityOverride pointing to the current value. -func (c DdosCustomPolicyTriggerSensitivityOverride) ToPtr() *DdosCustomPolicyTriggerSensitivityOverride { - return &c -} - // DdosSettingsProtectionCoverage - The DDoS protection policy customizability of the public IP. Only standard coverage will // have the ability to be customized. type DdosSettingsProtectionCoverage string @@ -1026,11 +821,6 @@ func PossibleDdosSettingsProtectionCoverageValues() []DdosSettingsProtectionCove } } -// ToPtr returns a *DdosSettingsProtectionCoverage pointing to the current value. -func (c DdosSettingsProtectionCoverage) ToPtr() *DdosSettingsProtectionCoverage { - return &c -} - // DeleteOptions - Specify what happens to the public IP address when the VM using it is deleted type DeleteOptions string @@ -1047,11 +837,6 @@ func PossibleDeleteOptionsValues() []DeleteOptions { } } -// ToPtr returns a *DeleteOptions pointing to the current value. -func (c DeleteOptions) ToPtr() *DeleteOptions { - return &c -} - // DestinationPortBehavior - Destination port behavior. type DestinationPortBehavior string @@ -1068,11 +853,6 @@ func PossibleDestinationPortBehaviorValues() []DestinationPortBehavior { } } -// ToPtr returns a *DestinationPortBehavior pointing to the current value. -func (c DestinationPortBehavior) ToPtr() *DestinationPortBehavior { - return &c -} - // DhGroup - The DH Groups used in IKE Phase 1 for initial SA. type DhGroup string @@ -1101,11 +881,6 @@ func PossibleDhGroupValues() []DhGroup { } } -// ToPtr returns a *DhGroup pointing to the current value. -func (c DhGroup) ToPtr() *DhGroup { - return &c -} - // Direction - The direction of the traffic. type Direction string @@ -1122,11 +897,6 @@ func PossibleDirectionValues() []Direction { } } -// ToPtr returns a *Direction pointing to the current value. -func (c Direction) ToPtr() *Direction { - return &c -} - // EffectiveRouteSource - Who created the route. type EffectiveRouteSource string @@ -1147,11 +917,6 @@ func PossibleEffectiveRouteSourceValues() []EffectiveRouteSource { } } -// ToPtr returns a *EffectiveRouteSource pointing to the current value. -func (c EffectiveRouteSource) ToPtr() *EffectiveRouteSource { - return &c -} - // EffectiveRouteState - The value of effective route. type EffectiveRouteState string @@ -1168,11 +933,6 @@ func PossibleEffectiveRouteStateValues() []EffectiveRouteState { } } -// ToPtr returns a *EffectiveRouteState pointing to the current value. -func (c EffectiveRouteState) ToPtr() *EffectiveRouteState { - return &c -} - // EffectiveSecurityRuleProtocol - The network protocol this rule applies to. type EffectiveSecurityRuleProtocol string @@ -1191,11 +951,6 @@ func PossibleEffectiveSecurityRuleProtocolValues() []EffectiveSecurityRuleProtoc } } -// ToPtr returns a *EffectiveSecurityRuleProtocol pointing to the current value. -func (c EffectiveSecurityRuleProtocol) ToPtr() *EffectiveSecurityRuleProtocol { - return &c -} - // EndpointType - The endpoint type. type EndpointType string @@ -1220,11 +975,6 @@ func PossibleEndpointTypeValues() []EndpointType { } } -// ToPtr returns a *EndpointType pointing to the current value. -func (c EndpointType) ToPtr() *EndpointType { - return &c -} - // EvaluationState - Connectivity analysis evaluation state. type EvaluationState string @@ -1243,11 +993,6 @@ func PossibleEvaluationStateValues() []EvaluationState { } } -// ToPtr returns a *EvaluationState pointing to the current value. -func (c EvaluationState) ToPtr() *EvaluationState { - return &c -} - // ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - The advertised public prefix state of the Peering resource. type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string @@ -1268,11 +1013,6 @@ func PossibleExpressRouteCircuitPeeringAdvertisedPublicPrefixStateValues() []Exp } } -// ToPtr returns a *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState pointing to the current value. -func (c ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) ToPtr() *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { - return &c -} - // ExpressRouteCircuitPeeringState - The state of peering. type ExpressRouteCircuitPeeringState string @@ -1289,11 +1029,6 @@ func PossibleExpressRouteCircuitPeeringStateValues() []ExpressRouteCircuitPeerin } } -// ToPtr returns a *ExpressRouteCircuitPeeringState pointing to the current value. -func (c ExpressRouteCircuitPeeringState) ToPtr() *ExpressRouteCircuitPeeringState { - return &c -} - // ExpressRouteCircuitSKUFamily - The family of the SKU. type ExpressRouteCircuitSKUFamily string @@ -1310,11 +1045,6 @@ func PossibleExpressRouteCircuitSKUFamilyValues() []ExpressRouteCircuitSKUFamily } } -// ToPtr returns a *ExpressRouteCircuitSKUFamily pointing to the current value. -func (c ExpressRouteCircuitSKUFamily) ToPtr() *ExpressRouteCircuitSKUFamily { - return &c -} - // ExpressRouteCircuitSKUTier - The tier of the SKU. type ExpressRouteCircuitSKUTier string @@ -1335,11 +1065,6 @@ func PossibleExpressRouteCircuitSKUTierValues() []ExpressRouteCircuitSKUTier { } } -// ToPtr returns a *ExpressRouteCircuitSKUTier pointing to the current value. -func (c ExpressRouteCircuitSKUTier) ToPtr() *ExpressRouteCircuitSKUTier { - return &c -} - // ExpressRouteLinkAdminState - Administrative state of the physical port. type ExpressRouteLinkAdminState string @@ -1356,11 +1081,6 @@ func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState { } } -// ToPtr returns a *ExpressRouteLinkAdminState pointing to the current value. -func (c ExpressRouteLinkAdminState) ToPtr() *ExpressRouteLinkAdminState { - return &c -} - // ExpressRouteLinkConnectorType - Physical fiber port type. type ExpressRouteLinkConnectorType string @@ -1377,11 +1097,6 @@ func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorTy } } -// ToPtr returns a *ExpressRouteLinkConnectorType pointing to the current value. -func (c ExpressRouteLinkConnectorType) ToPtr() *ExpressRouteLinkConnectorType { - return &c -} - // ExpressRouteLinkMacSecCipher - Mac security cipher. type ExpressRouteLinkMacSecCipher string @@ -1402,11 +1117,6 @@ func PossibleExpressRouteLinkMacSecCipherValues() []ExpressRouteLinkMacSecCipher } } -// ToPtr returns a *ExpressRouteLinkMacSecCipher pointing to the current value. -func (c ExpressRouteLinkMacSecCipher) ToPtr() *ExpressRouteLinkMacSecCipher { - return &c -} - // ExpressRouteLinkMacSecSciState - Sci mode enabled/disabled. type ExpressRouteLinkMacSecSciState string @@ -1423,11 +1133,6 @@ func PossibleExpressRouteLinkMacSecSciStateValues() []ExpressRouteLinkMacSecSciS } } -// ToPtr returns a *ExpressRouteLinkMacSecSciState pointing to the current value. -func (c ExpressRouteLinkMacSecSciState) ToPtr() *ExpressRouteLinkMacSecSciState { - return &c -} - // ExpressRoutePeeringState - The state of peering. type ExpressRoutePeeringState string @@ -1444,11 +1149,6 @@ func PossibleExpressRoutePeeringStateValues() []ExpressRoutePeeringState { } } -// ToPtr returns a *ExpressRoutePeeringState pointing to the current value. -func (c ExpressRoutePeeringState) ToPtr() *ExpressRoutePeeringState { - return &c -} - // ExpressRoutePeeringType - The peering type. type ExpressRoutePeeringType string @@ -1467,11 +1167,6 @@ func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType { } } -// ToPtr returns a *ExpressRoutePeeringType pointing to the current value. -func (c ExpressRoutePeeringType) ToPtr() *ExpressRoutePeeringType { - return &c -} - // ExpressRoutePortsEncapsulation - Encapsulation method on physical ports. type ExpressRoutePortsEncapsulation string @@ -1488,11 +1183,6 @@ func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsula } } -// ToPtr returns a *ExpressRoutePortsEncapsulation pointing to the current value. -func (c ExpressRoutePortsEncapsulation) ToPtr() *ExpressRoutePortsEncapsulation { - return &c -} - // ExtendedLocationTypes - The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network // resources. type ExtendedLocationTypes string @@ -1508,11 +1198,6 @@ func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { } } -// ToPtr returns a *ExtendedLocationTypes pointing to the current value. -func (c ExtendedLocationTypes) ToPtr() *ExtendedLocationTypes { - return &c -} - // FirewallPolicyFilterRuleCollectionActionType - The action type of a rule. type FirewallPolicyFilterRuleCollectionActionType string @@ -1529,11 +1214,6 @@ func PossibleFirewallPolicyFilterRuleCollectionActionTypeValues() []FirewallPoli } } -// ToPtr returns a *FirewallPolicyFilterRuleCollectionActionType pointing to the current value. -func (c FirewallPolicyFilterRuleCollectionActionType) ToPtr() *FirewallPolicyFilterRuleCollectionActionType { - return &c -} - // FirewallPolicyIntrusionDetectionProtocol - Possible intrusion detection bypass traffic protocols. type FirewallPolicyIntrusionDetectionProtocol string @@ -1554,11 +1234,6 @@ func PossibleFirewallPolicyIntrusionDetectionProtocolValues() []FirewallPolicyIn } } -// ToPtr returns a *FirewallPolicyIntrusionDetectionProtocol pointing to the current value. -func (c FirewallPolicyIntrusionDetectionProtocol) ToPtr() *FirewallPolicyIntrusionDetectionProtocol { - return &c -} - // FirewallPolicyIntrusionDetectionStateType - Possible state values. type FirewallPolicyIntrusionDetectionStateType string @@ -1577,11 +1252,6 @@ func PossibleFirewallPolicyIntrusionDetectionStateTypeValues() []FirewallPolicyI } } -// ToPtr returns a *FirewallPolicyIntrusionDetectionStateType pointing to the current value. -func (c FirewallPolicyIntrusionDetectionStateType) ToPtr() *FirewallPolicyIntrusionDetectionStateType { - return &c -} - // FirewallPolicyNatRuleCollectionActionType - The action type of a rule. type FirewallPolicyNatRuleCollectionActionType string @@ -1596,11 +1266,6 @@ func PossibleFirewallPolicyNatRuleCollectionActionTypeValues() []FirewallPolicyN } } -// ToPtr returns a *FirewallPolicyNatRuleCollectionActionType pointing to the current value. -func (c FirewallPolicyNatRuleCollectionActionType) ToPtr() *FirewallPolicyNatRuleCollectionActionType { - return &c -} - // FirewallPolicyRuleApplicationProtocolType - The application protocol type of a Rule. type FirewallPolicyRuleApplicationProtocolType string @@ -1617,11 +1282,6 @@ func PossibleFirewallPolicyRuleApplicationProtocolTypeValues() []FirewallPolicyR } } -// ToPtr returns a *FirewallPolicyRuleApplicationProtocolType pointing to the current value. -func (c FirewallPolicyRuleApplicationProtocolType) ToPtr() *FirewallPolicyRuleApplicationProtocolType { - return &c -} - // FirewallPolicyRuleCollectionType - The type of the rule collection. type FirewallPolicyRuleCollectionType string @@ -1638,11 +1298,6 @@ func PossibleFirewallPolicyRuleCollectionTypeValues() []FirewallPolicyRuleCollec } } -// ToPtr returns a *FirewallPolicyRuleCollectionType pointing to the current value. -func (c FirewallPolicyRuleCollectionType) ToPtr() *FirewallPolicyRuleCollectionType { - return &c -} - // FirewallPolicyRuleNetworkProtocol - The Network protocol of a Rule. type FirewallPolicyRuleNetworkProtocol string @@ -1663,11 +1318,6 @@ func PossibleFirewallPolicyRuleNetworkProtocolValues() []FirewallPolicyRuleNetwo } } -// ToPtr returns a *FirewallPolicyRuleNetworkProtocol pointing to the current value. -func (c FirewallPolicyRuleNetworkProtocol) ToPtr() *FirewallPolicyRuleNetworkProtocol { - return &c -} - // FirewallPolicyRuleType - Rule Type. type FirewallPolicyRuleType string @@ -1686,11 +1336,6 @@ func PossibleFirewallPolicyRuleTypeValues() []FirewallPolicyRuleType { } } -// ToPtr returns a *FirewallPolicyRuleType pointing to the current value. -func (c FirewallPolicyRuleType) ToPtr() *FirewallPolicyRuleType { - return &c -} - // FirewallPolicySKUTier - Tier of Firewall Policy. type FirewallPolicySKUTier string @@ -1709,11 +1354,6 @@ func PossibleFirewallPolicySKUTierValues() []FirewallPolicySKUTier { } } -// ToPtr returns a *FirewallPolicySKUTier pointing to the current value. -func (c FirewallPolicySKUTier) ToPtr() *FirewallPolicySKUTier { - return &c -} - // FlowLogFormatType - The file type of flow log. type FlowLogFormatType string @@ -1728,11 +1368,6 @@ func PossibleFlowLogFormatTypeValues() []FlowLogFormatType { } } -// ToPtr returns a *FlowLogFormatType pointing to the current value. -func (c FlowLogFormatType) ToPtr() *FlowLogFormatType { - return &c -} - // GatewayLoadBalancerTunnelInterfaceType - Traffic type of gateway load balancer tunnel interface. type GatewayLoadBalancerTunnelInterfaceType string @@ -1751,11 +1386,6 @@ func PossibleGatewayLoadBalancerTunnelInterfaceTypeValues() []GatewayLoadBalance } } -// ToPtr returns a *GatewayLoadBalancerTunnelInterfaceType pointing to the current value. -func (c GatewayLoadBalancerTunnelInterfaceType) ToPtr() *GatewayLoadBalancerTunnelInterfaceType { - return &c -} - // GatewayLoadBalancerTunnelProtocol - Protocol of gateway load balancer tunnel interface. type GatewayLoadBalancerTunnelProtocol string @@ -1774,11 +1404,6 @@ func PossibleGatewayLoadBalancerTunnelProtocolValues() []GatewayLoadBalancerTunn } } -// ToPtr returns a *GatewayLoadBalancerTunnelProtocol pointing to the current value. -func (c GatewayLoadBalancerTunnelProtocol) ToPtr() *GatewayLoadBalancerTunnelProtocol { - return &c -} - // HTTPConfigurationMethod - The HTTP method to use. type HTTPConfigurationMethod string @@ -1795,11 +1420,6 @@ func PossibleHTTPConfigurationMethodValues() []HTTPConfigurationMethod { } } -// ToPtr returns a *HTTPConfigurationMethod pointing to the current value. -func (c HTTPConfigurationMethod) ToPtr() *HTTPConfigurationMethod { - return &c -} - // HTTPMethod - HTTP method. type HTTPMethod string @@ -1814,11 +1434,6 @@ func PossibleHTTPMethodValues() []HTTPMethod { } } -// ToPtr returns a *HTTPMethod pointing to the current value. -func (c HTTPMethod) ToPtr() *HTTPMethod { - return &c -} - // HubBgpConnectionStatus - The current state of the VirtualHub to Peer. type HubBgpConnectionStatus string @@ -1839,11 +1454,6 @@ func PossibleHubBgpConnectionStatusValues() []HubBgpConnectionStatus { } } -// ToPtr returns a *HubBgpConnectionStatus pointing to the current value. -func (c HubBgpConnectionStatus) ToPtr() *HubBgpConnectionStatus { - return &c -} - // HubVirtualNetworkConnectionStatus - The current state of the VirtualHub to vnet connection. type HubVirtualNetworkConnectionStatus string @@ -1864,11 +1474,6 @@ func PossibleHubVirtualNetworkConnectionStatusValues() []HubVirtualNetworkConnec } } -// ToPtr returns a *HubVirtualNetworkConnectionStatus pointing to the current value. -func (c HubVirtualNetworkConnectionStatus) ToPtr() *HubVirtualNetworkConnectionStatus { - return &c -} - // IPAllocationMethod - IP address allocation method. type IPAllocationMethod string @@ -1885,11 +1490,6 @@ func PossibleIPAllocationMethodValues() []IPAllocationMethod { } } -// ToPtr returns a *IPAllocationMethod pointing to the current value. -func (c IPAllocationMethod) ToPtr() *IPAllocationMethod { - return &c -} - // IPAllocationType - IpAllocation type. type IPAllocationType string @@ -1906,11 +1506,6 @@ func PossibleIPAllocationTypeValues() []IPAllocationType { } } -// ToPtr returns a *IPAllocationType pointing to the current value. -func (c IPAllocationType) ToPtr() *IPAllocationType { - return &c -} - // IPFlowProtocol - Protocol to be verified on. type IPFlowProtocol string @@ -1927,11 +1522,6 @@ func PossibleIPFlowProtocolValues() []IPFlowProtocol { } } -// ToPtr returns a *IPFlowProtocol pointing to the current value. -func (c IPFlowProtocol) ToPtr() *IPFlowProtocol { - return &c -} - // IPSecEncryption - The IPSec encryption algorithm (IKE phase 1). type IPSecEncryption string @@ -1962,11 +1552,6 @@ func PossibleIPSecEncryptionValues() []IPSecEncryption { } } -// ToPtr returns a *IPSecEncryption pointing to the current value. -func (c IPSecEncryption) ToPtr() *IPSecEncryption { - return &c -} - // IPSecIntegrity - The IPSec integrity algorithm (IKE phase 1). type IPSecIntegrity string @@ -1991,11 +1576,6 @@ func PossibleIPSecIntegrityValues() []IPSecIntegrity { } } -// ToPtr returns a *IPSecIntegrity pointing to the current value. -func (c IPSecIntegrity) ToPtr() *IPSecIntegrity { - return &c -} - // IPVersion - IP address version. type IPVersion string @@ -2012,11 +1592,6 @@ func PossibleIPVersionValues() []IPVersion { } } -// ToPtr returns a *IPVersion pointing to the current value. -func (c IPVersion) ToPtr() *IPVersion { - return &c -} - // IkeEncryption - The IKE encryption algorithm (IKE phase 2). type IkeEncryption string @@ -2043,11 +1618,6 @@ func PossibleIkeEncryptionValues() []IkeEncryption { } } -// ToPtr returns a *IkeEncryption pointing to the current value. -func (c IkeEncryption) ToPtr() *IkeEncryption { - return &c -} - // IkeIntegrity - The IKE integrity algorithm (IKE phase 2). type IkeIntegrity string @@ -2072,11 +1642,6 @@ func PossibleIkeIntegrityValues() []IkeIntegrity { } } -// ToPtr returns a *IkeIntegrity pointing to the current value. -func (c IkeIntegrity) ToPtr() *IkeIntegrity { - return &c -} - // InboundSecurityRulesProtocol - Protocol. This should be either TCP or UDP. type InboundSecurityRulesProtocol string @@ -2093,11 +1658,6 @@ func PossibleInboundSecurityRulesProtocolValues() []InboundSecurityRulesProtocol } } -// ToPtr returns a *InboundSecurityRulesProtocol pointing to the current value. -func (c InboundSecurityRulesProtocol) ToPtr() *InboundSecurityRulesProtocol { - return &c -} - // IssueType - The type of issue. type IssueType string @@ -2128,11 +1688,6 @@ func PossibleIssueTypeValues() []IssueType { } } -// ToPtr returns a *IssueType pointing to the current value. -func (c IssueType) ToPtr() *IssueType { - return &c -} - // LoadBalancerOutboundRuleProtocol - The protocol for the outbound rule in load balancer. type LoadBalancerOutboundRuleProtocol string @@ -2151,11 +1706,6 @@ func PossibleLoadBalancerOutboundRuleProtocolValues() []LoadBalancerOutboundRule } } -// ToPtr returns a *LoadBalancerOutboundRuleProtocol pointing to the current value. -func (c LoadBalancerOutboundRuleProtocol) ToPtr() *LoadBalancerOutboundRuleProtocol { - return &c -} - // LoadBalancerSKUName - Name of a load balancer SKU. type LoadBalancerSKUName string @@ -2174,11 +1724,6 @@ func PossibleLoadBalancerSKUNameValues() []LoadBalancerSKUName { } } -// ToPtr returns a *LoadBalancerSKUName pointing to the current value. -func (c LoadBalancerSKUName) ToPtr() *LoadBalancerSKUName { - return &c -} - // LoadBalancerSKUTier - Tier of a load balancer SKU. type LoadBalancerSKUTier string @@ -2195,11 +1740,6 @@ func PossibleLoadBalancerSKUTierValues() []LoadBalancerSKUTier { } } -// ToPtr returns a *LoadBalancerSKUTier pointing to the current value. -func (c LoadBalancerSKUTier) ToPtr() *LoadBalancerSKUTier { - return &c -} - // LoadDistribution - The load distribution policy for this rule. type LoadDistribution string @@ -2218,11 +1758,6 @@ func PossibleLoadDistributionValues() []LoadDistribution { } } -// ToPtr returns a *LoadDistribution pointing to the current value. -func (c LoadDistribution) ToPtr() *LoadDistribution { - return &c -} - // ManagedRuleEnabledState - The state of the managed rule. Defaults to Disabled if not specified. type ManagedRuleEnabledState string @@ -2237,11 +1772,6 @@ func PossibleManagedRuleEnabledStateValues() []ManagedRuleEnabledState { } } -// ToPtr returns a *ManagedRuleEnabledState pointing to the current value. -func (c ManagedRuleEnabledState) ToPtr() *ManagedRuleEnabledState { - return &c -} - // NatGatewaySKUName - Name of Nat Gateway SKU. type NatGatewaySKUName string @@ -2256,11 +1786,6 @@ func PossibleNatGatewaySKUNameValues() []NatGatewaySKUName { } } -// ToPtr returns a *NatGatewaySKUName pointing to the current value. -func (c NatGatewaySKUName) ToPtr() *NatGatewaySKUName { - return &c -} - // NetworkInterfaceMigrationPhase - Migration phase of Network Interface resource. type NetworkInterfaceMigrationPhase string @@ -2283,11 +1808,6 @@ func PossibleNetworkInterfaceMigrationPhaseValues() []NetworkInterfaceMigrationP } } -// ToPtr returns a *NetworkInterfaceMigrationPhase pointing to the current value. -func (c NetworkInterfaceMigrationPhase) ToPtr() *NetworkInterfaceMigrationPhase { - return &c -} - // NetworkInterfaceNicType - Type of Network Interface resource. type NetworkInterfaceNicType string @@ -2304,11 +1824,6 @@ func PossibleNetworkInterfaceNicTypeValues() []NetworkInterfaceNicType { } } -// ToPtr returns a *NetworkInterfaceNicType pointing to the current value. -func (c NetworkInterfaceNicType) ToPtr() *NetworkInterfaceNicType { - return &c -} - // NetworkOperationStatus - Status of the Azure async operation. type NetworkOperationStatus string @@ -2327,11 +1842,6 @@ func PossibleNetworkOperationStatusValues() []NetworkOperationStatus { } } -// ToPtr returns a *NetworkOperationStatus pointing to the current value. -func (c NetworkOperationStatus) ToPtr() *NetworkOperationStatus { - return &c -} - // NextHopType - Next hop type. type NextHopType string @@ -2356,11 +1866,6 @@ func PossibleNextHopTypeValues() []NextHopType { } } -// ToPtr returns a *NextHopType pointing to the current value. -func (c NextHopType) ToPtr() *NextHopType { - return &c -} - // OfficeTrafficCategory - The office traffic category. type OfficeTrafficCategory string @@ -2381,11 +1886,6 @@ func PossibleOfficeTrafficCategoryValues() []OfficeTrafficCategory { } } -// ToPtr returns a *OfficeTrafficCategory pointing to the current value. -func (c OfficeTrafficCategory) ToPtr() *OfficeTrafficCategory { - return &c -} - // OrderByOrder - Describes if results should be in ascending/descending order type OrderByOrder string @@ -2402,11 +1902,6 @@ func PossibleOrderByOrderValues() []OrderByOrder { } } -// ToPtr returns a *OrderByOrder pointing to the current value. -func (c OrderByOrder) ToPtr() *OrderByOrder { - return &c -} - // Origin - The origin of the issue. type Origin string @@ -2425,11 +1920,6 @@ func PossibleOriginValues() []Origin { } } -// ToPtr returns a *Origin pointing to the current value. -func (c Origin) ToPtr() *Origin { - return &c -} - // OutputType - Connection monitor output destination type. Currently, only "Workspace" is supported. type OutputType string @@ -2444,11 +1934,6 @@ func PossibleOutputTypeValues() []OutputType { } } -// ToPtr returns a *OutputType pointing to the current value. -func (c OutputType) ToPtr() *OutputType { - return &c -} - // OwaspCrsExclusionEntryMatchVariable - The variable to be excluded. type OwaspCrsExclusionEntryMatchVariable string @@ -2479,11 +1964,6 @@ func PossibleOwaspCrsExclusionEntryMatchVariableValues() []OwaspCrsExclusionEntr } } -// ToPtr returns a *OwaspCrsExclusionEntryMatchVariable pointing to the current value. -func (c OwaspCrsExclusionEntryMatchVariable) ToPtr() *OwaspCrsExclusionEntryMatchVariable { - return &c -} - // OwaspCrsExclusionEntrySelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which // elements in the collection this exclusion applies to. type OwaspCrsExclusionEntrySelectorMatchOperator string @@ -2507,11 +1987,6 @@ func PossibleOwaspCrsExclusionEntrySelectorMatchOperatorValues() []OwaspCrsExclu } } -// ToPtr returns a *OwaspCrsExclusionEntrySelectorMatchOperator pointing to the current value. -func (c OwaspCrsExclusionEntrySelectorMatchOperator) ToPtr() *OwaspCrsExclusionEntrySelectorMatchOperator { - return &c -} - type PcError string const ( @@ -2533,11 +2008,6 @@ func PossiblePcErrorValues() []PcError { } } -// ToPtr returns a *PcError pointing to the current value. -func (c PcError) ToPtr() *PcError { - return &c -} - // PcProtocol - Protocol to be filtered on. type PcProtocol string @@ -2556,11 +2026,6 @@ func PossiblePcProtocolValues() []PcProtocol { } } -// ToPtr returns a *PcProtocol pointing to the current value. -func (c PcProtocol) ToPtr() *PcProtocol { - return &c -} - // PcStatus - The status of the packet capture session. type PcStatus string @@ -2583,11 +2048,6 @@ func PossiblePcStatusValues() []PcStatus { } } -// ToPtr returns a *PcStatus pointing to the current value. -func (c PcStatus) ToPtr() *PcStatus { - return &c -} - // PfsGroup - The Pfs Groups used in IKE Phase 2 for new child SA. type PfsGroup string @@ -2618,11 +2078,6 @@ func PossiblePfsGroupValues() []PfsGroup { } } -// ToPtr returns a *PfsGroup pointing to the current value. -func (c PfsGroup) ToPtr() *PfsGroup { - return &c -} - // PreferredIPVersion - The preferred IP version to use in test evaluation. The connection monitor may choose to use a different // version depending on other parameters. type PreferredIPVersion string @@ -2640,11 +2095,6 @@ func PossiblePreferredIPVersionValues() []PreferredIPVersion { } } -// ToPtr returns a *PreferredIPVersion pointing to the current value. -func (c PreferredIPVersion) ToPtr() *PreferredIPVersion { - return &c -} - // PreferredRoutingGateway - The preferred routing gateway types type PreferredRoutingGateway string @@ -2663,11 +2113,6 @@ func PossiblePreferredRoutingGatewayValues() []PreferredRoutingGateway { } } -// ToPtr returns a *PreferredRoutingGateway pointing to the current value. -func (c PreferredRoutingGateway) ToPtr() *PreferredRoutingGateway { - return &c -} - // ProbeProtocol - 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 // for the probe to be successful. @@ -2688,11 +2133,6 @@ func PossibleProbeProtocolValues() []ProbeProtocol { } } -// ToPtr returns a *ProbeProtocol pointing to the current value. -func (c ProbeProtocol) ToPtr() *ProbeProtocol { - return &c -} - // ProcessorArchitecture - VPN client Processor Architecture. type ProcessorArchitecture string @@ -2709,11 +2149,6 @@ func PossibleProcessorArchitectureValues() []ProcessorArchitecture { } } -// ToPtr returns a *ProcessorArchitecture pointing to the current value. -func (c ProcessorArchitecture) ToPtr() *ProcessorArchitecture { - return &c -} - // Protocol - Network protocol. type Protocol string @@ -2734,11 +2169,6 @@ func PossibleProtocolValues() []Protocol { } } -// ToPtr returns a *Protocol pointing to the current value. -func (c Protocol) ToPtr() *Protocol { - return &c -} - // ProtocolType - RNM supported protocol types. type ProtocolType string @@ -2769,11 +2199,6 @@ func PossibleProtocolTypeValues() []ProtocolType { } } -// ToPtr returns a *ProtocolType pointing to the current value. -func (c ProtocolType) ToPtr() *ProtocolType { - return &c -} - // ProvisioningState - The current provisioning state. type ProvisioningState string @@ -2794,11 +2219,6 @@ func PossibleProvisioningStateValues() []ProvisioningState { } } -// ToPtr returns a *ProvisioningState pointing to the current value. -func (c ProvisioningState) ToPtr() *ProvisioningState { - return &c -} - // PublicIPAddressMigrationPhase - Migration phase of Public IP Address. type PublicIPAddressMigrationPhase string @@ -2821,11 +2241,6 @@ func PossiblePublicIPAddressMigrationPhaseValues() []PublicIPAddressMigrationPha } } -// ToPtr returns a *PublicIPAddressMigrationPhase pointing to the current value. -func (c PublicIPAddressMigrationPhase) ToPtr() *PublicIPAddressMigrationPhase { - return &c -} - // PublicIPAddressSKUName - Name of a public IP address SKU. type PublicIPAddressSKUName string @@ -2842,11 +2257,6 @@ func PossiblePublicIPAddressSKUNameValues() []PublicIPAddressSKUName { } } -// ToPtr returns a *PublicIPAddressSKUName pointing to the current value. -func (c PublicIPAddressSKUName) ToPtr() *PublicIPAddressSKUName { - return &c -} - // PublicIPAddressSKUTier - Tier of a public IP address SKU. type PublicIPAddressSKUTier string @@ -2863,11 +2273,6 @@ func PossiblePublicIPAddressSKUTierValues() []PublicIPAddressSKUTier { } } -// ToPtr returns a *PublicIPAddressSKUTier pointing to the current value. -func (c PublicIPAddressSKUTier) ToPtr() *PublicIPAddressSKUTier { - return &c -} - // PublicIPPrefixSKUName - Name of a public IP prefix SKU. type PublicIPPrefixSKUName string @@ -2882,11 +2287,6 @@ func PossiblePublicIPPrefixSKUNameValues() []PublicIPPrefixSKUName { } } -// ToPtr returns a *PublicIPPrefixSKUName pointing to the current value. -func (c PublicIPPrefixSKUName) ToPtr() *PublicIPPrefixSKUName { - return &c -} - // PublicIPPrefixSKUTier - Tier of a public IP prefix SKU. type PublicIPPrefixSKUTier string @@ -2903,11 +2303,6 @@ func PossiblePublicIPPrefixSKUTierValues() []PublicIPPrefixSKUTier { } } -// ToPtr returns a *PublicIPPrefixSKUTier pointing to the current value. -func (c PublicIPPrefixSKUTier) ToPtr() *PublicIPPrefixSKUTier { - return &c -} - // ResourceIdentityType - The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both // an implicitly created identity and a set of user assigned identities. The type 'None' will remove any // identities from the virtual machine. @@ -2930,11 +2325,6 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { } } -// ToPtr returns a *ResourceIdentityType pointing to the current value. -func (c ResourceIdentityType) ToPtr() *ResourceIdentityType { - return &c -} - // RouteFilterRuleType - The rule type of the rule. type RouteFilterRuleType string @@ -2949,11 +2339,6 @@ func PossibleRouteFilterRuleTypeValues() []RouteFilterRuleType { } } -// ToPtr returns a *RouteFilterRuleType pointing to the current value. -func (c RouteFilterRuleType) ToPtr() *RouteFilterRuleType { - return &c -} - // RouteNextHopType - The type of Azure hop the packet should be sent to. type RouteNextHopType string @@ -2976,11 +2361,6 @@ func PossibleRouteNextHopTypeValues() []RouteNextHopType { } } -// ToPtr returns a *RouteNextHopType pointing to the current value. -func (c RouteNextHopType) ToPtr() *RouteNextHopType { - return &c -} - // RoutingState - The current routing state of the VirtualHub. type RoutingState string @@ -3001,11 +2381,6 @@ func PossibleRoutingStateValues() []RoutingState { } } -// ToPtr returns a *RoutingState pointing to the current value. -func (c RoutingState) ToPtr() *RoutingState { - return &c -} - // SecurityPartnerProviderConnectionStatus - The current state of the connection with Security Partner Provider. type SecurityPartnerProviderConnectionStatus string @@ -3026,11 +2401,6 @@ func PossibleSecurityPartnerProviderConnectionStatusValues() []SecurityPartnerPr } } -// ToPtr returns a *SecurityPartnerProviderConnectionStatus pointing to the current value. -func (c SecurityPartnerProviderConnectionStatus) ToPtr() *SecurityPartnerProviderConnectionStatus { - return &c -} - // SecurityProviderName - The Security Providers. type SecurityProviderName string @@ -3049,11 +2419,6 @@ func PossibleSecurityProviderNameValues() []SecurityProviderName { } } -// ToPtr returns a *SecurityProviderName pointing to the current value. -func (c SecurityProviderName) ToPtr() *SecurityProviderName { - return &c -} - // SecurityRuleAccess - Whether network traffic is allowed or denied. type SecurityRuleAccess string @@ -3070,11 +2435,6 @@ func PossibleSecurityRuleAccessValues() []SecurityRuleAccess { } } -// ToPtr returns a *SecurityRuleAccess pointing to the current value. -func (c SecurityRuleAccess) ToPtr() *SecurityRuleAccess { - return &c -} - // SecurityRuleDirection - The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing // traffic. type SecurityRuleDirection string @@ -3092,11 +2452,6 @@ func PossibleSecurityRuleDirectionValues() []SecurityRuleDirection { } } -// ToPtr returns a *SecurityRuleDirection pointing to the current value. -func (c SecurityRuleDirection) ToPtr() *SecurityRuleDirection { - return &c -} - // SecurityRuleProtocol - Network protocol this rule applies to. type SecurityRuleProtocol string @@ -3121,11 +2476,6 @@ func PossibleSecurityRuleProtocolValues() []SecurityRuleProtocol { } } -// ToPtr returns a *SecurityRuleProtocol pointing to the current value. -func (c SecurityRuleProtocol) ToPtr() *SecurityRuleProtocol { - return &c -} - // ServiceProviderProvisioningState - The ServiceProviderProvisioningState state of the resource. type ServiceProviderProvisioningState string @@ -3146,11 +2496,6 @@ func PossibleServiceProviderProvisioningStateValues() []ServiceProviderProvision } } -// ToPtr returns a *ServiceProviderProvisioningState pointing to the current value. -func (c ServiceProviderProvisioningState) ToPtr() *ServiceProviderProvisioningState { - return &c -} - // Severity - The severity of the issue. type Severity string @@ -3167,11 +2512,6 @@ func PossibleSeverityValues() []Severity { } } -// ToPtr returns a *Severity pointing to the current value. -func (c Severity) ToPtr() *Severity { - return &c -} - // SingleQueryResultDirection - Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional type SingleQueryResultDirection int32 @@ -3190,11 +2530,6 @@ func PossibleSingleQueryResultDirectionValues() []SingleQueryResultDirection { } } -// ToPtr returns a *SingleQueryResultDirection pointing to the current value. -func (c SingleQueryResultDirection) ToPtr() *SingleQueryResultDirection { - return &c -} - // SingleQueryResultMode - The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny type SingleQueryResultMode int32 @@ -3213,11 +2548,6 @@ func PossibleSingleQueryResultModeValues() []SingleQueryResultMode { } } -// ToPtr returns a *SingleQueryResultMode pointing to the current value. -func (c SingleQueryResultMode) ToPtr() *SingleQueryResultMode { - return &c -} - // SingleQueryResultSeverity - Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High type SingleQueryResultSeverity int32 @@ -3236,11 +2566,6 @@ func PossibleSingleQueryResultSeverityValues() []SingleQueryResultSeverity { } } -// ToPtr returns a *SingleQueryResultSeverity pointing to the current value. -func (c SingleQueryResultSeverity) ToPtr() *SingleQueryResultSeverity { - return &c -} - type SyncRemoteAddressSpace string const ( @@ -3254,11 +2579,6 @@ func PossibleSyncRemoteAddressSpaceValues() []SyncRemoteAddressSpace { } } -// ToPtr returns a *SyncRemoteAddressSpace pointing to the current value. -func (c SyncRemoteAddressSpace) ToPtr() *SyncRemoteAddressSpace { - return &c -} - // TransportProtocol - The transport protocol for the endpoint. type TransportProtocol string @@ -3277,11 +2597,6 @@ func PossibleTransportProtocolValues() []TransportProtocol { } } -// ToPtr returns a *TransportProtocol pointing to the current value. -func (c TransportProtocol) ToPtr() *TransportProtocol { - return &c -} - // TunnelConnectionStatus - The current state of the tunnel. type TunnelConnectionStatus string @@ -3302,11 +2617,6 @@ func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus { } } -// ToPtr returns a *TunnelConnectionStatus pointing to the current value. -func (c TunnelConnectionStatus) ToPtr() *TunnelConnectionStatus { - return &c -} - // UsageUnit - An enum describing the unit of measurement. type UsageUnit string @@ -3321,11 +2631,6 @@ func PossibleUsageUnitValues() []UsageUnit { } } -// ToPtr returns a *UsageUnit pointing to the current value. -func (c UsageUnit) ToPtr() *UsageUnit { - return &c -} - // VPNAuthenticationType - VPN authentication types enabled for the virtual network gateway. type VPNAuthenticationType string @@ -3344,11 +2649,6 @@ func PossibleVPNAuthenticationTypeValues() []VPNAuthenticationType { } } -// ToPtr returns a *VPNAuthenticationType pointing to the current value. -func (c VPNAuthenticationType) ToPtr() *VPNAuthenticationType { - return &c -} - // VPNClientProtocol - VPN client protocol enabled for the virtual network gateway. type VPNClientProtocol string @@ -3367,11 +2667,6 @@ func PossibleVPNClientProtocolValues() []VPNClientProtocol { } } -// ToPtr returns a *VPNClientProtocol pointing to the current value. -func (c VPNClientProtocol) ToPtr() *VPNClientProtocol { - return &c -} - // VPNConnectionStatus - The current state of the vpn connection. type VPNConnectionStatus string @@ -3392,11 +2687,6 @@ func PossibleVPNConnectionStatusValues() []VPNConnectionStatus { } } -// ToPtr returns a *VPNConnectionStatus pointing to the current value. -func (c VPNConnectionStatus) ToPtr() *VPNConnectionStatus { - return &c -} - // VPNGatewayGeneration - The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. type VPNGatewayGeneration string @@ -3415,11 +2705,6 @@ func PossibleVPNGatewayGenerationValues() []VPNGatewayGeneration { } } -// ToPtr returns a *VPNGatewayGeneration pointing to the current value. -func (c VPNGatewayGeneration) ToPtr() *VPNGatewayGeneration { - return &c -} - // VPNGatewayTunnelingProtocol - VPN protocol enabled for the VpnServerConfiguration. type VPNGatewayTunnelingProtocol string @@ -3436,11 +2721,6 @@ func PossibleVPNGatewayTunnelingProtocolValues() []VPNGatewayTunnelingProtocol { } } -// ToPtr returns a *VPNGatewayTunnelingProtocol pointing to the current value. -func (c VPNGatewayTunnelingProtocol) ToPtr() *VPNGatewayTunnelingProtocol { - return &c -} - // VPNLinkConnectionMode - Vpn link connection mode. type VPNLinkConnectionMode string @@ -3459,11 +2739,6 @@ func PossibleVPNLinkConnectionModeValues() []VPNLinkConnectionMode { } } -// ToPtr returns a *VPNLinkConnectionMode pointing to the current value. -func (c VPNLinkConnectionMode) ToPtr() *VPNLinkConnectionMode { - return &c -} - // VPNNatRuleMode - The Source NAT direction of a VPN NAT. type VPNNatRuleMode string @@ -3480,11 +2755,6 @@ func PossibleVPNNatRuleModeValues() []VPNNatRuleMode { } } -// ToPtr returns a *VPNNatRuleMode pointing to the current value. -func (c VPNNatRuleMode) ToPtr() *VPNNatRuleMode { - return &c -} - // VPNNatRuleType - The type of NAT rule for VPN NAT. type VPNNatRuleType string @@ -3501,11 +2771,6 @@ func PossibleVPNNatRuleTypeValues() []VPNNatRuleType { } } -// ToPtr returns a *VPNNatRuleType pointing to the current value. -func (c VPNNatRuleType) ToPtr() *VPNNatRuleType { - return &c -} - // VPNType - The type of this virtual network gateway. type VPNType string @@ -3522,11 +2787,6 @@ func PossibleVPNTypeValues() []VPNType { } } -// ToPtr returns a *VPNType pointing to the current value. -func (c VPNType) ToPtr() *VPNType { - return &c -} - // VerbosityLevel - Verbosity level. type VerbosityLevel string @@ -3545,11 +2805,6 @@ func PossibleVerbosityLevelValues() []VerbosityLevel { } } -// ToPtr returns a *VerbosityLevel pointing to the current value. -func (c VerbosityLevel) ToPtr() *VerbosityLevel { - return &c -} - // VirtualNetworkEncryptionEnforcement - If the encrypted VNet allows VM that does not support encryption type VirtualNetworkEncryptionEnforcement string @@ -3566,11 +2821,6 @@ func PossibleVirtualNetworkEncryptionEnforcementValues() []VirtualNetworkEncrypt } } -// ToPtr returns a *VirtualNetworkEncryptionEnforcement pointing to the current value. -func (c VirtualNetworkEncryptionEnforcement) ToPtr() *VirtualNetworkEncryptionEnforcement { - return &c -} - // VirtualNetworkGatewayConnectionMode - Gateway connection type. type VirtualNetworkGatewayConnectionMode string @@ -3589,11 +2839,6 @@ func PossibleVirtualNetworkGatewayConnectionModeValues() []VirtualNetworkGateway } } -// ToPtr returns a *VirtualNetworkGatewayConnectionMode pointing to the current value. -func (c VirtualNetworkGatewayConnectionMode) ToPtr() *VirtualNetworkGatewayConnectionMode { - return &c -} - // VirtualNetworkGatewayConnectionProtocol - Gateway connection protocol. type VirtualNetworkGatewayConnectionProtocol string @@ -3610,11 +2855,6 @@ func PossibleVirtualNetworkGatewayConnectionProtocolValues() []VirtualNetworkGat } } -// ToPtr returns a *VirtualNetworkGatewayConnectionProtocol pointing to the current value. -func (c VirtualNetworkGatewayConnectionProtocol) ToPtr() *VirtualNetworkGatewayConnectionProtocol { - return &c -} - // VirtualNetworkGatewayConnectionStatus - Virtual Network Gateway connection status. type VirtualNetworkGatewayConnectionStatus string @@ -3635,11 +2875,6 @@ func PossibleVirtualNetworkGatewayConnectionStatusValues() []VirtualNetworkGatew } } -// ToPtr returns a *VirtualNetworkGatewayConnectionStatus pointing to the current value. -func (c VirtualNetworkGatewayConnectionStatus) ToPtr() *VirtualNetworkGatewayConnectionStatus { - return &c -} - // VirtualNetworkGatewayConnectionType - Gateway connection type. type VirtualNetworkGatewayConnectionType string @@ -3660,11 +2895,6 @@ func PossibleVirtualNetworkGatewayConnectionTypeValues() []VirtualNetworkGateway } } -// ToPtr returns a *VirtualNetworkGatewayConnectionType pointing to the current value. -func (c VirtualNetworkGatewayConnectionType) ToPtr() *VirtualNetworkGatewayConnectionType { - return &c -} - // VirtualNetworkGatewaySKUName - Gateway SKU name. type VirtualNetworkGatewaySKUName string @@ -3711,11 +2941,6 @@ func PossibleVirtualNetworkGatewaySKUNameValues() []VirtualNetworkGatewaySKUName } } -// ToPtr returns a *VirtualNetworkGatewaySKUName pointing to the current value. -func (c VirtualNetworkGatewaySKUName) ToPtr() *VirtualNetworkGatewaySKUName { - return &c -} - // VirtualNetworkGatewaySKUTier - Gateway SKU tier. type VirtualNetworkGatewaySKUTier string @@ -3762,11 +2987,6 @@ func PossibleVirtualNetworkGatewaySKUTierValues() []VirtualNetworkGatewaySKUTier } } -// ToPtr returns a *VirtualNetworkGatewaySKUTier pointing to the current value. -func (c VirtualNetworkGatewaySKUTier) ToPtr() *VirtualNetworkGatewaySKUTier { - return &c -} - // VirtualNetworkGatewayType - The type of this virtual network gateway. type VirtualNetworkGatewayType string @@ -3785,11 +3005,6 @@ func PossibleVirtualNetworkGatewayTypeValues() []VirtualNetworkGatewayType { } } -// ToPtr returns a *VirtualNetworkGatewayType pointing to the current value. -func (c VirtualNetworkGatewayType) ToPtr() *VirtualNetworkGatewayType { - return &c -} - // VirtualNetworkPeeringLevel - The peering sync status of the virtual network peering. type VirtualNetworkPeeringLevel string @@ -3810,11 +3025,6 @@ func PossibleVirtualNetworkPeeringLevelValues() []VirtualNetworkPeeringLevel { } } -// ToPtr returns a *VirtualNetworkPeeringLevel pointing to the current value. -func (c VirtualNetworkPeeringLevel) ToPtr() *VirtualNetworkPeeringLevel { - return &c -} - // VirtualNetworkPeeringState - The status of the virtual network peering. type VirtualNetworkPeeringState string @@ -3833,11 +3043,6 @@ func PossibleVirtualNetworkPeeringStateValues() []VirtualNetworkPeeringState { } } -// ToPtr returns a *VirtualNetworkPeeringState pointing to the current value. -func (c VirtualNetworkPeeringState) ToPtr() *VirtualNetworkPeeringState { - return &c -} - // VirtualNetworkPrivateEndpointNetworkPolicies - Enable or Disable apply network policies on private end point in the subnet. type VirtualNetworkPrivateEndpointNetworkPolicies string @@ -3854,11 +3059,6 @@ func PossibleVirtualNetworkPrivateEndpointNetworkPoliciesValues() []VirtualNetwo } } -// ToPtr returns a *VirtualNetworkPrivateEndpointNetworkPolicies pointing to the current value. -func (c VirtualNetworkPrivateEndpointNetworkPolicies) ToPtr() *VirtualNetworkPrivateEndpointNetworkPolicies { - return &c -} - // VirtualNetworkPrivateLinkServiceNetworkPolicies - Enable or Disable apply network policies on private link service in the // subnet. type VirtualNetworkPrivateLinkServiceNetworkPolicies string @@ -3876,11 +3076,6 @@ func PossibleVirtualNetworkPrivateLinkServiceNetworkPoliciesValues() []VirtualNe } } -// ToPtr returns a *VirtualNetworkPrivateLinkServiceNetworkPolicies pointing to the current value. -func (c VirtualNetworkPrivateLinkServiceNetworkPolicies) ToPtr() *VirtualNetworkPrivateLinkServiceNetworkPolicies { - return &c -} - // VirtualWanSecurityProviderType - The virtual wan security provider type. type VirtualWanSecurityProviderType string @@ -3897,11 +3092,6 @@ func PossibleVirtualWanSecurityProviderTypeValues() []VirtualWanSecurityProvider } } -// ToPtr returns a *VirtualWanSecurityProviderType pointing to the current value. -func (c VirtualWanSecurityProviderType) ToPtr() *VirtualWanSecurityProviderType { - return &c -} - // WebApplicationFirewallAction - Type of Actions. type WebApplicationFirewallAction string @@ -3920,11 +3110,6 @@ func PossibleWebApplicationFirewallActionValues() []WebApplicationFirewallAction } } -// ToPtr returns a *WebApplicationFirewallAction pointing to the current value. -func (c WebApplicationFirewallAction) ToPtr() *WebApplicationFirewallAction { - return &c -} - // WebApplicationFirewallEnabledState - The state of the policy. type WebApplicationFirewallEnabledState string @@ -3941,11 +3126,6 @@ func PossibleWebApplicationFirewallEnabledStateValues() []WebApplicationFirewall } } -// ToPtr returns a *WebApplicationFirewallEnabledState pointing to the current value. -func (c WebApplicationFirewallEnabledState) ToPtr() *WebApplicationFirewallEnabledState { - return &c -} - // WebApplicationFirewallMatchVariable - Match Variable. type WebApplicationFirewallMatchVariable string @@ -3974,11 +3154,6 @@ func PossibleWebApplicationFirewallMatchVariableValues() []WebApplicationFirewal } } -// ToPtr returns a *WebApplicationFirewallMatchVariable pointing to the current value. -func (c WebApplicationFirewallMatchVariable) ToPtr() *WebApplicationFirewallMatchVariable { - return &c -} - // WebApplicationFirewallMode - The mode of the policy. type WebApplicationFirewallMode string @@ -3995,11 +3170,6 @@ func PossibleWebApplicationFirewallModeValues() []WebApplicationFirewallMode { } } -// ToPtr returns a *WebApplicationFirewallMode pointing to the current value. -func (c WebApplicationFirewallMode) ToPtr() *WebApplicationFirewallMode { - return &c -} - // WebApplicationFirewallOperator - The operator to be matched. type WebApplicationFirewallOperator string @@ -4034,11 +3204,6 @@ func PossibleWebApplicationFirewallOperatorValues() []WebApplicationFirewallOper } } -// ToPtr returns a *WebApplicationFirewallOperator pointing to the current value. -func (c WebApplicationFirewallOperator) ToPtr() *WebApplicationFirewallOperator { - return &c -} - // WebApplicationFirewallPolicyResourceState - Resource status of the policy. type WebApplicationFirewallPolicyResourceState string @@ -4063,11 +3228,6 @@ func PossibleWebApplicationFirewallPolicyResourceStateValues() []WebApplicationF } } -// ToPtr returns a *WebApplicationFirewallPolicyResourceState pointing to the current value. -func (c WebApplicationFirewallPolicyResourceState) ToPtr() *WebApplicationFirewallPolicyResourceState { - return &c -} - // WebApplicationFirewallRuleType - The rule type. type WebApplicationFirewallRuleType string @@ -4084,11 +3244,6 @@ func PossibleWebApplicationFirewallRuleTypeValues() []WebApplicationFirewallRule } } -// ToPtr returns a *WebApplicationFirewallRuleType pointing to the current value. -func (c WebApplicationFirewallRuleType) ToPtr() *WebApplicationFirewallRuleType { - return &c -} - // WebApplicationFirewallTransform - Transforms applied before matching. type WebApplicationFirewallTransform string @@ -4112,8 +3267,3 @@ func PossibleWebApplicationFirewallTransformValues() []WebApplicationFirewallTra WebApplicationFirewallTransformURLEncode, } } - -// ToPtr returns a *WebApplicationFirewallTransform pointing to the current value. -func (c WebApplicationFirewallTransform) ToPtr() *WebApplicationFirewallTransform { - return &c -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go index 41b9a21cf89d..b75c5c7b4fc6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_customipprefixes_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type CustomIPPrefixesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *CustomIPPrefixesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CustomIPPrefixesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &CustomIPPrefixesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a custom IP prefix. @@ -57,22 +62,18 @@ func NewCustomIPPrefixesClient(subscriptionID string, credential azcore.TokenCre // parameters - Parameters supplied to the create or update custom IP prefix operation. // options - CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate // method. -func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (CustomIPPrefixesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, customIPPrefixName, parameters, options) - if err != nil { - return CustomIPPrefixesClientCreateOrUpdatePollerResponse{}, err - } - result := CustomIPPrefixesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *CustomIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, customIPPrefixName string, parameters CustomIPPrefix, options *CustomIPPrefixesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[CustomIPPrefixesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, customIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[CustomIPPrefixesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[CustomIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("CustomIPPrefixesClient.CreateOrUpdate", "location", resp, client.pl) - if err != nil { - return CustomIPPrefixesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &CustomIPPrefixesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a custom IP prefix. @@ -124,22 +125,18 @@ func (client *CustomIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co // customIPPrefixName - The name of the CustomIpPrefix. // options - CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete // method. -func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (CustomIPPrefixesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, customIPPrefixName, options) - if err != nil { - return CustomIPPrefixesClientDeletePollerResponse{}, err - } - result := CustomIPPrefixesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("CustomIPPrefixesClient.Delete", "location", resp, client.pl) - if err != nil { - return CustomIPPrefixesClientDeletePollerResponse{}, err +func (client *CustomIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, customIPPrefixName string, options *CustomIPPrefixesClientBeginDeleteOptions) (*armruntime.Poller[CustomIPPrefixesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, customIPPrefixName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[CustomIPPrefixesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[CustomIPPrefixesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &CustomIPPrefixesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified custom IP prefix. @@ -236,7 +233,7 @@ func (client *CustomIPPrefixesClient) getCreateRequest(ctx context.Context, reso // getHandleResponse handles the Get response. func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (CustomIPPrefixesClientGetResponse, error) { - result := CustomIPPrefixesClientGetResponse{RawResponse: resp} + result := CustomIPPrefixesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { return CustomIPPrefixesClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *CustomIPPrefixesClient) getHandleResponse(resp *http.Response) (Cu // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - CustomIPPrefixesClientListOptions contains the optional parameters for the CustomIPPrefixesClient.List method. -func (client *CustomIPPrefixesClient) List(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *CustomIPPrefixesClientListPager { - return &CustomIPPrefixesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *CustomIPPrefixesClient) List(resourceGroupName string, options *CustomIPPrefixesClientListOptions) *runtime.Pager[CustomIPPrefixesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[CustomIPPrefixesClientListResponse]{ + More: func(page CustomIPPrefixesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp CustomIPPrefixesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.CustomIPPrefixListResult.NextLink) + Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListResponse) (CustomIPPrefixesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return CustomIPPrefixesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return CustomIPPrefixesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return CustomIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *CustomIPPrefixesClient) listCreateRequest(ctx context.Context, res // listHandleResponse handles the List response. func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (CustomIPPrefixesClientListResponse, error) { - result := CustomIPPrefixesClientListResponse{RawResponse: resp} + result := CustomIPPrefixesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { return CustomIPPrefixesClientListResponse{}, err } @@ -294,16 +307,32 @@ func (client *CustomIPPrefixesClient) listHandleResponse(resp *http.Response) (C // If the operation fails it returns an *azcore.ResponseError type. // options - CustomIPPrefixesClientListAllOptions contains the optional parameters for the CustomIPPrefixesClient.ListAll // method. -func (client *CustomIPPrefixesClient) ListAll(options *CustomIPPrefixesClientListAllOptions) *CustomIPPrefixesClientListAllPager { - return &CustomIPPrefixesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *CustomIPPrefixesClient) ListAll(options *CustomIPPrefixesClientListAllOptions) *runtime.Pager[CustomIPPrefixesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[CustomIPPrefixesClientListAllResponse]{ + More: func(page CustomIPPrefixesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp CustomIPPrefixesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.CustomIPPrefixListResult.NextLink) + Fetcher: func(ctx context.Context, page *CustomIPPrefixesClientListAllResponse) (CustomIPPrefixesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return CustomIPPrefixesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return CustomIPPrefixesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return CustomIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -326,7 +355,7 @@ func (client *CustomIPPrefixesClient) listAllCreateRequest(ctx context.Context, // listAllHandleResponse handles the ListAll response. func (client *CustomIPPrefixesClient) listAllHandleResponse(resp *http.Response) (CustomIPPrefixesClientListAllResponse, error) { - result := CustomIPPrefixesClientListAllResponse{RawResponse: resp} + result := CustomIPPrefixesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefixListResult); err != nil { return CustomIPPrefixesClientListAllResponse{}, err } @@ -383,7 +412,7 @@ func (client *CustomIPPrefixesClient) updateTagsCreateRequest(ctx context.Contex // updateTagsHandleResponse handles the UpdateTags response. func (client *CustomIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (CustomIPPrefixesClientUpdateTagsResponse, error) { - result := CustomIPPrefixesClientUpdateTagsResponse{RawResponse: resp} + result := CustomIPPrefixesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.CustomIPPrefix); err != nil { return CustomIPPrefixesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go index bfa42b4df8f7..1e4df74fbff1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ddoscustompolicies_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type DdosCustomPoliciesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DdosCustomPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosCustomPoliciesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &DdosCustomPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a DDoS custom policy. @@ -57,22 +62,18 @@ func NewDdosCustomPoliciesClient(subscriptionID string, credential azcore.TokenC // parameters - Parameters supplied to the create or update operation. // options - DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate // method. -func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (DdosCustomPoliciesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) - if err != nil { - return DdosCustomPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result := DdosCustomPoliciesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("DdosCustomPoliciesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return DdosCustomPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &DdosCustomPoliciesClientCreateOrUpdatePoller{ - pt: pt, +func (client *DdosCustomPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, parameters DdosCustomPolicy, options *DdosCustomPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DdosCustomPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosCustomPolicyName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DdosCustomPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[DdosCustomPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a DDoS custom policy. @@ -124,22 +125,18 @@ func (client *DdosCustomPoliciesClient) createOrUpdateCreateRequest(ctx context. // ddosCustomPolicyName - The name of the DDoS custom policy. // options - DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete // method. -func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (DdosCustomPoliciesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, ddosCustomPolicyName, options) - if err != nil { - return DdosCustomPoliciesClientDeletePollerResponse{}, err +func (client *DdosCustomPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosCustomPolicyName string, options *DdosCustomPoliciesClientBeginDeleteOptions) (*armruntime.Poller[DdosCustomPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ddosCustomPolicyName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DdosCustomPoliciesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[DdosCustomPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result := DdosCustomPoliciesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("DdosCustomPoliciesClient.Delete", "location", resp, client.pl) - if err != nil { - return DdosCustomPoliciesClientDeletePollerResponse{}, err - } - result.Poller = &DdosCustomPoliciesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified DDoS custom policy. @@ -233,7 +230,7 @@ func (client *DdosCustomPoliciesClient) getCreateRequest(ctx context.Context, re // getHandleResponse handles the Get response. func (client *DdosCustomPoliciesClient) getHandleResponse(resp *http.Response) (DdosCustomPoliciesClientGetResponse, error) { - result := DdosCustomPoliciesClientGetResponse{RawResponse: resp} + result := DdosCustomPoliciesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { return DdosCustomPoliciesClientGetResponse{}, err } @@ -290,7 +287,7 @@ func (client *DdosCustomPoliciesClient) updateTagsCreateRequest(ctx context.Cont // updateTagsHandleResponse handles the UpdateTags response. func (client *DdosCustomPoliciesClient) updateTagsHandleResponse(resp *http.Response) (DdosCustomPoliciesClientUpdateTagsResponse, error) { - result := DdosCustomPoliciesClientUpdateTagsResponse{RawResponse: resp} + result := DdosCustomPoliciesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosCustomPolicy); err != nil { return DdosCustomPoliciesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go index 2def3319a9da..f339ae7a27b5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ddosprotectionplans_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type DdosProtectionPlansClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DdosProtectionPlansClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DdosProtectionPlansClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &DdosProtectionPlansClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a DDoS protection plan. @@ -57,22 +62,18 @@ func NewDdosProtectionPlansClient(subscriptionID string, credential azcore.Token // parameters - Parameters supplied to the create or update operation. // options - DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate // method. -func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (DdosProtectionPlansClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) - if err != nil { - return DdosProtectionPlansClientCreateOrUpdatePollerResponse{}, err - } - result := DdosProtectionPlansClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *DdosProtectionPlansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan, options *DdosProtectionPlansClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DdosProtectionPlansClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ddosProtectionPlanName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DdosProtectionPlansClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[DdosProtectionPlansClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("DdosProtectionPlansClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return DdosProtectionPlansClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &DdosProtectionPlansClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a DDoS protection plan. @@ -124,22 +125,18 @@ func (client *DdosProtectionPlansClient) createOrUpdateCreateRequest(ctx context // ddosProtectionPlanName - The name of the DDoS protection plan. // options - DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete // method. -func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (DdosProtectionPlansClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, ddosProtectionPlanName, options) - if err != nil { - return DdosProtectionPlansClientDeletePollerResponse{}, err - } - result := DdosProtectionPlansClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("DdosProtectionPlansClient.Delete", "location", resp, client.pl) - if err != nil { - return DdosProtectionPlansClientDeletePollerResponse{}, err +func (client *DdosProtectionPlansClient) BeginDelete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, options *DdosProtectionPlansClientBeginDeleteOptions) (*armruntime.Poller[DdosProtectionPlansClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ddosProtectionPlanName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DdosProtectionPlansClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[DdosProtectionPlansClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &DdosProtectionPlansClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified DDoS protection plan. @@ -233,7 +230,7 @@ func (client *DdosProtectionPlansClient) getCreateRequest(ctx context.Context, r // getHandleResponse handles the Get response. func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) (DdosProtectionPlansClientGetResponse, error) { - result := DdosProtectionPlansClientGetResponse{RawResponse: resp} + result := DdosProtectionPlansClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { return DdosProtectionPlansClientGetResponse{}, err } @@ -244,16 +241,32 @@ func (client *DdosProtectionPlansClient) getHandleResponse(resp *http.Response) // If the operation fails it returns an *azcore.ResponseError type. // options - DdosProtectionPlansClientListOptions contains the optional parameters for the DdosProtectionPlansClient.List // method. -func (client *DdosProtectionPlansClient) List(options *DdosProtectionPlansClientListOptions) *DdosProtectionPlansClientListPager { - return &DdosProtectionPlansClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *DdosProtectionPlansClient) List(options *DdosProtectionPlansClientListOptions) *runtime.Pager[DdosProtectionPlansClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[DdosProtectionPlansClientListResponse]{ + More: func(page DdosProtectionPlansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp DdosProtectionPlansClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DdosProtectionPlanListResult.NextLink) + Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListResponse) (DdosProtectionPlansClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return DdosProtectionPlansClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return DdosProtectionPlansClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DdosProtectionPlansClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -276,7 +289,7 @@ func (client *DdosProtectionPlansClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) (DdosProtectionPlansClientListResponse, error) { - result := DdosProtectionPlansClientListResponse{RawResponse: resp} + result := DdosProtectionPlansClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { return DdosProtectionPlansClientListResponse{}, err } @@ -288,16 +301,32 @@ func (client *DdosProtectionPlansClient) listHandleResponse(resp *http.Response) // resourceGroupName - The name of the resource group. // options - DdosProtectionPlansClientListByResourceGroupOptions contains the optional parameters for the DdosProtectionPlansClient.ListByResourceGroup // method. -func (client *DdosProtectionPlansClient) ListByResourceGroup(resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) *DdosProtectionPlansClientListByResourceGroupPager { - return &DdosProtectionPlansClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *DdosProtectionPlansClient) ListByResourceGroup(resourceGroupName string, options *DdosProtectionPlansClientListByResourceGroupOptions) *runtime.Pager[DdosProtectionPlansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[DdosProtectionPlansClientListByResourceGroupResponse]{ + More: func(page DdosProtectionPlansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp DdosProtectionPlansClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DdosProtectionPlanListResult.NextLink) + Fetcher: func(ctx context.Context, page *DdosProtectionPlansClientListByResourceGroupResponse) (DdosProtectionPlansClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return DdosProtectionPlansClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return DdosProtectionPlansClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DdosProtectionPlansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -324,7 +353,7 @@ func (client *DdosProtectionPlansClient) listByResourceGroupCreateRequest(ctx co // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *DdosProtectionPlansClient) listByResourceGroupHandleResponse(resp *http.Response) (DdosProtectionPlansClientListByResourceGroupResponse, error) { - result := DdosProtectionPlansClientListByResourceGroupResponse{RawResponse: resp} + result := DdosProtectionPlansClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlanListResult); err != nil { return DdosProtectionPlansClientListByResourceGroupResponse{}, err } @@ -381,7 +410,7 @@ func (client *DdosProtectionPlansClient) updateTagsCreateRequest(ctx context.Con // updateTagsHandleResponse handles the UpdateTags response. func (client *DdosProtectionPlansClient) updateTagsHandleResponse(resp *http.Response) (DdosProtectionPlansClientUpdateTagsResponse, error) { - result := DdosProtectionPlansClientUpdateTagsResponse{RawResponse: resp} + result := DdosProtectionPlansClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DdosProtectionPlan); err != nil { return DdosProtectionPlansClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go index e044061a4d9c..612700b30616 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_defaultsecurityrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type DefaultSecurityRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DefaultSecurityRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewDefaultSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DefaultSecurityRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &DefaultSecurityRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Get the specified default network security rule. @@ -104,7 +109,7 @@ func (client *DefaultSecurityRulesClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) (DefaultSecurityRulesClientGetResponse, error) { - result := DefaultSecurityRulesClientGetResponse{RawResponse: resp} + result := DefaultSecurityRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { return DefaultSecurityRulesClientGetResponse{}, err } @@ -117,16 +122,32 @@ func (client *DefaultSecurityRulesClient) getHandleResponse(resp *http.Response) // networkSecurityGroupName - The name of the network security group. // options - DefaultSecurityRulesClientListOptions contains the optional parameters for the DefaultSecurityRulesClient.List // method. -func (client *DefaultSecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) *DefaultSecurityRulesClientListPager { - return &DefaultSecurityRulesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) +func (client *DefaultSecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string, options *DefaultSecurityRulesClientListOptions) *runtime.Pager[DefaultSecurityRulesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[DefaultSecurityRulesClientListResponse]{ + More: func(page DefaultSecurityRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp DefaultSecurityRulesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *DefaultSecurityRulesClientListResponse) (DefaultSecurityRulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return DefaultSecurityRulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return DefaultSecurityRulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DefaultSecurityRulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -157,7 +178,7 @@ func (client *DefaultSecurityRulesClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *DefaultSecurityRulesClient) listHandleResponse(resp *http.Response) (DefaultSecurityRulesClientListResponse, error) { - result := DefaultSecurityRulesClientListResponse{RawResponse: resp} + result := DefaultSecurityRulesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { return DefaultSecurityRulesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go index dddd559aae2e..d3de4e0e05ac 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_dscpconfiguration_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type DscpConfigurationClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *DscpConfigurationClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DscpConfigurationClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &DscpConfigurationClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a DSCP Configuration. @@ -57,22 +62,18 @@ func NewDscpConfigurationClient(subscriptionID string, credential azcore.TokenCr // parameters - Parameters supplied to the create or update dscp configuration operation. // options - DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate // method. -func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (DscpConfigurationClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, dscpConfigurationName, parameters, options) - if err != nil { - return DscpConfigurationClientCreateOrUpdatePollerResponse{}, err - } - result := DscpConfigurationClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *DscpConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dscpConfigurationName string, parameters DscpConfiguration, options *DscpConfigurationClientBeginCreateOrUpdateOptions) (*armruntime.Poller[DscpConfigurationClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, dscpConfigurationName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DscpConfigurationClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[DscpConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("DscpConfigurationClient.CreateOrUpdate", "location", resp, client.pl) - if err != nil { - return DscpConfigurationClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &DscpConfigurationClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a DSCP Configuration. @@ -124,22 +125,18 @@ func (client *DscpConfigurationClient) createOrUpdateCreateRequest(ctx context.C // dscpConfigurationName - The name of the resource. // options - DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete // method. -func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (DscpConfigurationClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, dscpConfigurationName, options) - if err != nil { - return DscpConfigurationClientDeletePollerResponse{}, err - } - result := DscpConfigurationClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("DscpConfigurationClient.Delete", "location", resp, client.pl) - if err != nil { - return DscpConfigurationClientDeletePollerResponse{}, err +func (client *DscpConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, dscpConfigurationName string, options *DscpConfigurationClientBeginDeleteOptions) (*armruntime.Poller[DscpConfigurationClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, dscpConfigurationName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[DscpConfigurationClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[DscpConfigurationClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &DscpConfigurationClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a DSCP Configuration. @@ -233,7 +230,7 @@ func (client *DscpConfigurationClient) getCreateRequest(ctx context.Context, res // getHandleResponse handles the Get response. func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (DscpConfigurationClientGetResponse, error) { - result := DscpConfigurationClientGetResponse{RawResponse: resp} + result := DscpConfigurationClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfiguration); err != nil { return DscpConfigurationClientGetResponse{}, err } @@ -244,16 +241,32 @@ func (client *DscpConfigurationClient) getHandleResponse(resp *http.Response) (D // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - DscpConfigurationClientListOptions contains the optional parameters for the DscpConfigurationClient.List method. -func (client *DscpConfigurationClient) List(resourceGroupName string, options *DscpConfigurationClientListOptions) *DscpConfigurationClientListPager { - return &DscpConfigurationClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *DscpConfigurationClient) List(resourceGroupName string, options *DscpConfigurationClientListOptions) *runtime.Pager[DscpConfigurationClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[DscpConfigurationClientListResponse]{ + More: func(page DscpConfigurationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp DscpConfigurationClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DscpConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *DscpConfigurationClientListResponse) (DscpConfigurationClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return DscpConfigurationClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return DscpConfigurationClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DscpConfigurationClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -280,7 +293,7 @@ func (client *DscpConfigurationClient) listCreateRequest(ctx context.Context, re // listHandleResponse handles the List response. func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) (DscpConfigurationClientListResponse, error) { - result := DscpConfigurationClientListResponse{RawResponse: resp} + result := DscpConfigurationClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { return DscpConfigurationClientListResponse{}, err } @@ -291,16 +304,32 @@ func (client *DscpConfigurationClient) listHandleResponse(resp *http.Response) ( // If the operation fails it returns an *azcore.ResponseError type. // options - DscpConfigurationClientListAllOptions contains the optional parameters for the DscpConfigurationClient.ListAll // method. -func (client *DscpConfigurationClient) ListAll(options *DscpConfigurationClientListAllOptions) *DscpConfigurationClientListAllPager { - return &DscpConfigurationClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *DscpConfigurationClient) ListAll(options *DscpConfigurationClientListAllOptions) *runtime.Pager[DscpConfigurationClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[DscpConfigurationClientListAllResponse]{ + More: func(page DscpConfigurationClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp DscpConfigurationClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.DscpConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *DscpConfigurationClientListAllResponse) (DscpConfigurationClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return DscpConfigurationClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return DscpConfigurationClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return DscpConfigurationClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -323,7 +352,7 @@ func (client *DscpConfigurationClient) listAllCreateRequest(ctx context.Context, // listAllHandleResponse handles the ListAll response. func (client *DscpConfigurationClient) listAllHandleResponse(resp *http.Response) (DscpConfigurationClientListAllResponse, error) { - result := DscpConfigurationClientListAllResponse{RawResponse: resp} + result := DscpConfigurationClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DscpConfigurationListResult); err != nil { return DscpConfigurationClientListAllResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go index bd42a59696de..1aa41cb7441c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitauthorizations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCircuitAuthorizationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCircuitAuthorizationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitAuthorizationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCircuitAuthorizationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an authorization in the specified express route circuit. @@ -58,22 +63,18 @@ func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string, credentia // authorizationParameters - Parameters supplied to the create or update express route circuit authorization operation. // options - ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteCircuitAuthorizationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, options *ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates an authorization in the specified express route circuit. @@ -130,22 +131,18 @@ func (client *ExpressRouteCircuitAuthorizationsClient) createOrUpdateCreateReque // authorizationName - The name of the authorization. // options - ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete // method. -func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (ExpressRouteCircuitAuthorizationsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, authorizationName, options) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientDeletePollerResponse{}, err - } - result := ExpressRouteCircuitAuthorizationsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitAuthorizationsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitAuthorizationsClientDeletePoller{ - pt: pt, +func (client *ExpressRouteCircuitAuthorizationsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, options *ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteCircuitAuthorizationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, authorizationName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitAuthorizationsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitAuthorizationsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified authorization from the specified express route circuit. @@ -249,7 +246,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) getCreateRequest(ctx cont // getHandleResponse handles the Get response. func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientGetResponse, error) { - result := ExpressRouteCircuitAuthorizationsClientGetResponse{RawResponse: resp} + result := ExpressRouteCircuitAuthorizationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitAuthorization); err != nil { return ExpressRouteCircuitAuthorizationsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *ExpressRouteCircuitAuthorizationsClient) getHandleResponse(resp *h // circuitName - The name of the circuit. // options - ExpressRouteCircuitAuthorizationsClientListOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.List // method. -func (client *ExpressRouteCircuitAuthorizationsClient) List(resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) *ExpressRouteCircuitAuthorizationsClientListPager { - return &ExpressRouteCircuitAuthorizationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) +func (client *ExpressRouteCircuitAuthorizationsClient) List(resourceGroupName string, circuitName string, options *ExpressRouteCircuitAuthorizationsClientListOptions) *runtime.Pager[ExpressRouteCircuitAuthorizationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCircuitAuthorizationsClientListResponse]{ + More: func(page ExpressRouteCircuitAuthorizationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCircuitAuthorizationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AuthorizationListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitAuthorizationsClientListResponse) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCircuitAuthorizationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCircuitAuthorizationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCircuitAuthorizationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *ExpressRouteCircuitAuthorizationsClient) listCreateRequest(ctx con // listHandleResponse handles the List response. func (client *ExpressRouteCircuitAuthorizationsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitAuthorizationsClientListResponse, error) { - result := ExpressRouteCircuitAuthorizationsClientListResponse{RawResponse: resp} + result := ExpressRouteCircuitAuthorizationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AuthorizationListResult); err != nil { return ExpressRouteCircuitAuthorizationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go index 8ce7aa46a5e7..3f4c85cce4be 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCircuitConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCircuitConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCircuitConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. @@ -60,22 +65,18 @@ func NewExpressRouteCircuitConnectionsClient(subscriptionID string, credential a // operation. // options - ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) - if err != nil { - return ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteCircuitConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection, options *ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a Express Route Circuit Connection in the specified express route circuits. @@ -137,22 +138,18 @@ func (client *ExpressRouteCircuitConnectionsClient) createOrUpdateCreateRequest( // connectionName - The name of the express route circuit connection. // options - ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete // method. -func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (ExpressRouteCircuitConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) - if err != nil { - return ExpressRouteCircuitConnectionsClientDeletePollerResponse{}, err - } - result := ExpressRouteCircuitConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitConnectionsClientDeletePoller{ - pt: pt, +func (client *ExpressRouteCircuitConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, options *ExpressRouteCircuitConnectionsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteCircuitConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified Express Route Circuit Connection from the specified express route circuit. @@ -265,7 +262,7 @@ func (client *ExpressRouteCircuitConnectionsClient) getCreateRequest(ctx context // getHandleResponse handles the Get response. func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientGetResponse, error) { - result := ExpressRouteCircuitConnectionsClientGetResponse{RawResponse: resp} + result := ExpressRouteCircuitConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnection); err != nil { return ExpressRouteCircuitConnectionsClientGetResponse{}, err } @@ -279,16 +276,32 @@ func (client *ExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http // peeringName - The name of the peering. // options - ExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.List // method. -func (client *ExpressRouteCircuitConnectionsClient) List(resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) *ExpressRouteCircuitConnectionsClientListPager { - return &ExpressRouteCircuitConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) +func (client *ExpressRouteCircuitConnectionsClient) List(resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[ExpressRouteCircuitConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCircuitConnectionsClientListResponse]{ + More: func(page ExpressRouteCircuitConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCircuitConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCircuitConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitConnectionsClientListResponse) (ExpressRouteCircuitConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCircuitConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCircuitConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -323,7 +336,7 @@ func (client *ExpressRouteCircuitConnectionsClient) listCreateRequest(ctx contex // listHandleResponse handles the List response. func (client *ExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitConnectionsClientListResponse, error) { - result := ExpressRouteCircuitConnectionsClientListResponse{RawResponse: resp} + result := ExpressRouteCircuitConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitConnectionListResult); err != nil { return ExpressRouteCircuitConnectionsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go index b2a119a6278e..4064792a904c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuitpeerings_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCircuitPeeringsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCircuitPeeringsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitPeeringsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCircuitPeeringsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a peering in the specified express route circuits. @@ -58,22 +63,18 @@ func NewExpressRouteCircuitPeeringsClient(subscriptionID string, credential azco // peeringParameters - Parameters supplied to the create or update express route circuit peering operation. // options - ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) - if err != nil { - return ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitPeeringsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteCircuitPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, options *ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a peering in the specified express route circuits. @@ -130,22 +131,18 @@ func (client *ExpressRouteCircuitPeeringsClient) createOrUpdateCreateRequest(ctx // peeringName - The name of the peering. // options - ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete // method. -func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (ExpressRouteCircuitPeeringsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, options) - if err != nil { - return ExpressRouteCircuitPeeringsClientDeletePollerResponse{}, err - } - result := ExpressRouteCircuitPeeringsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitPeeringsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitPeeringsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitPeeringsClientDeletePoller{ - pt: pt, +func (client *ExpressRouteCircuitPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, options *ExpressRouteCircuitPeeringsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteCircuitPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, peeringName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitPeeringsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified peering from the specified express route circuit. @@ -249,7 +246,7 @@ func (client *ExpressRouteCircuitPeeringsClient) getCreateRequest(ctx context.Co // getHandleResponse handles the Get response. func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientGetResponse, error) { - result := ExpressRouteCircuitPeeringsClientGetResponse{RawResponse: resp} + result := ExpressRouteCircuitPeeringsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeering); err != nil { return ExpressRouteCircuitPeeringsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *ExpressRouteCircuitPeeringsClient) getHandleResponse(resp *http.Re // circuitName - The name of the express route circuit. // options - ExpressRouteCircuitPeeringsClientListOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.List // method. -func (client *ExpressRouteCircuitPeeringsClient) List(resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) *ExpressRouteCircuitPeeringsClientListPager { - return &ExpressRouteCircuitPeeringsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, circuitName, options) +func (client *ExpressRouteCircuitPeeringsClient) List(resourceGroupName string, circuitName string, options *ExpressRouteCircuitPeeringsClientListOptions) *runtime.Pager[ExpressRouteCircuitPeeringsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCircuitPeeringsClientListResponse]{ + More: func(page ExpressRouteCircuitPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCircuitPeeringsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCircuitPeeringListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitPeeringsClientListResponse) (ExpressRouteCircuitPeeringsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCircuitPeeringsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCircuitPeeringsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCircuitPeeringsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *ExpressRouteCircuitPeeringsClient) listCreateRequest(ctx context.C // listHandleResponse handles the List response. func (client *ExpressRouteCircuitPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitPeeringsClientListResponse, error) { - result := ExpressRouteCircuitPeeringsClientListResponse{RawResponse: resp} + result := ExpressRouteCircuitPeeringsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitPeeringListResult); err != nil { return ExpressRouteCircuitPeeringsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go index bab20f5c79d6..55f0da6dbb16 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecircuits_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCircuitsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCircuitsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCircuitsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCircuitsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an express route circuit. @@ -57,22 +62,18 @@ func NewExpressRouteCircuitsClient(subscriptionID string, credential azcore.Toke // parameters - Parameters supplied to the create or update express route circuit operation. // options - ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (ExpressRouteCircuitsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, parameters, options) - if err != nil { - return ExpressRouteCircuitsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCircuitsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ExpressRouteCircuitsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, options *ExpressRouteCircuitsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCircuitsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, circuitName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ExpressRouteCircuitsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCircuitsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an express route circuit. @@ -124,22 +125,18 @@ func (client *ExpressRouteCircuitsClient) createOrUpdateCreateRequest(ctx contex // circuitName - The name of the express route circuit. // options - ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete // method. -func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (ExpressRouteCircuitsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, options) - if err != nil { - return ExpressRouteCircuitsClientDeletePollerResponse{}, err - } - result := ExpressRouteCircuitsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitsClientDeletePoller{ - pt: pt, +func (client *ExpressRouteCircuitsClient) BeginDelete(ctx context.Context, resourceGroupName string, circuitName string, options *ExpressRouteCircuitsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteCircuitsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, circuitName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified express route circuit. @@ -234,7 +231,7 @@ func (client *ExpressRouteCircuitsClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *ExpressRouteCircuitsClient) getHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetResponse, error) { - result := ExpressRouteCircuitsClientGetResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { return ExpressRouteCircuitsClientGetResponse{}, err } @@ -295,7 +292,7 @@ func (client *ExpressRouteCircuitsClient) getPeeringStatsCreateRequest(ctx conte // getPeeringStatsHandleResponse handles the GetPeeringStats response. func (client *ExpressRouteCircuitsClient) getPeeringStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetPeeringStatsResponse, error) { - result := ExpressRouteCircuitsClientGetPeeringStatsResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientGetPeeringStatsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { return ExpressRouteCircuitsClientGetPeeringStatsResponse{}, err } @@ -351,7 +348,7 @@ func (client *ExpressRouteCircuitsClient) getStatsCreateRequest(ctx context.Cont // getStatsHandleResponse handles the GetStats response. func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientGetStatsResponse, error) { - result := ExpressRouteCircuitsClientGetStatsResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientGetStatsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitStats); err != nil { return ExpressRouteCircuitsClientGetStatsResponse{}, err } @@ -363,16 +360,32 @@ func (client *ExpressRouteCircuitsClient) getStatsHandleResponse(resp *http.Resp // resourceGroupName - The name of the resource group. // options - ExpressRouteCircuitsClientListOptions contains the optional parameters for the ExpressRouteCircuitsClient.List // method. -func (client *ExpressRouteCircuitsClient) List(resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) *ExpressRouteCircuitsClientListPager { - return &ExpressRouteCircuitsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *ExpressRouteCircuitsClient) List(resourceGroupName string, options *ExpressRouteCircuitsClientListOptions) *runtime.Pager[ExpressRouteCircuitsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCircuitsClientListResponse]{ + More: func(page ExpressRouteCircuitsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCircuitsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCircuitListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListResponse) (ExpressRouteCircuitsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCircuitsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCircuitsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCircuitsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -399,7 +412,7 @@ func (client *ExpressRouteCircuitsClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListResponse, error) { - result := ExpressRouteCircuitsClientListResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { return ExpressRouteCircuitsClientListResponse{}, err } @@ -410,16 +423,32 @@ func (client *ExpressRouteCircuitsClient) listHandleResponse(resp *http.Response // If the operation fails it returns an *azcore.ResponseError type. // options - ExpressRouteCircuitsClientListAllOptions contains the optional parameters for the ExpressRouteCircuitsClient.ListAll // method. -func (client *ExpressRouteCircuitsClient) ListAll(options *ExpressRouteCircuitsClientListAllOptions) *ExpressRouteCircuitsClientListAllPager { - return &ExpressRouteCircuitsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *ExpressRouteCircuitsClient) ListAll(options *ExpressRouteCircuitsClientListAllOptions) *runtime.Pager[ExpressRouteCircuitsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCircuitsClientListAllResponse]{ + More: func(page ExpressRouteCircuitsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCircuitsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCircuitListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCircuitsClientListAllResponse) (ExpressRouteCircuitsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCircuitsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCircuitsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCircuitsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -442,7 +471,7 @@ func (client *ExpressRouteCircuitsClient) listAllCreateRequest(ctx context.Conte // listAllHandleResponse handles the ListAll response. func (client *ExpressRouteCircuitsClient) listAllHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientListAllResponse, error) { - result := ExpressRouteCircuitsClientListAllResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuitListResult); err != nil { return ExpressRouteCircuitsClientListAllResponse{}, err } @@ -457,22 +486,18 @@ func (client *ExpressRouteCircuitsClient) listAllHandleResponse(resp *http.Respo // devicePath - The path of the device. // options - ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable // method. -func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (ExpressRouteCircuitsClientListArpTablePollerResponse, error) { - resp, err := client.listArpTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCircuitsClientListArpTablePollerResponse{}, err +func (client *ExpressRouteCircuitsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListArpTableOptions) (*armruntime.Poller[ExpressRouteCircuitsClientListArpTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listArpTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitsClientListArpTableResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListArpTableResponse](options.ResumeToken, client.pl, nil) } - result := ExpressRouteCircuitsClientListArpTablePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitsClient.ListArpTable", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitsClientListArpTablePollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitsClientListArpTablePoller{ - pt: pt, - } - return result, nil } // ListArpTable - Gets the currently advertised ARP table associated with the express route circuit in a resource group. @@ -535,22 +560,18 @@ func (client *ExpressRouteCircuitsClient) listArpTableCreateRequest(ctx context. // devicePath - The path of the device. // options - ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable // method. -func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (ExpressRouteCircuitsClientListRoutesTablePollerResponse, error) { - resp, err := client.listRoutesTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTablePollerResponse{}, err - } - result := ExpressRouteCircuitsClientListRoutesTablePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCircuitsClient.ListRoutesTable", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTablePollerResponse{}, err +func (client *ExpressRouteCircuitsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableOptions) (*armruntime.Poller[ExpressRouteCircuitsClientListRoutesTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTable(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &ExpressRouteCircuitsClientListRoutesTablePoller{ - pt: pt, - } - return result, nil } // ListRoutesTable - Gets the currently advertised routes table associated with the express route circuit in a resource group. @@ -613,22 +634,18 @@ func (client *ExpressRouteCircuitsClient) listRoutesTableCreateRequest(ctx conte // devicePath - The path of the device. // options - ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary // method. -func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse, error) { - resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse{}, err - } - result := ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse{ - RawResponse: resp, +func (client *ExpressRouteCircuitsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string, options *ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions) (*armruntime.Poller[ExpressRouteCircuitsClientListRoutesTableSummaryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, circuitName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCircuitsClientListRoutesTableSummaryResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCircuitsClientListRoutesTableSummaryResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ExpressRouteCircuitsClient.ListRoutesTableSummary", "location", resp, client.pl) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse{}, err - } - result.Poller = &ExpressRouteCircuitsClientListRoutesTableSummaryPoller{ - pt: pt, - } - return result, nil } // ListRoutesTableSummary - Gets the currently advertised routes table summary associated with the express route circuit in @@ -733,7 +750,7 @@ func (client *ExpressRouteCircuitsClient) updateTagsCreateRequest(ctx context.Co // updateTagsHandleResponse handles the UpdateTags response. func (client *ExpressRouteCircuitsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCircuitsClientUpdateTagsResponse, error) { - result := ExpressRouteCircuitsClientUpdateTagsResponse{RawResponse: resp} + result := ExpressRouteCircuitsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCircuit); err != nil { return ExpressRouteCircuitsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go index 73db2cc44c35..f048a3fef2e4 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. @@ -58,22 +63,18 @@ func NewExpressRouteConnectionsClient(subscriptionID string, credential azcore.T // putExpressRouteConnectionParameters - Parameters required in an ExpressRouteConnection PUT operation. // options - ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (ExpressRouteConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) - if err != nil { - return ExpressRouteConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteConnectionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection, options *ExpressRouteConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, connectionName, putExpressRouteConnectionParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. @@ -130,22 +131,18 @@ func (client *ExpressRouteConnectionsClient) createOrUpdateCreateRequest(ctx con // connectionName - The name of the connection subresource. // options - ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete // method. -func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (ExpressRouteConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) - if err != nil { - return ExpressRouteConnectionsClientDeletePollerResponse{}, err +func (client *ExpressRouteConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, options *ExpressRouteConnectionsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result := ExpressRouteConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteConnectionsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a connection to a ExpressRoute circuit. @@ -249,7 +246,7 @@ func (client *ExpressRouteConnectionsClient) getCreateRequest(ctx context.Contex // getHandleResponse handles the Get response. func (client *ExpressRouteConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientGetResponse, error) { - result := ExpressRouteConnectionsClientGetResponse{RawResponse: resp} + result := ExpressRouteConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnection); err != nil { return ExpressRouteConnectionsClientGetResponse{}, err } @@ -305,7 +302,7 @@ func (client *ExpressRouteConnectionsClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *ExpressRouteConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteConnectionsClientListResponse, error) { - result := ExpressRouteConnectionsClientListResponse{RawResponse: resp} + result := ExpressRouteConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteConnectionList); err != nil { return ExpressRouteConnectionsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go index 8493ed260ca5..1c6c2dc2511d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnectionpeerings_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCrossConnectionPeeringsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCrossConnectionPeeringsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionPeeringsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCrossConnectionPeeringsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. @@ -58,22 +63,18 @@ func NewExpressRouteCrossConnectionPeeringsClient(subscriptionID string, credent // peeringParameters - Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. // options - ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the // ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate method. -func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteCrossConnectionPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering, options *ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a peering in the specified ExpressRouteCrossConnection. @@ -130,22 +131,18 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) createOrUpdateCreateReq // peeringName - The name of the peering. // options - ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete // method. -func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, crossConnectionName, peeringName, options) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse{}, err - } - result := ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionPeeringsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionPeeringsClientDeletePoller{ - pt: pt, +func (client *ExpressRouteCrossConnectionPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, options *ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteCrossConnectionPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, crossConnectionName, peeringName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionPeeringsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified peering from the ExpressRouteCrossConnection. @@ -249,7 +246,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) getCreateRequest(ctx co // getHandleResponse handles the Get response. func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientGetResponse, error) { - result := ExpressRouteCrossConnectionPeeringsClientGetResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionPeeringsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeering); err != nil { return ExpressRouteCrossConnectionPeeringsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) getHandleResponse(resp // crossConnectionName - The name of the ExpressRouteCrossConnection. // options - ExpressRouteCrossConnectionPeeringsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.List // method. -func (client *ExpressRouteCrossConnectionPeeringsClient) List(resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) *ExpressRouteCrossConnectionPeeringsClientListPager { - return &ExpressRouteCrossConnectionPeeringsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) +func (client *ExpressRouteCrossConnectionPeeringsClient) List(resourceGroupName string, crossConnectionName string, options *ExpressRouteCrossConnectionPeeringsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionPeeringsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCrossConnectionPeeringsClientListResponse]{ + More: func(page ExpressRouteCrossConnectionPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCrossConnectionPeeringsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCrossConnectionPeeringList.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionPeeringsClientListResponse) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, crossConnectionName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCrossConnectionPeeringsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *ExpressRouteCrossConnectionPeeringsClient) listCreateRequest(ctx c // listHandleResponse handles the List response. func (client *ExpressRouteCrossConnectionPeeringsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionPeeringsClientListResponse, error) { - result := ExpressRouteCrossConnectionPeeringsClientListResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionPeeringsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionPeeringList); err != nil { return ExpressRouteCrossConnectionPeeringsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go index b4997f23b049..9189a38a498f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutecrossconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteCrossConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteCrossConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteCrossConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteCrossConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Update the specified ExpressRouteCrossConnection. @@ -57,22 +62,18 @@ func NewExpressRouteCrossConnectionsClient(subscriptionID string, credential azc // parameters - Parameters supplied to the update express route crossConnection operation. // options - ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, parameters, options) - if err != nil { - return ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ExpressRouteCrossConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection, options *ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, crossConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Update the specified ExpressRouteCrossConnection. @@ -167,7 +168,7 @@ func (client *ExpressRouteCrossConnectionsClient) getCreateRequest(ctx context.C // getHandleResponse handles the Get response. func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientGetResponse, error) { - result := ExpressRouteCrossConnectionsClientGetResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { return ExpressRouteCrossConnectionsClientGetResponse{}, err } @@ -178,16 +179,32 @@ func (client *ExpressRouteCrossConnectionsClient) getHandleResponse(resp *http.R // If the operation fails it returns an *azcore.ResponseError type. // options - ExpressRouteCrossConnectionsClientListOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.List // method. -func (client *ExpressRouteCrossConnectionsClient) List(options *ExpressRouteCrossConnectionsClientListOptions) *ExpressRouteCrossConnectionsClientListPager { - return &ExpressRouteCrossConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *ExpressRouteCrossConnectionsClient) List(options *ExpressRouteCrossConnectionsClientListOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCrossConnectionsClientListResponse]{ + More: func(page ExpressRouteCrossConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCrossConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCrossConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListResponse) (ExpressRouteCrossConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCrossConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCrossConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCrossConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -210,7 +227,7 @@ func (client *ExpressRouteCrossConnectionsClient) listCreateRequest(ctx context. // listHandleResponse handles the List response. func (client *ExpressRouteCrossConnectionsClient) listHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListResponse, error) { - result := ExpressRouteCrossConnectionsClientListResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { return ExpressRouteCrossConnectionsClientListResponse{}, err } @@ -226,22 +243,18 @@ func (client *ExpressRouteCrossConnectionsClient) listHandleResponse(resp *http. // devicePath - The path of the device. // options - ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable // method. -func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (ExpressRouteCrossConnectionsClientListArpTablePollerResponse, error) { - resp, err := client.listArpTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCrossConnectionsClientListArpTablePollerResponse{}, err - } - result := ExpressRouteCrossConnectionsClientListArpTablePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionsClient.ListArpTable", "location", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionsClientListArpTablePollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionsClientListArpTablePoller{ - pt: pt, +func (client *ExpressRouteCrossConnectionsClient) BeginListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListArpTableOptions) (*armruntime.Poller[ExpressRouteCrossConnectionsClientListArpTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listArpTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionsClientListArpTableResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListArpTableResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // ListArpTable - Gets the currently advertised ARP table associated with the express route cross connection in a resource @@ -301,16 +314,32 @@ func (client *ExpressRouteCrossConnectionsClient) listArpTableCreateRequest(ctx // resourceGroupName - The name of the resource group. // options - ExpressRouteCrossConnectionsClientListByResourceGroupOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.ListByResourceGroup // method. -func (client *ExpressRouteCrossConnectionsClient) ListByResourceGroup(resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) *ExpressRouteCrossConnectionsClientListByResourceGroupPager { - return &ExpressRouteCrossConnectionsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *ExpressRouteCrossConnectionsClient) ListByResourceGroup(resourceGroupName string, options *ExpressRouteCrossConnectionsClientListByResourceGroupOptions) *runtime.Pager[ExpressRouteCrossConnectionsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteCrossConnectionsClientListByResourceGroupResponse]{ + More: func(page ExpressRouteCrossConnectionsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteCrossConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -337,7 +366,7 @@ func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupCreateReque // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientListByResourceGroupResponse, error) { - result := ExpressRouteCrossConnectionsClientListByResourceGroupResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnectionListResult); err != nil { return ExpressRouteCrossConnectionsClientListByResourceGroupResponse{}, err } @@ -353,22 +382,18 @@ func (client *ExpressRouteCrossConnectionsClient) listByResourceGroupHandleRespo // devicePath - The path of the device. // options - ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable // method. -func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse, error) { - resp, err := client.listRoutesTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse{}, err - } - result := ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionsClient.ListRoutesTable", "location", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionsClientListRoutesTablePoller{ - pt: pt, +func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions) (*armruntime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTable(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // ListRoutesTable - Gets the currently advertised routes table associated with the express route cross connection in a resource @@ -432,22 +457,18 @@ func (client *ExpressRouteCrossConnectionsClient) listRoutesTableCreateRequest(c // devicePath - The path of the device. // options - ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the // ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary method. -func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse, error) { - resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse{}, err +func (client *ExpressRouteCrossConnectionsClient) BeginListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string, options *ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions) (*armruntime.Poller[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listRoutesTableSummary(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse](options.ResumeToken, client.pl, nil) } - result := ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteCrossConnectionsClient.ListRoutesTableSummary", "location", resp, client.pl) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse{}, err - } - result.Poller = &ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller{ - pt: pt, - } - return result, nil } // ListRoutesTableSummary - Gets the route table summary associated with the express route cross connection in a resource @@ -552,7 +573,7 @@ func (client *ExpressRouteCrossConnectionsClient) updateTagsCreateRequest(ctx co // updateTagsHandleResponse handles the UpdateTags response. func (client *ExpressRouteCrossConnectionsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRouteCrossConnectionsClientUpdateTagsResponse, error) { - result := ExpressRouteCrossConnectionsClientUpdateTagsResponse{RawResponse: resp} + result := ExpressRouteCrossConnectionsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteCrossConnection); err != nil { return ExpressRouteCrossConnectionsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go index c41c93882ec5..9962703c50ed 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutegateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. @@ -57,22 +62,18 @@ func NewExpressRouteGatewaysClient(subscriptionID string, credential azcore.Toke // putExpressRouteGatewayParameters - Parameters required in an ExpressRoute gateway PUT operation. // options - ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate // method. -func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (ExpressRouteGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) - if err != nil { - return ExpressRouteGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRouteGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ExpressRouteGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway, options *ExpressRouteGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRouteGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRouteGatewayName, putExpressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ExpressRouteGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRouteGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a ExpressRoute gateway in a specified resource group. @@ -125,22 +126,18 @@ func (client *ExpressRouteGatewaysClient) createOrUpdateCreateRequest(ctx contex // expressRouteGatewayName - The name of the ExpressRoute gateway. // options - ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete // method. -func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (ExpressRouteGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, options) - if err != nil { - return ExpressRouteGatewaysClientDeletePollerResponse{}, err - } - result := ExpressRouteGatewaysClientDeletePollerResponse{ - RawResponse: resp, +func (client *ExpressRouteGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, options *ExpressRouteGatewaysClientBeginDeleteOptions) (*armruntime.Poller[ExpressRouteGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRouteGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ExpressRouteGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRouteGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &ExpressRouteGatewaysClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway resource can only be deleted @@ -236,7 +233,7 @@ func (client *ExpressRouteGatewaysClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *ExpressRouteGatewaysClient) getHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientGetResponse, error) { - result := ExpressRouteGatewaysClientGetResponse{RawResponse: resp} + result := ExpressRouteGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGateway); err != nil { return ExpressRouteGatewaysClientGetResponse{}, err } @@ -287,7 +284,7 @@ func (client *ExpressRouteGatewaysClient) listByResourceGroupCreateRequest(ctx c // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *ExpressRouteGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListByResourceGroupResponse, error) { - result := ExpressRouteGatewaysClientListByResourceGroupResponse{RawResponse: resp} + result := ExpressRouteGatewaysClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { return ExpressRouteGatewaysClientListByResourceGroupResponse{}, err } @@ -333,7 +330,7 @@ func (client *ExpressRouteGatewaysClient) listBySubscriptionCreateRequest(ctx co // listBySubscriptionHandleResponse handles the ListBySubscription response. func (client *ExpressRouteGatewaysClient) listBySubscriptionHandleResponse(resp *http.Response) (ExpressRouteGatewaysClientListBySubscriptionResponse, error) { - result := ExpressRouteGatewaysClientListBySubscriptionResponse{RawResponse: resp} + result := ExpressRouteGatewaysClientListBySubscriptionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteGatewayList); err != nil { return ExpressRouteGatewaysClientListBySubscriptionResponse{}, err } @@ -347,22 +344,18 @@ func (client *ExpressRouteGatewaysClient) listBySubscriptionHandleResponse(resp // expressRouteGatewayParameters - Parameters supplied to update a virtual wan express route gateway tags. // options - ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags // method. -func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (ExpressRouteGatewaysClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) - if err != nil { - return ExpressRouteGatewaysClientUpdateTagsPollerResponse{}, err +func (client *ExpressRouteGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, expressRouteGatewayParameters TagsObject, options *ExpressRouteGatewaysClientBeginUpdateTagsOptions) (*armruntime.Poller[ExpressRouteGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, expressRouteGatewayName, expressRouteGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRouteGatewaysClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRouteGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - result := ExpressRouteGatewaysClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRouteGatewaysClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRouteGatewaysClientUpdateTagsPollerResponse{}, err - } - result.Poller = &ExpressRouteGatewaysClientUpdateTagsPoller{ - pt: pt, - } - return result, nil } // UpdateTags - Updates express route gateway tags. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go index 837d9c09e9b6..2c7dac5a3a79 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressroutelinks_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRouteLinksClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteLinksClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteLinksClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteLinksClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Retrieves the specified ExpressRouteLink resource. @@ -103,7 +108,7 @@ func (client *ExpressRouteLinksClient) getCreateRequest(ctx context.Context, res // getHandleResponse handles the Get response. func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (ExpressRouteLinksClientGetResponse, error) { - result := ExpressRouteLinksClientGetResponse{RawResponse: resp} + result := ExpressRouteLinksClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLink); err != nil { return ExpressRouteLinksClientGetResponse{}, err } @@ -115,16 +120,32 @@ func (client *ExpressRouteLinksClient) getHandleResponse(resp *http.Response) (E // resourceGroupName - The name of the resource group. // expressRoutePortName - The name of the ExpressRoutePort resource. // options - ExpressRouteLinksClientListOptions contains the optional parameters for the ExpressRouteLinksClient.List method. -func (client *ExpressRouteLinksClient) List(resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) *ExpressRouteLinksClientListPager { - return &ExpressRouteLinksClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) +func (client *ExpressRouteLinksClient) List(resourceGroupName string, expressRoutePortName string, options *ExpressRouteLinksClientListOptions) *runtime.Pager[ExpressRouteLinksClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteLinksClientListResponse]{ + More: func(page ExpressRouteLinksClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteLinksClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteLinkListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteLinksClientListResponse) (ExpressRouteLinksClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, expressRoutePortName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteLinksClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteLinksClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteLinksClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -155,7 +176,7 @@ func (client *ExpressRouteLinksClient) listCreateRequest(ctx context.Context, re // listHandleResponse handles the List response. func (client *ExpressRouteLinksClient) listHandleResponse(resp *http.Response) (ExpressRouteLinksClientListResponse, error) { - result := ExpressRouteLinksClientListResponse{RawResponse: resp} + result := ExpressRouteLinksClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteLinkListResult); err != nil { return ExpressRouteLinksClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go index ddd9965a1ecc..b000d746502b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteports_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRoutePortsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRoutePortsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRoutePortsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. @@ -57,22 +62,18 @@ func NewExpressRoutePortsClient(subscriptionID string, credential azcore.TokenCr // parameters - Parameters supplied to the create ExpressRoutePort operation. // options - ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate // method. -func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (ExpressRoutePortsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, parameters, options) - if err != nil { - return ExpressRoutePortsClientCreateOrUpdatePollerResponse{}, err - } - result := ExpressRoutePortsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ExpressRoutePortsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort, options *ExpressRoutePortsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ExpressRoutePortsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, expressRoutePortName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRoutePortsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRoutePortsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ExpressRoutePortsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ExpressRoutePortsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ExpressRoutePortsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified ExpressRoutePort resource. @@ -124,22 +125,18 @@ func (client *ExpressRoutePortsClient) createOrUpdateCreateRequest(ctx context.C // expressRoutePortName - The name of the ExpressRoutePort resource. // options - ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete // method. -func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (ExpressRoutePortsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, options) - if err != nil { - return ExpressRoutePortsClientDeletePollerResponse{}, err - } - result := ExpressRoutePortsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ExpressRoutePortsClient.Delete", "location", resp, client.pl) - if err != nil { - return ExpressRoutePortsClientDeletePollerResponse{}, err +func (client *ExpressRoutePortsClient) BeginDelete(ctx context.Context, resourceGroupName string, expressRoutePortName string, options *ExpressRoutePortsClientBeginDeleteOptions) (*armruntime.Poller[ExpressRoutePortsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, expressRoutePortName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ExpressRoutePortsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ExpressRoutePortsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &ExpressRoutePortsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified ExpressRoutePort resource. @@ -235,7 +232,7 @@ func (client *ExpressRoutePortsClient) generateLOACreateRequest(ctx context.Cont // generateLOAHandleResponse handles the GenerateLOA response. func (client *ExpressRoutePortsClient) generateLOAHandleResponse(resp *http.Response) (ExpressRoutePortsClientGenerateLOAResponse, error) { - result := ExpressRoutePortsClientGenerateLOAResponse{RawResponse: resp} + result := ExpressRoutePortsClientGenerateLOAResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.GenerateExpressRoutePortsLOAResult); err != nil { return ExpressRoutePortsClientGenerateLOAResponse{}, err } @@ -290,7 +287,7 @@ func (client *ExpressRoutePortsClient) getCreateRequest(ctx context.Context, res // getHandleResponse handles the Get response. func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsClientGetResponse, error) { - result := ExpressRoutePortsClientGetResponse{RawResponse: resp} + result := ExpressRoutePortsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { return ExpressRoutePortsClientGetResponse{}, err } @@ -300,16 +297,32 @@ func (client *ExpressRoutePortsClient) getHandleResponse(resp *http.Response) (E // List - List all the ExpressRoutePort resources in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - ExpressRoutePortsClientListOptions contains the optional parameters for the ExpressRoutePortsClient.List method. -func (client *ExpressRoutePortsClient) List(options *ExpressRoutePortsClientListOptions) *ExpressRoutePortsClientListPager { - return &ExpressRoutePortsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *ExpressRoutePortsClient) List(options *ExpressRoutePortsClientListOptions) *runtime.Pager[ExpressRoutePortsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRoutePortsClientListResponse]{ + More: func(page ExpressRoutePortsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRoutePortsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRoutePortListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListResponse) (ExpressRoutePortsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRoutePortsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRoutePortsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRoutePortsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -332,7 +345,7 @@ func (client *ExpressRoutePortsClient) listCreateRequest(ctx context.Context, op // listHandleResponse handles the List response. func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsClientListResponse, error) { - result := ExpressRoutePortsClientListResponse{RawResponse: resp} + result := ExpressRoutePortsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { return ExpressRoutePortsClientListResponse{}, err } @@ -344,16 +357,32 @@ func (client *ExpressRoutePortsClient) listHandleResponse(resp *http.Response) ( // resourceGroupName - The name of the resource group. // options - ExpressRoutePortsClientListByResourceGroupOptions contains the optional parameters for the ExpressRoutePortsClient.ListByResourceGroup // method. -func (client *ExpressRoutePortsClient) ListByResourceGroup(resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) *ExpressRoutePortsClientListByResourceGroupPager { - return &ExpressRoutePortsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *ExpressRoutePortsClient) ListByResourceGroup(resourceGroupName string, options *ExpressRoutePortsClientListByResourceGroupOptions) *runtime.Pager[ExpressRoutePortsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRoutePortsClientListByResourceGroupResponse]{ + More: func(page ExpressRoutePortsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRoutePortsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRoutePortListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRoutePortsClientListByResourceGroupResponse) (ExpressRoutePortsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRoutePortsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRoutePortsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRoutePortsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -380,7 +409,7 @@ func (client *ExpressRoutePortsClient) listByResourceGroupCreateRequest(ctx cont // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *ExpressRoutePortsClient) listByResourceGroupHandleResponse(resp *http.Response) (ExpressRoutePortsClientListByResourceGroupResponse, error) { - result := ExpressRoutePortsClientListByResourceGroupResponse{RawResponse: resp} + result := ExpressRoutePortsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortListResult); err != nil { return ExpressRoutePortsClientListByResourceGroupResponse{}, err } @@ -437,7 +466,7 @@ func (client *ExpressRoutePortsClient) updateTagsCreateRequest(ctx context.Conte // updateTagsHandleResponse handles the UpdateTags response. func (client *ExpressRoutePortsClient) updateTagsHandleResponse(resp *http.Response) (ExpressRoutePortsClientUpdateTagsResponse, error) { - result := ExpressRoutePortsClientUpdateTagsResponse{RawResponse: resp} + result := ExpressRoutePortsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePort); err != nil { return ExpressRoutePortsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go index 8326532578b5..2247c36f36b6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteportslocations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ExpressRoutePortsLocationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRoutePortsLocationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRoutePortsLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRoutePortsLocationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRoutePortsLocationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at said @@ -95,7 +100,7 @@ func (client *ExpressRoutePortsLocationsClient) getCreateRequest(ctx context.Con // getHandleResponse handles the Get response. func (client *ExpressRoutePortsLocationsClient) getHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientGetResponse, error) { - result := ExpressRoutePortsLocationsClientGetResponse{RawResponse: resp} + result := ExpressRoutePortsLocationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocation); err != nil { return ExpressRoutePortsLocationsClientGetResponse{}, err } @@ -107,16 +112,32 @@ func (client *ExpressRoutePortsLocationsClient) getHandleResponse(resp *http.Res // If the operation fails it returns an *azcore.ResponseError type. // options - ExpressRoutePortsLocationsClientListOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.List // method. -func (client *ExpressRoutePortsLocationsClient) List(options *ExpressRoutePortsLocationsClientListOptions) *ExpressRoutePortsLocationsClientListPager { - return &ExpressRoutePortsLocationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *ExpressRoutePortsLocationsClient) List(options *ExpressRoutePortsLocationsClientListOptions) *runtime.Pager[ExpressRoutePortsLocationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRoutePortsLocationsClientListResponse]{ + More: func(page ExpressRoutePortsLocationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRoutePortsLocationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRoutePortsLocationListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRoutePortsLocationsClientListResponse) (ExpressRoutePortsLocationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRoutePortsLocationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRoutePortsLocationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRoutePortsLocationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -139,7 +160,7 @@ func (client *ExpressRoutePortsLocationsClient) listCreateRequest(ctx context.Co // listHandleResponse handles the List response. func (client *ExpressRoutePortsLocationsClient) listHandleResponse(resp *http.Response) (ExpressRoutePortsLocationsClientListResponse, error) { - result := ExpressRoutePortsLocationsClientListResponse{RawResponse: resp} + result := ExpressRoutePortsLocationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRoutePortsLocationListResult); err != nil { return ExpressRoutePortsLocationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go index 84add3037311..603c28060e50 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_expressrouteserviceproviders_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,36 +35,56 @@ type ExpressRouteServiceProvidersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ExpressRouteServiceProvidersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewExpressRouteServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExpressRouteServiceProvidersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ExpressRouteServiceProvidersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets all the available express route service providers. // If the operation fails it returns an *azcore.ResponseError type. // options - ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List // method. -func (client *ExpressRouteServiceProvidersClient) List(options *ExpressRouteServiceProvidersClientListOptions) *ExpressRouteServiceProvidersClientListPager { - return &ExpressRouteServiceProvidersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *ExpressRouteServiceProvidersClient) List(options *ExpressRouteServiceProvidersClientListOptions) *runtime.Pager[ExpressRouteServiceProvidersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ExpressRouteServiceProvidersClientListResponse]{ + More: func(page ExpressRouteServiceProvidersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ExpressRouteServiceProvidersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ExpressRouteServiceProviderListResult.NextLink) + Fetcher: func(ctx context.Context, page *ExpressRouteServiceProvidersClientListResponse) (ExpressRouteServiceProvidersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ExpressRouteServiceProvidersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ExpressRouteServiceProvidersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ExpressRouteServiceProvidersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -86,7 +107,7 @@ func (client *ExpressRouteServiceProvidersClient) listCreateRequest(ctx context. // listHandleResponse handles the List response. func (client *ExpressRouteServiceProvidersClient) listHandleResponse(resp *http.Response) (ExpressRouteServiceProvidersClientListResponse, error) { - result := ExpressRouteServiceProvidersClientListResponse{RawResponse: resp} + result := ExpressRouteServiceProvidersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ExpressRouteServiceProviderListResult); err != nil { return ExpressRouteServiceProvidersClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go index 0bb2fdf70cb8..4501a3f26739 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicies_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FirewallPoliciesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FirewallPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPoliciesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FirewallPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Firewall Policy. @@ -57,22 +62,18 @@ func NewFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCre // parameters - Parameters supplied to the create or update Firewall Policy operation. // options - FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate // method. -func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (FirewallPoliciesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, parameters, options) - if err != nil { - return FirewallPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result := FirewallPoliciesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *FirewallPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, parameters FirewallPolicy, options *FirewallPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[FirewallPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FirewallPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[FirewallPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("FirewallPoliciesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return FirewallPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &FirewallPoliciesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified Firewall Policy. @@ -124,22 +125,18 @@ func (client *FirewallPoliciesClient) createOrUpdateCreateRequest(ctx context.Co // firewallPolicyName - The name of the Firewall Policy. // options - FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete // method. -func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (FirewallPoliciesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, options) - if err != nil { - return FirewallPoliciesClientDeletePollerResponse{}, err - } - result := FirewallPoliciesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("FirewallPoliciesClient.Delete", "location", resp, client.pl) - if err != nil { - return FirewallPoliciesClientDeletePollerResponse{}, err +func (client *FirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, options *FirewallPoliciesClientBeginDeleteOptions) (*armruntime.Poller[FirewallPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FirewallPoliciesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[FirewallPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &FirewallPoliciesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Firewall Policy. @@ -236,7 +233,7 @@ func (client *FirewallPoliciesClient) getCreateRequest(ctx context.Context, reso // getHandleResponse handles the Get response. func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (FirewallPoliciesClientGetResponse, error) { - result := FirewallPoliciesClientGetResponse{RawResponse: resp} + result := FirewallPoliciesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicy); err != nil { return FirewallPoliciesClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *FirewallPoliciesClient) getHandleResponse(resp *http.Response) (Fi // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - FirewallPoliciesClientListOptions contains the optional parameters for the FirewallPoliciesClient.List method. -func (client *FirewallPoliciesClient) List(resourceGroupName string, options *FirewallPoliciesClientListOptions) *FirewallPoliciesClientListPager { - return &FirewallPoliciesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *FirewallPoliciesClient) List(resourceGroupName string, options *FirewallPoliciesClientListOptions) *runtime.Pager[FirewallPoliciesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[FirewallPoliciesClientListResponse]{ + More: func(page FirewallPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp FirewallPoliciesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.FirewallPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListResponse) (FirewallPoliciesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FirewallPoliciesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FirewallPoliciesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *FirewallPoliciesClient) listCreateRequest(ctx context.Context, res // listHandleResponse handles the List response. func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (FirewallPoliciesClientListResponse, error) { - result := FirewallPoliciesClientListResponse{RawResponse: resp} + result := FirewallPoliciesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { return FirewallPoliciesClientListResponse{}, err } @@ -294,16 +307,32 @@ func (client *FirewallPoliciesClient) listHandleResponse(resp *http.Response) (F // If the operation fails it returns an *azcore.ResponseError type. // options - FirewallPoliciesClientListAllOptions contains the optional parameters for the FirewallPoliciesClient.ListAll // method. -func (client *FirewallPoliciesClient) ListAll(options *FirewallPoliciesClientListAllOptions) *FirewallPoliciesClientListAllPager { - return &FirewallPoliciesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *FirewallPoliciesClient) ListAll(options *FirewallPoliciesClientListAllOptions) *runtime.Pager[FirewallPoliciesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[FirewallPoliciesClientListAllResponse]{ + More: func(page FirewallPoliciesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp FirewallPoliciesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.FirewallPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *FirewallPoliciesClientListAllResponse) (FirewallPoliciesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FirewallPoliciesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FirewallPoliciesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -326,7 +355,7 @@ func (client *FirewallPoliciesClient) listAllCreateRequest(ctx context.Context, // listAllHandleResponse handles the ListAll response. func (client *FirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (FirewallPoliciesClientListAllResponse, error) { - result := FirewallPoliciesClientListAllResponse{RawResponse: resp} + result := FirewallPoliciesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyListResult); err != nil { return FirewallPoliciesClientListAllResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go index 5a86115e3876..29df6d6194ec 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignatures_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FirewallPolicyIdpsSignaturesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FirewallPolicyIdpsSignaturesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFirewallPolicyIdpsSignaturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FirewallPolicyIdpsSignaturesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Retrieves the current status of IDPS signatures for the relevant policy @@ -96,7 +101,7 @@ func (client *FirewallPolicyIdpsSignaturesClient) listCreateRequest(ctx context. // listHandleResponse handles the List response. func (client *FirewallPolicyIdpsSignaturesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesClientListResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.QueryResults); err != nil { return FirewallPolicyIdpsSignaturesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go index d3a551db373f..d1959547b171 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesfiltervalues_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FirewallPolicyIdpsSignaturesFilterValuesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FirewallPolicyIdpsSignaturesFilterValuesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFirewallPolicyIdpsSignaturesFilterValuesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesFilterValuesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FirewallPolicyIdpsSignaturesFilterValuesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Retrieves the current filter values for the signatures overrides @@ -96,7 +101,7 @@ func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listCreateRequest( // listHandleResponse handles the List response. func (client *FirewallPolicyIdpsSignaturesFilterValuesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesFilterValuesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SignatureOverridesFilterValuesResponse); err != nil { return FirewallPolicyIdpsSignaturesFilterValuesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go index c7c36b86beb9..af1338063f8e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyidpssignaturesoverrides_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FirewallPolicyIdpsSignaturesOverridesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FirewallPolicyIdpsSignaturesOverridesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFirewallPolicyIdpsSignaturesOverridesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyIdpsSignaturesOverridesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FirewallPolicyIdpsSignaturesOverridesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Returns all signatures overrides for a specific policy. @@ -96,7 +101,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) getCreateRequest(ctx // getHandleResponse handles the Get response. func (client *FirewallPolicyIdpsSignaturesOverridesClient) getHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientGetResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientGetResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesOverridesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { return FirewallPolicyIdpsSignaturesOverridesClientGetResponse{}, err } @@ -149,7 +154,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) listCreateRequest(ctx // listHandleResponse handles the List response. func (client *FirewallPolicyIdpsSignaturesOverridesClient) listHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientListResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientListResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesOverridesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverridesList); err != nil { return FirewallPolicyIdpsSignaturesOverridesClientListResponse{}, err } @@ -203,7 +208,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchCreateRequest(ct // patchHandleResponse handles the Patch response. func (client *FirewallPolicyIdpsSignaturesOverridesClient) patchHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPatchResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { return FirewallPolicyIdpsSignaturesOverridesClientPatchResponse{}, err } @@ -257,7 +262,7 @@ func (client *FirewallPolicyIdpsSignaturesOverridesClient) putCreateRequest(ctx // putHandleResponse handles the Put response. func (client *FirewallPolicyIdpsSignaturesOverridesClient) putHandleResponse(resp *http.Response) (FirewallPolicyIdpsSignaturesOverridesClientPutResponse, error) { - result := FirewallPolicyIdpsSignaturesOverridesClientPutResponse{RawResponse: resp} + result := FirewallPolicyIdpsSignaturesOverridesClientPutResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SignaturesOverrides); err != nil { return FirewallPolicyIdpsSignaturesOverridesClientPutResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go index 68ae601d52a5..d629f28aa264 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_firewallpolicyrulecollectiongroups_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FirewallPolicyRuleCollectionGroupsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FirewallPolicyRuleCollectionGroupsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FirewallPolicyRuleCollectionGroupsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FirewallPolicyRuleCollectionGroupsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. @@ -58,22 +63,18 @@ func NewFirewallPolicyRuleCollectionGroupsClient(subscriptionID string, credenti // parameters - Parameters supplied to the create or update FirewallPolicyRuleCollectionGroup operation. // options - FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate // method. -func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse{}, err - } - result := FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller{ - pt: pt, +func (client *FirewallPolicyRuleCollectionGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, parameters FirewallPolicyRuleCollectionGroup, options *FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified FirewallPolicyRuleCollectionGroup. @@ -130,22 +131,18 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) createOrUpdateCreateRequ // ruleCollectionGroupName - The name of the FirewallPolicyRuleCollectionGroup. // options - FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete // method. -func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse{}, err - } - result := FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("FirewallPolicyRuleCollectionGroupsClient.Delete", "location", resp, client.pl) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse{}, err - } - result.Poller = &FirewallPolicyRuleCollectionGroupsClientDeletePoller{ - pt: pt, +func (client *FirewallPolicyRuleCollectionGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, firewallPolicyName string, ruleCollectionGroupName string, options *FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions) (*armruntime.Poller[FirewallPolicyRuleCollectionGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, firewallPolicyName, ruleCollectionGroupName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FirewallPolicyRuleCollectionGroupsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[FirewallPolicyRuleCollectionGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified FirewallPolicyRuleCollectionGroup. @@ -249,7 +246,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) getCreateRequest(ctx con // getHandleResponse handles the Get response. func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientGetResponse, error) { - result := FirewallPolicyRuleCollectionGroupsClientGetResponse{RawResponse: resp} + result := FirewallPolicyRuleCollectionGroupsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroup); err != nil { return FirewallPolicyRuleCollectionGroupsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) getHandleResponse(resp * // firewallPolicyName - The name of the Firewall Policy. // options - FirewallPolicyRuleCollectionGroupsClientListOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.List // method. -func (client *FirewallPolicyRuleCollectionGroupsClient) List(resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) *FirewallPolicyRuleCollectionGroupsClientListPager { - return &FirewallPolicyRuleCollectionGroupsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) +func (client *FirewallPolicyRuleCollectionGroupsClient) List(resourceGroupName string, firewallPolicyName string, options *FirewallPolicyRuleCollectionGroupsClientListOptions) *runtime.Pager[FirewallPolicyRuleCollectionGroupsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[FirewallPolicyRuleCollectionGroupsClientListResponse]{ + More: func(page FirewallPolicyRuleCollectionGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp FirewallPolicyRuleCollectionGroupsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.FirewallPolicyRuleCollectionGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *FirewallPolicyRuleCollectionGroupsClientListResponse) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, firewallPolicyName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FirewallPolicyRuleCollectionGroupsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *FirewallPolicyRuleCollectionGroupsClient) listCreateRequest(ctx co // listHandleResponse handles the List response. func (client *FirewallPolicyRuleCollectionGroupsClient) listHandleResponse(resp *http.Response) (FirewallPolicyRuleCollectionGroupsClientListResponse, error) { - result := FirewallPolicyRuleCollectionGroupsClientListResponse{RawResponse: resp} + result := FirewallPolicyRuleCollectionGroupsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FirewallPolicyRuleCollectionGroupListResult); err != nil { return FirewallPolicyRuleCollectionGroupsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go index 341d772c84b8..3321725f5b05 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_flowlogs_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type FlowLogsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *FlowLogsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*FlowLogsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &FlowLogsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Create or update a flow log for the specified network security group. @@ -58,22 +63,18 @@ func NewFlowLogsClient(subscriptionID string, credential azcore.TokenCredential, // parameters - Parameters that define the create or update flow log resource. // options - FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate // method. -func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (FlowLogsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) - if err != nil { - return FlowLogsClientCreateOrUpdatePollerResponse{}, err - } - result := FlowLogsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("FlowLogsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return FlowLogsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &FlowLogsClientCreateOrUpdatePoller{ - pt: pt, +func (client *FlowLogsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, parameters FlowLog, options *FlowLogsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[FlowLogsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkWatcherName, flowLogName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FlowLogsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[FlowLogsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Create or update a flow log for the specified network security group. @@ -129,22 +130,18 @@ func (client *FlowLogsClient) createOrUpdateCreateRequest(ctx context.Context, r // networkWatcherName - The name of the network watcher. // flowLogName - The name of the flow log resource. // options - FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. -func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (FlowLogsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, flowLogName, options) - if err != nil { - return FlowLogsClientDeletePollerResponse{}, err - } - result := FlowLogsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("FlowLogsClient.Delete", "location", resp, client.pl) - if err != nil { - return FlowLogsClientDeletePollerResponse{}, err - } - result.Poller = &FlowLogsClientDeletePoller{ - pt: pt, +func (client *FlowLogsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, flowLogName string, options *FlowLogsClientBeginDeleteOptions) (*armruntime.Poller[FlowLogsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, flowLogName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[FlowLogsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[FlowLogsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified flow log resource. @@ -247,7 +244,7 @@ func (client *FlowLogsClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsClientGetResponse, error) { - result := FlowLogsClientGetResponse{RawResponse: resp} + result := FlowLogsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { return FlowLogsClientGetResponse{}, err } @@ -259,16 +256,32 @@ func (client *FlowLogsClient) getHandleResponse(resp *http.Response) (FlowLogsCl // resourceGroupName - The name of the resource group containing Network Watcher. // networkWatcherName - The name of the Network Watcher resource. // options - FlowLogsClientListOptions contains the optional parameters for the FlowLogsClient.List method. -func (client *FlowLogsClient) List(resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) *FlowLogsClientListPager { - return &FlowLogsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) +func (client *FlowLogsClient) List(resourceGroupName string, networkWatcherName string, options *FlowLogsClientListOptions) *runtime.Pager[FlowLogsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[FlowLogsClientListResponse]{ + More: func(page FlowLogsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp FlowLogsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.FlowLogListResult.NextLink) + Fetcher: func(ctx context.Context, page *FlowLogsClientListResponse) (FlowLogsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return FlowLogsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return FlowLogsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return FlowLogsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -299,7 +312,7 @@ func (client *FlowLogsClient) listCreateRequest(ctx context.Context, resourceGro // listHandleResponse handles the List response. func (client *FlowLogsClient) listHandleResponse(resp *http.Response) (FlowLogsClientListResponse, error) { - result := FlowLogsClientListResponse{RawResponse: resp} + result := FlowLogsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FlowLogListResult); err != nil { return FlowLogsClientListResponse{}, err } @@ -360,7 +373,7 @@ func (client *FlowLogsClient) updateTagsCreateRequest(ctx context.Context, resou // updateTagsHandleResponse handles the UpdateTags response. func (client *FlowLogsClient) updateTagsHandleResponse(resp *http.Response) (FlowLogsClientUpdateTagsResponse, error) { - result := FlowLogsClientUpdateTagsResponse{RawResponse: resp} + result := FlowLogsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FlowLog); err != nil { return FlowLogsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go index a6ba7fe690d5..a599a2fedd7f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_hubroutetables_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type HubRouteTablesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *HubRouteTablesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubRouteTablesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &HubRouteTablesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. @@ -58,22 +63,18 @@ func NewHubRouteTablesClient(subscriptionID string, credential azcore.TokenCrede // routeTableParameters - Parameters supplied to create or update RouteTable. // options - HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate // method. -func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (HubRouteTablesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) - if err != nil { - return HubRouteTablesClientCreateOrUpdatePollerResponse{}, err - } - result := HubRouteTablesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("HubRouteTablesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return HubRouteTablesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &HubRouteTablesClientCreateOrUpdatePoller{ - pt: pt, +func (client *HubRouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, routeTableParameters HubRouteTable, options *HubRouteTablesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[HubRouteTablesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, routeTableParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[HubRouteTablesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[HubRouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. @@ -130,22 +131,18 @@ func (client *HubRouteTablesClient) createOrUpdateCreateRequest(ctx context.Cont // routeTableName - The name of the RouteTable. // options - HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete // method. -func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (HubRouteTablesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return HubRouteTablesClientDeletePollerResponse{}, err - } - result := HubRouteTablesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("HubRouteTablesClient.Delete", "location", resp, client.pl) - if err != nil { - return HubRouteTablesClientDeletePollerResponse{}, err - } - result.Poller = &HubRouteTablesClientDeletePoller{ - pt: pt, +func (client *HubRouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *HubRouteTablesClientBeginDeleteOptions) (*armruntime.Poller[HubRouteTablesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[HubRouteTablesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[HubRouteTablesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a RouteTable. @@ -248,7 +245,7 @@ func (client *HubRouteTablesClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubRouteTablesClientGetResponse, error) { - result := HubRouteTablesClientGetResponse{RawResponse: resp} + result := HubRouteTablesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.HubRouteTable); err != nil { return HubRouteTablesClientGetResponse{}, err } @@ -260,16 +257,32 @@ func (client *HubRouteTablesClient) getHandleResponse(resp *http.Response) (HubR // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // options - HubRouteTablesClientListOptions contains the optional parameters for the HubRouteTablesClient.List method. -func (client *HubRouteTablesClient) List(resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) *HubRouteTablesClientListPager { - return &HubRouteTablesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *HubRouteTablesClient) List(resourceGroupName string, virtualHubName string, options *HubRouteTablesClientListOptions) *runtime.Pager[HubRouteTablesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[HubRouteTablesClientListResponse]{ + More: func(page HubRouteTablesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp HubRouteTablesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListHubRouteTablesResult.NextLink) + Fetcher: func(ctx context.Context, page *HubRouteTablesClientListResponse) (HubRouteTablesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return HubRouteTablesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return HubRouteTablesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return HubRouteTablesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -300,7 +313,7 @@ func (client *HubRouteTablesClient) listCreateRequest(ctx context.Context, resou // listHandleResponse handles the List response. func (client *HubRouteTablesClient) listHandleResponse(resp *http.Response) (HubRouteTablesClientListResponse, error) { - result := HubRouteTablesClientListResponse{RawResponse: resp} + result := HubRouteTablesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListHubRouteTablesResult); err != nil { return HubRouteTablesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go index fad1aa656a51..73991f9c44d2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_hubvirtualnetworkconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type HubVirtualNetworkConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *HubVirtualNetworkConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*HubVirtualNetworkConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &HubVirtualNetworkConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. @@ -58,22 +63,18 @@ func NewHubVirtualNetworkConnectionsClient(subscriptionID string, credential azc // hubVirtualNetworkConnectionParameters - Parameters supplied to create or update a hub virtual network connection. // options - HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate // method. -func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) - if err != nil { - return HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("HubVirtualNetworkConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &HubVirtualNetworkConnectionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *HubVirtualNetworkConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, hubVirtualNetworkConnectionParameters HubVirtualNetworkConnection, options *HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, hubVirtualNetworkConnectionParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a hub virtual network connection if it doesn't exist else updates the existing one. @@ -130,22 +131,18 @@ func (client *HubVirtualNetworkConnectionsClient) createOrUpdateCreateRequest(ct // connectionName - The name of the HubVirtualNetworkConnection. // options - HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete // method. -func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (HubVirtualNetworkConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return HubVirtualNetworkConnectionsClientDeletePollerResponse{}, err - } - result := HubVirtualNetworkConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("HubVirtualNetworkConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return HubVirtualNetworkConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &HubVirtualNetworkConnectionsClientDeletePoller{ - pt: pt, +func (client *HubVirtualNetworkConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *HubVirtualNetworkConnectionsClientBeginDeleteOptions) (*armruntime.Poller[HubVirtualNetworkConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[HubVirtualNetworkConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[HubVirtualNetworkConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a HubVirtualNetworkConnection. @@ -249,7 +246,7 @@ func (client *HubVirtualNetworkConnectionsClient) getCreateRequest(ctx context.C // getHandleResponse handles the Get response. func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientGetResponse, error) { - result := HubVirtualNetworkConnectionsClientGetResponse{RawResponse: resp} + result := HubVirtualNetworkConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.HubVirtualNetworkConnection); err != nil { return HubVirtualNetworkConnectionsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *HubVirtualNetworkConnectionsClient) getHandleResponse(resp *http.R // virtualHubName - The name of the VirtualHub. // options - HubVirtualNetworkConnectionsClientListOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.List // method. -func (client *HubVirtualNetworkConnectionsClient) List(resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) *HubVirtualNetworkConnectionsClientListPager { - return &HubVirtualNetworkConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *HubVirtualNetworkConnectionsClient) List(resourceGroupName string, virtualHubName string, options *HubVirtualNetworkConnectionsClientListOptions) *runtime.Pager[HubVirtualNetworkConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[HubVirtualNetworkConnectionsClientListResponse]{ + More: func(page HubVirtualNetworkConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp HubVirtualNetworkConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListHubVirtualNetworkConnectionsResult.NextLink) + Fetcher: func(ctx context.Context, page *HubVirtualNetworkConnectionsClientListResponse) (HubVirtualNetworkConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return HubVirtualNetworkConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return HubVirtualNetworkConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return HubVirtualNetworkConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *HubVirtualNetworkConnectionsClient) listCreateRequest(ctx context. // listHandleResponse handles the List response. func (client *HubVirtualNetworkConnectionsClient) listHandleResponse(resp *http.Response) (HubVirtualNetworkConnectionsClientListResponse, error) { - result := HubVirtualNetworkConnectionsClientListResponse{RawResponse: resp} + result := HubVirtualNetworkConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListHubVirtualNetworkConnectionsResult); err != nil { return HubVirtualNetworkConnectionsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go index 105f7d7e5364..adea7baca7c8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundnatrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InboundNatRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InboundNatRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundNatRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InboundNatRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a load balancer inbound NAT rule. @@ -58,22 +63,18 @@ func NewInboundNatRulesClient(subscriptionID string, credential azcore.TokenCred // inboundNatRuleParameters - Parameters supplied to the create or update inbound NAT rule operation. // options - InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate // method. -func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (InboundNatRulesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) - if err != nil { - return InboundNatRulesClientCreateOrUpdatePollerResponse{}, err - } - result := InboundNatRulesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InboundNatRulesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return InboundNatRulesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &InboundNatRulesClientCreateOrUpdatePoller{ - pt: pt, +func (client *InboundNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, options *InboundNatRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[InboundNatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InboundNatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[InboundNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a load balancer inbound NAT rule. @@ -130,22 +131,18 @@ func (client *InboundNatRulesClient) createOrUpdateCreateRequest(ctx context.Con // inboundNatRuleName - The name of the inbound NAT rule. // options - InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete // method. -func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (InboundNatRulesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) - if err != nil { - return InboundNatRulesClientDeletePollerResponse{}, err - } - result := InboundNatRulesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InboundNatRulesClient.Delete", "location", resp, client.pl) - if err != nil { - return InboundNatRulesClientDeletePollerResponse{}, err - } - result.Poller = &InboundNatRulesClientDeletePoller{ - pt: pt, +func (client *InboundNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, options *InboundNatRulesClientBeginDeleteOptions) (*armruntime.Poller[InboundNatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InboundNatRulesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[InboundNatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified load balancer inbound NAT rule. @@ -251,7 +248,7 @@ func (client *InboundNatRulesClient) getCreateRequest(ctx context.Context, resou // getHandleResponse handles the Get response. func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (InboundNatRulesClientGetResponse, error) { - result := InboundNatRulesClientGetResponse{RawResponse: resp} + result := InboundNatRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRule); err != nil { return InboundNatRulesClientGetResponse{}, err } @@ -263,16 +260,32 @@ func (client *InboundNatRulesClient) getHandleResponse(resp *http.Response) (Inb // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // options - InboundNatRulesClientListOptions contains the optional parameters for the InboundNatRulesClient.List method. -func (client *InboundNatRulesClient) List(resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) *InboundNatRulesClientListPager { - return &InboundNatRulesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *InboundNatRulesClient) List(resourceGroupName string, loadBalancerName string, options *InboundNatRulesClientListOptions) *runtime.Pager[InboundNatRulesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[InboundNatRulesClientListResponse]{ + More: func(page InboundNatRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InboundNatRulesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InboundNatRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *InboundNatRulesClientListResponse) (InboundNatRulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InboundNatRulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InboundNatRulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InboundNatRulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -303,7 +316,7 @@ func (client *InboundNatRulesClient) listCreateRequest(ctx context.Context, reso // listHandleResponse handles the List response. func (client *InboundNatRulesClient) listHandleResponse(resp *http.Response) (InboundNatRulesClientListResponse, error) { - result := InboundNatRulesClientListResponse{RawResponse: resp} + result := InboundNatRulesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InboundNatRuleListResult); err != nil { return InboundNatRulesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go index ca4956ad233d..0d29713e0806 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_inboundsecurityrule_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InboundSecurityRuleClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InboundSecurityRuleClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundSecurityRuleClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InboundSecurityRuleClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. @@ -58,22 +63,18 @@ func NewInboundSecurityRuleClient(subscriptionID string, credential azcore.Token // parameters - Parameters supplied to the create or update Network Virtual Appliance Inbound Security Rules operation. // options - InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate // method. -func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (InboundSecurityRuleClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) - if err != nil { - return InboundSecurityRuleClientCreateOrUpdatePollerResponse{}, err - } - result := InboundSecurityRuleClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InboundSecurityRuleClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return InboundSecurityRuleClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &InboundSecurityRuleClientCreateOrUpdatePoller{ - pt: pt, +func (client *InboundSecurityRuleClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, ruleCollectionName string, parameters InboundSecurityRule, options *InboundSecurityRuleClientBeginCreateOrUpdateOptions) (*armruntime.Poller[InboundSecurityRuleClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, ruleCollectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InboundSecurityRuleClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[InboundSecurityRuleClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Inbound Security Rules. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go index 3639da370142..3e0dab478510 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceipconfigurations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InterfaceIPConfigurationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InterfaceIPConfigurationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInterfaceIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceIPConfigurationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InterfaceIPConfigurationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets the specified network interface ip configuration. @@ -104,7 +109,7 @@ func (client *InterfaceIPConfigurationsClient) getCreateRequest(ctx context.Cont // getHandleResponse handles the Get response. func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientGetResponse, error) { - result := InterfaceIPConfigurationsClientGetResponse{RawResponse: resp} + result := InterfaceIPConfigurationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { return InterfaceIPConfigurationsClientGetResponse{}, err } @@ -117,16 +122,32 @@ func (client *InterfaceIPConfigurationsClient) getHandleResponse(resp *http.Resp // networkInterfaceName - The name of the network interface. // options - InterfaceIPConfigurationsClientListOptions contains the optional parameters for the InterfaceIPConfigurationsClient.List // method. -func (client *InterfaceIPConfigurationsClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) *InterfaceIPConfigurationsClientListPager { - return &InterfaceIPConfigurationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) +func (client *InterfaceIPConfigurationsClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceIPConfigurationsClientListOptions) *runtime.Pager[InterfaceIPConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfaceIPConfigurationsClientListResponse]{ + More: func(page InterfaceIPConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfaceIPConfigurationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceIPConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfaceIPConfigurationsClientListResponse) (InterfaceIPConfigurationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfaceIPConfigurationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfaceIPConfigurationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfaceIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -157,7 +178,7 @@ func (client *InterfaceIPConfigurationsClient) listCreateRequest(ctx context.Con // listHandleResponse handles the List response. func (client *InterfaceIPConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceIPConfigurationsClientListResponse, error) { - result := InterfaceIPConfigurationsClientListResponse{RawResponse: resp} + result := InterfaceIPConfigurationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { return InterfaceIPConfigurationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go index 6c425526de8c..933465a0ddea 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaceloadbalancers_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InterfaceLoadBalancersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InterfaceLoadBalancersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceLoadBalancersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InterfaceLoadBalancersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - List all load balancers in a network interface. @@ -56,16 +61,32 @@ func NewInterfaceLoadBalancersClient(subscriptionID string, credential azcore.To // networkInterfaceName - The name of the network interface. // options - InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List // method. -func (client *InterfaceLoadBalancersClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) *InterfaceLoadBalancersClientListPager { - return &InterfaceLoadBalancersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) +func (client *InterfaceLoadBalancersClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceLoadBalancersClientListOptions) *runtime.Pager[InterfaceLoadBalancersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfaceLoadBalancersClientListResponse]{ + More: func(page InterfaceLoadBalancersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfaceLoadBalancersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceLoadBalancerListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfaceLoadBalancersClientListResponse) (InterfaceLoadBalancersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfaceLoadBalancersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfaceLoadBalancersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfaceLoadBalancersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -96,7 +117,7 @@ func (client *InterfaceLoadBalancersClient) listCreateRequest(ctx context.Contex // listHandleResponse handles the List response. func (client *InterfaceLoadBalancersClient) listHandleResponse(resp *http.Response) (InterfaceLoadBalancersClientListResponse, error) { - result := InterfaceLoadBalancersClientListResponse{RawResponse: resp} + result := InterfaceLoadBalancersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceLoadBalancerListResult); err != nil { return InterfaceLoadBalancersClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go index d1a6035741ff..51f457fae8b0 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfaces_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InterfacesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InterfacesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfacesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InterfacesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a network interface. @@ -57,22 +62,18 @@ func NewInterfacesClient(subscriptionID string, credential azcore.TokenCredentia // parameters - Parameters supplied to the create or update network interface operation. // options - InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate // method. -func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (InterfacesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters, options) - if err != nil { - return InterfacesClientCreateOrUpdatePollerResponse{}, err - } - result := InterfacesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *InterfacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface, options *InterfacesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[InterfacesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfacesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfacesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("InterfacesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return InterfacesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &InterfacesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a network interface. @@ -123,22 +124,18 @@ func (client *InterfacesClient) createOrUpdateCreateRequest(ctx context.Context, // resourceGroupName - The name of the resource group. // networkInterfaceName - The name of the network interface. // options - InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. -func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (InterfacesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return InterfacesClientDeletePollerResponse{}, err - } - result := InterfacesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InterfacesClient.Delete", "location", resp, client.pl) - if err != nil { - return InterfacesClientDeletePollerResponse{}, err +func (client *InterfacesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginDeleteOptions) (*armruntime.Poller[InterfacesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfacesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfacesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &InterfacesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified network interface. @@ -235,7 +232,7 @@ func (client *InterfacesClient) getCreateRequest(ctx context.Context, resourceGr // getHandleResponse handles the Get response. func (client *InterfacesClient) getHandleResponse(resp *http.Response) (InterfacesClientGetResponse, error) { - result := InterfacesClientGetResponse{RawResponse: resp} + result := InterfacesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { return InterfacesClientGetResponse{}, err } @@ -304,7 +301,7 @@ func (client *InterfacesClient) getCloudServiceNetworkInterfaceCreateRequest(ctx // getCloudServiceNetworkInterfaceHandleResponse handles the GetCloudServiceNetworkInterface response. func (client *InterfacesClient) getCloudServiceNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetCloudServiceNetworkInterfaceResponse, error) { - result := InterfacesClientGetCloudServiceNetworkInterfaceResponse{RawResponse: resp} + result := InterfacesClientGetCloudServiceNetworkInterfaceResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { return InterfacesClientGetCloudServiceNetworkInterfaceResponse{}, err } @@ -317,22 +314,18 @@ func (client *InterfacesClient) getCloudServiceNetworkInterfaceHandleResponse(re // networkInterfaceName - The name of the network interface. // options - InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable // method. -func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (InterfacesClientGetEffectiveRouteTablePollerResponse, error) { - resp, err := client.getEffectiveRouteTable(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return InterfacesClientGetEffectiveRouteTablePollerResponse{}, err - } - result := InterfacesClientGetEffectiveRouteTablePollerResponse{ - RawResponse: resp, +func (client *InterfacesClient) BeginGetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginGetEffectiveRouteTableOptions) (*armruntime.Poller[InterfacesClientGetEffectiveRouteTableResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getEffectiveRouteTable(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfacesClientGetEffectiveRouteTableResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfacesClientGetEffectiveRouteTableResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("InterfacesClient.GetEffectiveRouteTable", "location", resp, client.pl) - if err != nil { - return InterfacesClientGetEffectiveRouteTablePollerResponse{}, err - } - result.Poller = &InterfacesClientGetEffectiveRouteTablePoller{ - pt: pt, - } - return result, nil } // GetEffectiveRouteTable - Gets all route tables applied to a network interface. @@ -446,7 +439,7 @@ func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationCreateRe // getVirtualMachineScaleSetIPConfigurationHandleResponse handles the GetVirtualMachineScaleSetIPConfiguration response. func (client *InterfacesClient) getVirtualMachineScaleSetIPConfigurationHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse, error) { - result := InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{RawResponse: resp} + result := InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfiguration); err != nil { return InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse{}, err } @@ -515,7 +508,7 @@ func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceCreateR // getVirtualMachineScaleSetNetworkInterfaceHandleResponse handles the GetVirtualMachineScaleSetNetworkInterface response. func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleResponse(resp *http.Response) (InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse, error) { - result := InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{RawResponse: resp} + result := InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { return InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse{}, err } @@ -526,16 +519,32 @@ func (client *InterfacesClient) getVirtualMachineScaleSetNetworkInterfaceHandleR // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - InterfacesClientListOptions contains the optional parameters for the InterfacesClient.List method. -func (client *InterfacesClient) List(resourceGroupName string, options *InterfacesClientListOptions) *InterfacesClientListPager { - return &InterfacesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *InterfacesClient) List(resourceGroupName string, options *InterfacesClientListOptions) *runtime.Pager[InterfacesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListResponse]{ + More: func(page InterfacesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListResponse) (InterfacesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -562,7 +571,7 @@ func (client *InterfacesClient) listCreateRequest(ctx context.Context, resourceG // listHandleResponse handles the List response. func (client *InterfacesClient) listHandleResponse(resp *http.Response) (InterfacesClientListResponse, error) { - result := InterfacesClientListResponse{RawResponse: resp} + result := InterfacesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListResponse{}, err } @@ -572,16 +581,32 @@ func (client *InterfacesClient) listHandleResponse(resp *http.Response) (Interfa // ListAll - Gets all network interfaces in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - InterfacesClientListAllOptions contains the optional parameters for the InterfacesClient.ListAll method. -func (client *InterfacesClient) ListAll(options *InterfacesClientListAllOptions) *InterfacesClientListAllPager { - return &InterfacesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *InterfacesClient) ListAll(options *InterfacesClientListAllOptions) *runtime.Pager[InterfacesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListAllResponse]{ + More: func(page InterfacesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListAllResponse) (InterfacesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -604,7 +629,7 @@ func (client *InterfacesClient) listAllCreateRequest(ctx context.Context, option // listAllHandleResponse handles the ListAll response. func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (InterfacesClientListAllResponse, error) { - result := InterfacesClientListAllResponse{RawResponse: resp} + result := InterfacesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListAllResponse{}, err } @@ -617,16 +642,32 @@ func (client *InterfacesClient) listAllHandleResponse(resp *http.Response) (Inte // cloudServiceName - The name of the cloud service. // options - InterfacesClientListCloudServiceNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListCloudServiceNetworkInterfaces // method. -func (client *InterfacesClient) ListCloudServiceNetworkInterfaces(resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) *InterfacesClientListCloudServiceNetworkInterfacesPager { - return &InterfacesClientListCloudServiceNetworkInterfacesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) +func (client *InterfacesClient) ListCloudServiceNetworkInterfaces(resourceGroupName string, cloudServiceName string, options *InterfacesClientListCloudServiceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListCloudServiceNetworkInterfacesResponse]{ + More: func(page InterfacesClientListCloudServiceNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListCloudServiceNetworkInterfacesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceNetworkInterfacesResponse) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCloudServiceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) + } + return client.listCloudServiceNetworkInterfacesHandleResponse(resp) }, - } + }) } // listCloudServiceNetworkInterfacesCreateRequest creates the ListCloudServiceNetworkInterfaces request. @@ -657,7 +698,7 @@ func (client *InterfacesClient) listCloudServiceNetworkInterfacesCreateRequest(c // listCloudServiceNetworkInterfacesHandleResponse handles the ListCloudServiceNetworkInterfaces response. func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceNetworkInterfacesResponse, error) { - result := InterfacesClientListCloudServiceNetworkInterfacesResponse{RawResponse: resp} + result := InterfacesClientListCloudServiceNetworkInterfacesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListCloudServiceNetworkInterfacesResponse{}, err } @@ -672,16 +713,32 @@ func (client *InterfacesClient) listCloudServiceNetworkInterfacesHandleResponse( // roleInstanceName - The name of role instance. // options - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions contains the optional parameters for the // InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces method. -func (client *InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfaces(resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager { - return &InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) +func (client *InterfacesClient) ListCloudServiceRoleInstanceNetworkInterfaces(resourceGroupName string, cloudServiceName string, roleInstanceName string, options *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse]{ + More: func(page InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCloudServiceRoleInstanceNetworkInterfacesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, runtime.NewResponseError(resp) + } + return client.listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp) }, - } + }) } // listCloudServiceRoleInstanceNetworkInterfacesCreateRequest creates the ListCloudServiceRoleInstanceNetworkInterfaces request. @@ -716,7 +773,7 @@ func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesCre // listCloudServiceRoleInstanceNetworkInterfacesHandleResponse handles the ListCloudServiceRoleInstanceNetworkInterfaces response. func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse, error) { - result := InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{RawResponse: resp} + result := InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse{}, err } @@ -729,22 +786,18 @@ func (client *InterfacesClient) listCloudServiceRoleInstanceNetworkInterfacesHan // networkInterfaceName - The name of the network interface. // options - InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups // method. -func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse, error) { - resp, err := client.listEffectiveNetworkSecurityGroups(ctx, resourceGroupName, networkInterfaceName, options) - if err != nil { - return InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse{}, err +func (client *InterfacesClient) BeginListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string, options *InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions) (*armruntime.Poller[InterfacesClientListEffectiveNetworkSecurityGroupsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listEffectiveNetworkSecurityGroups(ctx, resourceGroupName, networkInterfaceName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfacesClientListEffectiveNetworkSecurityGroupsResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfacesClientListEffectiveNetworkSecurityGroupsResponse](options.ResumeToken, client.pl, nil) } - result := InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InterfacesClient.ListEffectiveNetworkSecurityGroups", "location", resp, client.pl) - if err != nil { - return InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse{}, err - } - result.Poller = &InterfacesClientListEffectiveNetworkSecurityGroupsPoller{ - pt: pt, - } - return result, nil } // ListEffectiveNetworkSecurityGroups - Gets all network security groups applied to a network interface. @@ -799,16 +852,32 @@ func (client *InterfacesClient) listEffectiveNetworkSecurityGroupsCreateRequest( // networkInterfaceName - The name of the network interface. // options - InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetIPConfigurations // method. -func (client *InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) *InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager { - return &InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) +func (client *InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, options *InterfacesClientListVirtualMachineScaleSetIPConfigurationsOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceIPConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVirtualMachineScaleSetIPConfigurationsCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, runtime.NewResponseError(resp) + } + return client.listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp) }, - } + }) } // listVirtualMachineScaleSetIPConfigurationsCreateRequest creates the ListVirtualMachineScaleSetIPConfigurations request. @@ -850,7 +919,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsCreate // listVirtualMachineScaleSetIPConfigurationsHandleResponse handles the ListVirtualMachineScaleSetIPConfigurations response. func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{RawResponse: resp} + result := InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceIPConfigurationListResult); err != nil { return InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse{}, err } @@ -863,16 +932,32 @@ func (client *InterfacesClient) listVirtualMachineScaleSetIPConfigurationsHandle // virtualMachineScaleSetName - The name of the virtual machine scale set. // options - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions contains the optional parameters for the InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces // method. -func (client *InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager { - return &InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) +func (client *InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, options *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVirtualMachineScaleSetNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, runtime.NewResponseError(resp) + } + return client.listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp) }, - } + }) } // listVirtualMachineScaleSetNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetNetworkInterfaces request. @@ -903,7 +988,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesCreat // listVirtualMachineScaleSetNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetNetworkInterfaces response. func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{RawResponse: resp} + result := InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse{}, err } @@ -918,16 +1003,32 @@ func (client *InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesHandl // virtualmachineIndex - The virtual machine index. // options - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions contains the optional parameters for the // InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces method. -func (client *InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager { - return &InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) +func (client *InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, options *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesOptions) *runtime.Pager[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse]{ + More: func(page InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, runtime.NewResponseError(resp) + } + return client.listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp) }, - } + }) } // listVirtualMachineScaleSetVMNetworkInterfacesCreateRequest creates the ListVirtualMachineScaleSetVMNetworkInterfaces request. @@ -962,7 +1063,7 @@ func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesCre // listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse handles the ListVirtualMachineScaleSetVMNetworkInterfaces response. func (client *InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp *http.Response) (InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse, error) { - result := InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{RawResponse: resp} + result := InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse{}, err } @@ -1018,7 +1119,7 @@ func (client *InterfacesClient) updateTagsCreateRequest(ctx context.Context, res // updateTagsHandleResponse handles the UpdateTags response. func (client *InterfacesClient) updateTagsHandleResponse(resp *http.Response) (InterfacesClientUpdateTagsResponse, error) { - result := InterfacesClientUpdateTagsResponse{RawResponse: resp} + result := InterfacesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Interface); err != nil { return InterfacesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go index eea924b4b0af..7394d6f9662c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_interfacetapconfigurations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type InterfaceTapConfigurationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *InterfaceTapConfigurationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InterfaceTapConfigurationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &InterfaceTapConfigurationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. @@ -58,22 +63,18 @@ func NewInterfaceTapConfigurationsClient(subscriptionID string, credential azcor // tapConfigurationParameters - Parameters supplied to the create or update tap configuration operation. // options - InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate // method. -func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) - if err != nil { - return InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse{}, err - } - result := InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InterfaceTapConfigurationsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &InterfaceTapConfigurationsClientCreateOrUpdatePoller{ - pt: pt, +func (client *InterfaceTapConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration, options *InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[InterfaceTapConfigurationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, tapConfigurationParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfaceTapConfigurationsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a Tap configuration in the specified NetworkInterface. @@ -130,22 +131,18 @@ func (client *InterfaceTapConfigurationsClient) createOrUpdateCreateRequest(ctx // tapConfigurationName - The name of the tap configuration. // options - InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete // method. -func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (InterfaceTapConfigurationsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) - if err != nil { - return InterfaceTapConfigurationsClientDeletePollerResponse{}, err - } - result := InterfaceTapConfigurationsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("InterfaceTapConfigurationsClient.Delete", "location", resp, client.pl) - if err != nil { - return InterfaceTapConfigurationsClientDeletePollerResponse{}, err - } - result.Poller = &InterfaceTapConfigurationsClientDeletePoller{ - pt: pt, +func (client *InterfaceTapConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, options *InterfaceTapConfigurationsClientBeginDeleteOptions) (*armruntime.Poller[InterfaceTapConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[InterfaceTapConfigurationsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[InterfaceTapConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified tap configuration from the NetworkInterface. @@ -249,7 +246,7 @@ func (client *InterfaceTapConfigurationsClient) getCreateRequest(ctx context.Con // getHandleResponse handles the Get response. func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientGetResponse, error) { - result := InterfaceTapConfigurationsClientGetResponse{RawResponse: resp} + result := InterfaceTapConfigurationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfiguration); err != nil { return InterfaceTapConfigurationsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *InterfaceTapConfigurationsClient) getHandleResponse(resp *http.Res // networkInterfaceName - The name of the network interface. // options - InterfaceTapConfigurationsClientListOptions contains the optional parameters for the InterfaceTapConfigurationsClient.List // method. -func (client *InterfaceTapConfigurationsClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) *InterfaceTapConfigurationsClientListPager { - return &InterfaceTapConfigurationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) +func (client *InterfaceTapConfigurationsClient) List(resourceGroupName string, networkInterfaceName string, options *InterfaceTapConfigurationsClientListOptions) *runtime.Pager[InterfaceTapConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[InterfaceTapConfigurationsClientListResponse]{ + More: func(page InterfaceTapConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp InterfaceTapConfigurationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceTapConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *InterfaceTapConfigurationsClientListResponse) (InterfaceTapConfigurationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkInterfaceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return InterfaceTapConfigurationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return InterfaceTapConfigurationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return InterfaceTapConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *InterfaceTapConfigurationsClient) listCreateRequest(ctx context.Co // listHandleResponse handles the List response. func (client *InterfaceTapConfigurationsClient) listHandleResponse(resp *http.Response) (InterfaceTapConfigurationsClientListResponse, error) { - result := InterfaceTapConfigurationsClientListResponse{RawResponse: resp} + result := InterfaceTapConfigurationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceTapConfigurationListResult); err != nil { return InterfaceTapConfigurationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go index 27bd74470c6f..0e5467ed2a3b 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ipallocations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type IPAllocationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *IPAllocationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPAllocationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &IPAllocationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. @@ -57,22 +62,18 @@ func NewIPAllocationsClient(subscriptionID string, credential azcore.TokenCreden // parameters - Parameters supplied to the create or update virtual network operation. // options - IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate // method. -func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (IPAllocationsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ipAllocationName, parameters, options) - if err != nil { - return IPAllocationsClientCreateOrUpdatePollerResponse{}, err - } - result := IPAllocationsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *IPAllocationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipAllocationName string, parameters IPAllocation, options *IPAllocationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[IPAllocationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ipAllocationName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[IPAllocationsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[IPAllocationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("IPAllocationsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return IPAllocationsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &IPAllocationsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an IpAllocation in the specified resource group. @@ -124,22 +125,18 @@ func (client *IPAllocationsClient) createOrUpdateCreateRequest(ctx context.Conte // ipAllocationName - The name of the IpAllocation. // options - IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete // method. -func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (IPAllocationsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, ipAllocationName, options) - if err != nil { - return IPAllocationsClientDeletePollerResponse{}, err - } - result := IPAllocationsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("IPAllocationsClient.Delete", "location", resp, client.pl) - if err != nil { - return IPAllocationsClientDeletePollerResponse{}, err +func (client *IPAllocationsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipAllocationName string, options *IPAllocationsClientBeginDeleteOptions) (*armruntime.Poller[IPAllocationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ipAllocationName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[IPAllocationsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[IPAllocationsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &IPAllocationsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified IpAllocation. @@ -236,7 +233,7 @@ func (client *IPAllocationsClient) getCreateRequest(ctx context.Context, resourc // getHandleResponse handles the Get response. func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAllocationsClientGetResponse, error) { - result := IPAllocationsClientGetResponse{RawResponse: resp} + result := IPAllocationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { return IPAllocationsClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *IPAllocationsClient) getHandleResponse(resp *http.Response) (IPAll // List - Gets all IpAllocations in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - IPAllocationsClientListOptions contains the optional parameters for the IPAllocationsClient.List method. -func (client *IPAllocationsClient) List(options *IPAllocationsClientListOptions) *IPAllocationsClientListPager { - return &IPAllocationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *IPAllocationsClient) List(options *IPAllocationsClientListOptions) *runtime.Pager[IPAllocationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[IPAllocationsClientListResponse]{ + More: func(page IPAllocationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp IPAllocationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.IPAllocationListResult.NextLink) + Fetcher: func(ctx context.Context, page *IPAllocationsClientListResponse) (IPAllocationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return IPAllocationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return IPAllocationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return IPAllocationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -278,7 +291,7 @@ func (client *IPAllocationsClient) listCreateRequest(ctx context.Context, option // listHandleResponse handles the List response. func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAllocationsClientListResponse, error) { - result := IPAllocationsClientListResponse{RawResponse: resp} + result := IPAllocationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { return IPAllocationsClientListResponse{}, err } @@ -290,16 +303,32 @@ func (client *IPAllocationsClient) listHandleResponse(resp *http.Response) (IPAl // resourceGroupName - The name of the resource group. // options - IPAllocationsClientListByResourceGroupOptions contains the optional parameters for the IPAllocationsClient.ListByResourceGroup // method. -func (client *IPAllocationsClient) ListByResourceGroup(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *IPAllocationsClientListByResourceGroupPager { - return &IPAllocationsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *IPAllocationsClient) ListByResourceGroup(resourceGroupName string, options *IPAllocationsClientListByResourceGroupOptions) *runtime.Pager[IPAllocationsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[IPAllocationsClientListByResourceGroupResponse]{ + More: func(page IPAllocationsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp IPAllocationsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.IPAllocationListResult.NextLink) + Fetcher: func(ctx context.Context, page *IPAllocationsClientListByResourceGroupResponse) (IPAllocationsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return IPAllocationsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return IPAllocationsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return IPAllocationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -326,7 +355,7 @@ func (client *IPAllocationsClient) listByResourceGroupCreateRequest(ctx context. // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *IPAllocationsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPAllocationsClientListByResourceGroupResponse, error) { - result := IPAllocationsClientListByResourceGroupResponse{RawResponse: resp} + result := IPAllocationsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocationListResult); err != nil { return IPAllocationsClientListByResourceGroupResponse{}, err } @@ -383,7 +412,7 @@ func (client *IPAllocationsClient) updateTagsCreateRequest(ctx context.Context, // updateTagsHandleResponse handles the UpdateTags response. func (client *IPAllocationsClient) updateTagsHandleResponse(resp *http.Response) (IPAllocationsClientUpdateTagsResponse, error) { - result := IPAllocationsClientUpdateTagsResponse{RawResponse: resp} + result := IPAllocationsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPAllocation); err != nil { return IPAllocationsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go index c30ddb89a87b..84d0947805db 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_ipgroups_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type IPGroupsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *IPGroupsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IPGroupsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &IPGroupsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an ipGroups in a specified resource group. @@ -57,22 +62,18 @@ func NewIPGroupsClient(subscriptionID string, credential azcore.TokenCredential, // parameters - Parameters supplied to the create or update IpGroups operation. // options - IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate // method. -func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (IPGroupsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, ipGroupsName, parameters, options) - if err != nil { - return IPGroupsClientCreateOrUpdatePollerResponse{}, err - } - result := IPGroupsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *IPGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ipGroupsName string, parameters IPGroup, options *IPGroupsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[IPGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, ipGroupsName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[IPGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[IPGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("IPGroupsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return IPGroupsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &IPGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an ipGroups in a specified resource group. @@ -123,22 +124,18 @@ func (client *IPGroupsClient) createOrUpdateCreateRequest(ctx context.Context, r // resourceGroupName - The name of the resource group. // ipGroupsName - The name of the ipGroups. // options - IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. -func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (IPGroupsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, ipGroupsName, options) - if err != nil { - return IPGroupsClientDeletePollerResponse{}, err - } - result := IPGroupsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("IPGroupsClient.Delete", "location", resp, client.pl) - if err != nil { - return IPGroupsClientDeletePollerResponse{}, err +func (client *IPGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, ipGroupsName string, options *IPGroupsClientBeginDeleteOptions) (*armruntime.Poller[IPGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, ipGroupsName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[IPGroupsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[IPGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &IPGroupsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified ipGroups. @@ -235,7 +232,7 @@ func (client *IPGroupsClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsClientGetResponse, error) { - result := IPGroupsClientGetResponse{RawResponse: resp} + result := IPGroupsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { return IPGroupsClientGetResponse{}, err } @@ -245,16 +242,32 @@ func (client *IPGroupsClient) getHandleResponse(resp *http.Response) (IPGroupsCl // List - Gets all IpGroups in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - IPGroupsClientListOptions contains the optional parameters for the IPGroupsClient.List method. -func (client *IPGroupsClient) List(options *IPGroupsClientListOptions) *IPGroupsClientListPager { - return &IPGroupsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *IPGroupsClient) List(options *IPGroupsClientListOptions) *runtime.Pager[IPGroupsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[IPGroupsClientListResponse]{ + More: func(page IPGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp IPGroupsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.IPGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *IPGroupsClientListResponse) (IPGroupsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return IPGroupsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return IPGroupsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return IPGroupsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -277,7 +290,7 @@ func (client *IPGroupsClient) listCreateRequest(ctx context.Context, options *IP // listHandleResponse handles the List response. func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsClientListResponse, error) { - result := IPGroupsClientListResponse{RawResponse: resp} + result := IPGroupsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { return IPGroupsClientListResponse{}, err } @@ -289,16 +302,32 @@ func (client *IPGroupsClient) listHandleResponse(resp *http.Response) (IPGroupsC // resourceGroupName - The name of the resource group. // options - IPGroupsClientListByResourceGroupOptions contains the optional parameters for the IPGroupsClient.ListByResourceGroup // method. -func (client *IPGroupsClient) ListByResourceGroup(resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) *IPGroupsClientListByResourceGroupPager { - return &IPGroupsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *IPGroupsClient) ListByResourceGroup(resourceGroupName string, options *IPGroupsClientListByResourceGroupOptions) *runtime.Pager[IPGroupsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[IPGroupsClientListByResourceGroupResponse]{ + More: func(page IPGroupsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp IPGroupsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.IPGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *IPGroupsClientListByResourceGroupResponse) (IPGroupsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return IPGroupsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return IPGroupsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return IPGroupsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -325,7 +354,7 @@ func (client *IPGroupsClient) listByResourceGroupCreateRequest(ctx context.Conte // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *IPGroupsClient) listByResourceGroupHandleResponse(resp *http.Response) (IPGroupsClientListByResourceGroupResponse, error) { - result := IPGroupsClientListByResourceGroupResponse{RawResponse: resp} + result := IPGroupsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPGroupListResult); err != nil { return IPGroupsClientListByResourceGroupResponse{}, err } @@ -381,7 +410,7 @@ func (client *IPGroupsClient) updateGroupsCreateRequest(ctx context.Context, res // updateGroupsHandleResponse handles the UpdateGroups response. func (client *IPGroupsClient) updateGroupsHandleResponse(resp *http.Response) (IPGroupsClientUpdateGroupsResponse, error) { - result := IPGroupsClientUpdateGroupsResponse{RawResponse: resp} + result := IPGroupsClientUpdateGroupsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPGroup); err != nil { return IPGroupsClientUpdateGroupsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go index e7b58c60cf3d..de92aa52a196 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerbackendaddresspools_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerBackendAddressPoolsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerBackendAddressPoolsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerBackendAddressPoolsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerBackendAddressPoolsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a load balancer backend address pool. @@ -58,22 +63,18 @@ func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string, credential // parameters - Parameters supplied to the create or update load balancer backend address pool operation. // options - LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate // method. -func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) - if err != nil { - return LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse{}, err - } - result := LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancerBackendAddressPoolsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller{ - pt: pt, +func (client *LoadBalancerBackendAddressPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, parameters BackendAddressPool, options *LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a load balancer backend address pool. @@ -130,22 +131,18 @@ func (client *LoadBalancerBackendAddressPoolsClient) createOrUpdateCreateRequest // backendAddressPoolName - The name of the backend address pool. // options - LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete // method. -func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (LoadBalancerBackendAddressPoolsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) - if err != nil { - return LoadBalancerBackendAddressPoolsClientDeletePollerResponse{}, err - } - result := LoadBalancerBackendAddressPoolsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancerBackendAddressPoolsClient.Delete", "location", resp, client.pl) - if err != nil { - return LoadBalancerBackendAddressPoolsClientDeletePollerResponse{}, err - } - result.Poller = &LoadBalancerBackendAddressPoolsClientDeletePoller{ - pt: pt, +func (client *LoadBalancerBackendAddressPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string, options *LoadBalancerBackendAddressPoolsClientBeginDeleteOptions) (*armruntime.Poller[LoadBalancerBackendAddressPoolsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancerBackendAddressPoolsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancerBackendAddressPoolsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified load balancer backend address pool. @@ -249,7 +246,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) getCreateRequest(ctx contex // getHandleResponse handles the Get response. func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientGetResponse, error) { - result := LoadBalancerBackendAddressPoolsClientGetResponse{RawResponse: resp} + result := LoadBalancerBackendAddressPoolsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BackendAddressPool); err != nil { return LoadBalancerBackendAddressPoolsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *LoadBalancerBackendAddressPoolsClient) getHandleResponse(resp *htt // loadBalancerName - The name of the load balancer. // options - LoadBalancerBackendAddressPoolsClientListOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.List // method. -func (client *LoadBalancerBackendAddressPoolsClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) *LoadBalancerBackendAddressPoolsClientListPager { - return &LoadBalancerBackendAddressPoolsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerBackendAddressPoolsClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerBackendAddressPoolsClientListOptions) *runtime.Pager[LoadBalancerBackendAddressPoolsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerBackendAddressPoolsClientListResponse]{ + More: func(page LoadBalancerBackendAddressPoolsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerBackendAddressPoolsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerBackendAddressPoolListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerBackendAddressPoolsClientListResponse) (LoadBalancerBackendAddressPoolsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerBackendAddressPoolsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerBackendAddressPoolsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerBackendAddressPoolsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *LoadBalancerBackendAddressPoolsClient) listCreateRequest(ctx conte // listHandleResponse handles the List response. func (client *LoadBalancerBackendAddressPoolsClient) listHandleResponse(resp *http.Response) (LoadBalancerBackendAddressPoolsClientListResponse, error) { - result := LoadBalancerBackendAddressPoolsClientListResponse{RawResponse: resp} + result := LoadBalancerBackendAddressPoolsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerBackendAddressPoolListResult); err != nil { return LoadBalancerBackendAddressPoolsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go index b6850d7b03d7..dc4f1a5da2d6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerfrontendipconfigurations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerFrontendIPConfigurationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerFrontendIPConfigurationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerFrontendIPConfigurationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerFrontendIPConfigurationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets load balancer frontend IP configuration. @@ -104,7 +109,7 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) getCreateRequest(ctx c // getHandleResponse handles the Get response. func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientGetResponse, error) { - result := LoadBalancerFrontendIPConfigurationsClientGetResponse{RawResponse: resp} + result := LoadBalancerFrontendIPConfigurationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.FrontendIPConfiguration); err != nil { return LoadBalancerFrontendIPConfigurationsClientGetResponse{}, err } @@ -117,16 +122,32 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) getHandleResponse(resp // loadBalancerName - The name of the load balancer. // options - LoadBalancerFrontendIPConfigurationsClientListOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.List // method. -func (client *LoadBalancerFrontendIPConfigurationsClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) *LoadBalancerFrontendIPConfigurationsClientListPager { - return &LoadBalancerFrontendIPConfigurationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerFrontendIPConfigurationsClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerFrontendIPConfigurationsClientListOptions) *runtime.Pager[LoadBalancerFrontendIPConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerFrontendIPConfigurationsClientListResponse]{ + More: func(page LoadBalancerFrontendIPConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerFrontendIPConfigurationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerFrontendIPConfigurationListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerFrontendIPConfigurationsClientListResponse) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerFrontendIPConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -157,7 +178,7 @@ func (client *LoadBalancerFrontendIPConfigurationsClient) listCreateRequest(ctx // listHandleResponse handles the List response. func (client *LoadBalancerFrontendIPConfigurationsClient) listHandleResponse(resp *http.Response) (LoadBalancerFrontendIPConfigurationsClientListResponse, error) { - result := LoadBalancerFrontendIPConfigurationsClientListResponse{RawResponse: resp} + result := LoadBalancerFrontendIPConfigurationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerFrontendIPConfigurationListResult); err != nil { return LoadBalancerFrontendIPConfigurationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go index 77a5c7a22f28..be8063177628 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerloadbalancingrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerLoadBalancingRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerLoadBalancingRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerLoadBalancingRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerLoadBalancingRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets the specified load balancer load balancing rule. @@ -104,7 +109,7 @@ func (client *LoadBalancerLoadBalancingRulesClient) getCreateRequest(ctx context // getHandleResponse handles the Get response. func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientGetResponse, error) { - result := LoadBalancerLoadBalancingRulesClientGetResponse{RawResponse: resp} + result := LoadBalancerLoadBalancingRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancingRule); err != nil { return LoadBalancerLoadBalancingRulesClientGetResponse{}, err } @@ -117,16 +122,32 @@ func (client *LoadBalancerLoadBalancingRulesClient) getHandleResponse(resp *http // loadBalancerName - The name of the load balancer. // options - LoadBalancerLoadBalancingRulesClientListOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.List // method. -func (client *LoadBalancerLoadBalancingRulesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) *LoadBalancerLoadBalancingRulesClientListPager { - return &LoadBalancerLoadBalancingRulesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerLoadBalancingRulesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerLoadBalancingRulesClientListOptions) *runtime.Pager[LoadBalancerLoadBalancingRulesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerLoadBalancingRulesClientListResponse]{ + More: func(page LoadBalancerLoadBalancingRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerLoadBalancingRulesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerLoadBalancingRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerLoadBalancingRulesClientListResponse) (LoadBalancerLoadBalancingRulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerLoadBalancingRulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerLoadBalancingRulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerLoadBalancingRulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -157,7 +178,7 @@ func (client *LoadBalancerLoadBalancingRulesClient) listCreateRequest(ctx contex // listHandleResponse handles the List response. func (client *LoadBalancerLoadBalancingRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerLoadBalancingRulesClientListResponse, error) { - result := LoadBalancerLoadBalancingRulesClientListResponse{RawResponse: resp} + result := LoadBalancerLoadBalancingRulesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerLoadBalancingRuleListResult); err != nil { return LoadBalancerLoadBalancingRulesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go index 97e60245821c..f006947a9816 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancernetworkinterfaces_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerNetworkInterfacesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerNetworkInterfacesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerNetworkInterfacesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerNetworkInterfacesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets associated load balancer network interfaces. @@ -56,16 +61,32 @@ func NewLoadBalancerNetworkInterfacesClient(subscriptionID string, credential az // loadBalancerName - The name of the load balancer. // options - LoadBalancerNetworkInterfacesClientListOptions contains the optional parameters for the LoadBalancerNetworkInterfacesClient.List // method. -func (client *LoadBalancerNetworkInterfacesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) *LoadBalancerNetworkInterfacesClientListPager { - return &LoadBalancerNetworkInterfacesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerNetworkInterfacesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerNetworkInterfacesClientListOptions) *runtime.Pager[LoadBalancerNetworkInterfacesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerNetworkInterfacesClientListResponse]{ + More: func(page LoadBalancerNetworkInterfacesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerNetworkInterfacesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.InterfaceListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerNetworkInterfacesClientListResponse) (LoadBalancerNetworkInterfacesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerNetworkInterfacesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerNetworkInterfacesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerNetworkInterfacesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -96,7 +117,7 @@ func (client *LoadBalancerNetworkInterfacesClient) listCreateRequest(ctx context // listHandleResponse handles the List response. func (client *LoadBalancerNetworkInterfacesClient) listHandleResponse(resp *http.Response) (LoadBalancerNetworkInterfacesClientListResponse, error) { - result := LoadBalancerNetworkInterfacesClientListResponse{RawResponse: resp} + result := LoadBalancerNetworkInterfacesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.InterfaceListResult); err != nil { return LoadBalancerNetworkInterfacesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go index d199de22381e..af9015741e49 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalanceroutboundrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerOutboundRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerOutboundRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerOutboundRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerOutboundRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerOutboundRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets the specified load balancer outbound rule. @@ -104,7 +109,7 @@ func (client *LoadBalancerOutboundRulesClient) getCreateRequest(ctx context.Cont // getHandleResponse handles the Get response. func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientGetResponse, error) { - result := LoadBalancerOutboundRulesClientGetResponse{RawResponse: resp} + result := LoadBalancerOutboundRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.OutboundRule); err != nil { return LoadBalancerOutboundRulesClientGetResponse{}, err } @@ -117,16 +122,32 @@ func (client *LoadBalancerOutboundRulesClient) getHandleResponse(resp *http.Resp // loadBalancerName - The name of the load balancer. // options - LoadBalancerOutboundRulesClientListOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.List // method. -func (client *LoadBalancerOutboundRulesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) *LoadBalancerOutboundRulesClientListPager { - return &LoadBalancerOutboundRulesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerOutboundRulesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerOutboundRulesClientListOptions) *runtime.Pager[LoadBalancerOutboundRulesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerOutboundRulesClientListResponse]{ + More: func(page LoadBalancerOutboundRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerOutboundRulesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerOutboundRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerOutboundRulesClientListResponse) (LoadBalancerOutboundRulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerOutboundRulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerOutboundRulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerOutboundRulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -157,7 +178,7 @@ func (client *LoadBalancerOutboundRulesClient) listCreateRequest(ctx context.Con // listHandleResponse handles the List response. func (client *LoadBalancerOutboundRulesClient) listHandleResponse(resp *http.Response) (LoadBalancerOutboundRulesClientListResponse, error) { - result := LoadBalancerOutboundRulesClientListResponse{RawResponse: resp} + result := LoadBalancerOutboundRulesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerOutboundRuleListResult); err != nil { return LoadBalancerOutboundRulesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go index c137124da763..37efaa8f0091 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancerprobes_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancerProbesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancerProbesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancerProbesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancerProbesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancerProbesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets load balancer probe. @@ -103,7 +108,7 @@ func (client *LoadBalancerProbesClient) getCreateRequest(ctx context.Context, re // getHandleResponse handles the Get response. func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) (LoadBalancerProbesClientGetResponse, error) { - result := LoadBalancerProbesClientGetResponse{RawResponse: resp} + result := LoadBalancerProbesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Probe); err != nil { return LoadBalancerProbesClientGetResponse{}, err } @@ -115,16 +120,32 @@ func (client *LoadBalancerProbesClient) getHandleResponse(resp *http.Response) ( // resourceGroupName - The name of the resource group. // loadBalancerName - The name of the load balancer. // options - LoadBalancerProbesClientListOptions contains the optional parameters for the LoadBalancerProbesClient.List method. -func (client *LoadBalancerProbesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) *LoadBalancerProbesClientListPager { - return &LoadBalancerProbesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) +func (client *LoadBalancerProbesClient) List(resourceGroupName string, loadBalancerName string, options *LoadBalancerProbesClientListOptions) *runtime.Pager[LoadBalancerProbesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancerProbesClientListResponse]{ + More: func(page LoadBalancerProbesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancerProbesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerProbeListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancerProbesClientListResponse) (LoadBalancerProbesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, loadBalancerName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancerProbesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancerProbesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancerProbesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -155,7 +176,7 @@ func (client *LoadBalancerProbesClient) listCreateRequest(ctx context.Context, r // listHandleResponse handles the List response. func (client *LoadBalancerProbesClient) listHandleResponse(resp *http.Response) (LoadBalancerProbesClientListResponse, error) { - result := LoadBalancerProbesClientListResponse{RawResponse: resp} + result := LoadBalancerProbesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerProbeListResult); err != nil { return LoadBalancerProbesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go index 02c84a4c6d77..806d84c23927 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_loadbalancers_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LoadBalancersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LoadBalancersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LoadBalancersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a load balancer. @@ -57,22 +62,18 @@ func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCreden // parameters - Parameters supplied to the create or update load balancer operation. // options - LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate // method. -func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (LoadBalancersClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, options) - if err != nil { - return LoadBalancersClientCreateOrUpdatePollerResponse{}, err - } - result := LoadBalancersClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancersClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return LoadBalancersClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &LoadBalancersClientCreateOrUpdatePoller{ - pt: pt, +func (client *LoadBalancersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientBeginCreateOrUpdateOptions) (*armruntime.Poller[LoadBalancersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, loadBalancerName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancersClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a load balancer. @@ -124,22 +125,18 @@ func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Conte // loadBalancerName - The name of the load balancer. // options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete // method. -func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (LoadBalancersClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, options) - if err != nil { - return LoadBalancersClientDeletePollerResponse{}, err +func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*armruntime.Poller[LoadBalancersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, loadBalancerName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancersClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancersClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result := LoadBalancersClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancersClient.Delete", "location", resp, client.pl) - if err != nil { - return LoadBalancersClientDeletePollerResponse{}, err - } - result.Poller = &LoadBalancersClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified load balancer. @@ -236,7 +233,7 @@ func (client *LoadBalancersClient) getCreateRequest(ctx context.Context, resourc // getHandleResponse handles the Get response. func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadBalancersClientGetResponse, error) { - result := LoadBalancersClientGetResponse{RawResponse: resp} + result := LoadBalancersClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { return LoadBalancersClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadB // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - LoadBalancersClientListOptions contains the optional parameters for the LoadBalancersClient.List method. -func (client *LoadBalancersClient) List(resourceGroupName string, options *LoadBalancersClientListOptions) *LoadBalancersClientListPager { - return &LoadBalancersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *LoadBalancersClient) List(resourceGroupName string, options *LoadBalancersClientListOptions) *runtime.Pager[LoadBalancersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancersClientListResponse]{ + More: func(page LoadBalancersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancersClientListResponse) (LoadBalancersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *LoadBalancersClient) listCreateRequest(ctx context.Context, resour // listHandleResponse handles the List response. func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (LoadBalancersClientListResponse, error) { - result := LoadBalancersClientListResponse{RawResponse: resp} + result := LoadBalancersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { return LoadBalancersClientListResponse{}, err } @@ -293,16 +306,32 @@ func (client *LoadBalancersClient) listHandleResponse(resp *http.Response) (Load // ListAll - Gets all the load balancers in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - LoadBalancersClientListAllOptions contains the optional parameters for the LoadBalancersClient.ListAll method. -func (client *LoadBalancersClient) ListAll(options *LoadBalancersClientListAllOptions) *LoadBalancersClientListAllPager { - return &LoadBalancersClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *LoadBalancersClient) ListAll(options *LoadBalancersClientListAllOptions) *runtime.Pager[LoadBalancersClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[LoadBalancersClientListAllResponse]{ + More: func(page LoadBalancersClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LoadBalancersClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LoadBalancerListResult.NextLink) + Fetcher: func(ctx context.Context, page *LoadBalancersClientListAllResponse) (LoadBalancersClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LoadBalancersClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LoadBalancersClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LoadBalancersClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -325,7 +354,7 @@ func (client *LoadBalancersClient) listAllCreateRequest(ctx context.Context, opt // listAllHandleResponse handles the ListAll response. func (client *LoadBalancersClient) listAllHandleResponse(resp *http.Response) (LoadBalancersClientListAllResponse, error) { - result := LoadBalancersClientListAllResponse{RawResponse: resp} + result := LoadBalancersClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { return LoadBalancersClientListAllResponse{}, err } @@ -340,22 +369,18 @@ func (client *LoadBalancersClient) listAllHandleResponse(resp *http.Response) (L // parameters - Query inbound NAT rule port mapping request. // options - LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings // method. -func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (LoadBalancersClientListInboundNatRulePortMappingsPollerResponse, error) { - resp, err := client.listInboundNatRulePortMappings(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) - if err != nil { - return LoadBalancersClientListInboundNatRulePortMappingsPollerResponse{}, err - } - result := LoadBalancersClientListInboundNatRulePortMappingsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancersClient.ListInboundNatRulePortMappings", "location", resp, client.pl) - if err != nil { - return LoadBalancersClientListInboundNatRulePortMappingsPollerResponse{}, err - } - result.Poller = &LoadBalancersClientListInboundNatRulePortMappingsPoller{ - pt: pt, +func (client *LoadBalancersClient) BeginListInboundNatRulePortMappings(ctx context.Context, groupName string, loadBalancerName string, backendPoolName string, parameters QueryInboundNatRulePortMappingRequest, options *LoadBalancersClientBeginListInboundNatRulePortMappingsOptions) (*armruntime.Poller[LoadBalancersClientListInboundNatRulePortMappingsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listInboundNatRulePortMappings(ctx, groupName, loadBalancerName, backendPoolName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancersClientListInboundNatRulePortMappingsResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancersClientListInboundNatRulePortMappingsResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // ListInboundNatRulePortMappings - List of inbound NAT rule port mappings. @@ -411,22 +436,18 @@ func (client *LoadBalancersClient) listInboundNatRulePortMappingsCreateRequest(c // parameters - Parameters that define which VIPs should be swapped. // options - LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses // method. -func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (LoadBalancersClientSwapPublicIPAddressesPollerResponse, error) { - resp, err := client.swapPublicIPAddresses(ctx, location, parameters, options) - if err != nil { - return LoadBalancersClientSwapPublicIPAddressesPollerResponse{}, err +func (client *LoadBalancersClient) BeginSwapPublicIPAddresses(ctx context.Context, location string, parameters LoadBalancerVipSwapRequest, options *LoadBalancersClientBeginSwapPublicIPAddressesOptions) (*armruntime.Poller[LoadBalancersClientSwapPublicIPAddressesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.swapPublicIPAddresses(ctx, location, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LoadBalancersClientSwapPublicIPAddressesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[LoadBalancersClientSwapPublicIPAddressesResponse](options.ResumeToken, client.pl, nil) } - result := LoadBalancersClientSwapPublicIPAddressesPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LoadBalancersClient.SwapPublicIPAddresses", "location", resp, client.pl) - if err != nil { - return LoadBalancersClientSwapPublicIPAddressesPollerResponse{}, err - } - result.Poller = &LoadBalancersClientSwapPublicIPAddressesPoller{ - pt: pt, - } - return result, nil } // SwapPublicIPAddresses - Swaps VIPs between two load balancers. @@ -518,7 +539,7 @@ func (client *LoadBalancersClient) updateTagsCreateRequest(ctx context.Context, // updateTagsHandleResponse handles the UpdateTags response. func (client *LoadBalancersClient) updateTagsHandleResponse(resp *http.Response) (LoadBalancersClientUpdateTagsResponse, error) { - result := LoadBalancersClientUpdateTagsResponse{RawResponse: resp} + result := LoadBalancersClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { return LoadBalancersClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go index 775e49cd5818..cfb5b4a94ec8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_localnetworkgateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type LocalNetworkGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *LocalNetworkGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocalNetworkGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &LocalNetworkGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a local network gateway in the specified resource group. @@ -57,22 +62,18 @@ func NewLocalNetworkGatewaysClient(subscriptionID string, credential azcore.Toke // parameters - Parameters supplied to the create or update local network gateway operation. // options - LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate // method. -func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (LocalNetworkGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) - if err != nil { - return LocalNetworkGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := LocalNetworkGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LocalNetworkGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return LocalNetworkGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &LocalNetworkGatewaysClientCreateOrUpdatePoller{ - pt: pt, +func (client *LocalNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, options *LocalNetworkGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[LocalNetworkGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, localNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LocalNetworkGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[LocalNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a local network gateway in the specified resource group. @@ -124,22 +125,18 @@ func (client *LocalNetworkGatewaysClient) createOrUpdateCreateRequest(ctx contex // localNetworkGatewayName - The name of the local network gateway. // options - LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete // method. -func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (LocalNetworkGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, localNetworkGatewayName, options) - if err != nil { - return LocalNetworkGatewaysClientDeletePollerResponse{}, err - } - result := LocalNetworkGatewaysClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("LocalNetworkGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return LocalNetworkGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &LocalNetworkGatewaysClientDeletePoller{ - pt: pt, +func (client *LocalNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, options *LocalNetworkGatewaysClientBeginDeleteOptions) (*armruntime.Poller[LocalNetworkGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, localNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[LocalNetworkGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[LocalNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified local network gateway. @@ -234,7 +231,7 @@ func (client *LocalNetworkGatewaysClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientGetResponse, error) { - result := LocalNetworkGatewaysClientGetResponse{RawResponse: resp} + result := LocalNetworkGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { return LocalNetworkGatewaysClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *LocalNetworkGatewaysClient) getHandleResponse(resp *http.Response) // resourceGroupName - The name of the resource group. // options - LocalNetworkGatewaysClientListOptions contains the optional parameters for the LocalNetworkGatewaysClient.List // method. -func (client *LocalNetworkGatewaysClient) List(resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) *LocalNetworkGatewaysClientListPager { - return &LocalNetworkGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *LocalNetworkGatewaysClient) List(resourceGroupName string, options *LocalNetworkGatewaysClientListOptions) *runtime.Pager[LocalNetworkGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[LocalNetworkGatewaysClientListResponse]{ + More: func(page LocalNetworkGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp LocalNetworkGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.LocalNetworkGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *LocalNetworkGatewaysClientListResponse) (LocalNetworkGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return LocalNetworkGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return LocalNetworkGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return LocalNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -282,7 +295,7 @@ func (client *LocalNetworkGatewaysClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *LocalNetworkGatewaysClient) listHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientListResponse, error) { - result := LocalNetworkGatewaysClientListResponse{RawResponse: resp} + result := LocalNetworkGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGatewayListResult); err != nil { return LocalNetworkGatewaysClientListResponse{}, err } @@ -339,7 +352,7 @@ func (client *LocalNetworkGatewaysClient) updateTagsCreateRequest(ctx context.Co // updateTagsHandleResponse handles the UpdateTags response. func (client *LocalNetworkGatewaysClient) updateTagsHandleResponse(resp *http.Response) (LocalNetworkGatewaysClientUpdateTagsResponse, error) { - result := LocalNetworkGatewaysClientUpdateTagsResponse{RawResponse: resp} + result := LocalNetworkGatewaysClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.LocalNetworkGateway); err != nil { return LocalNetworkGatewaysClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go index 1a3dfc5f6765..7197907fb3ae 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_management_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ManagementClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ManagementClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ManagementClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // CheckDNSNameAvailability - Checks whether a domain name in the cloudapp.azure.com zone is available for use. @@ -96,7 +101,7 @@ func (client *ManagementClient) checkDNSNameAvailabilityCreateRequest(ctx contex // checkDNSNameAvailabilityHandleResponse handles the CheckDNSNameAvailability response. func (client *ManagementClient) checkDNSNameAvailabilityHandleResponse(resp *http.Response) (ManagementClientCheckDNSNameAvailabilityResponse, error) { - result := ManagementClientCheckDNSNameAvailabilityResponse{RawResponse: resp} + result := ManagementClientCheckDNSNameAvailabilityResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.DNSNameAvailabilityResult); err != nil { return ManagementClientCheckDNSNameAvailabilityResponse{}, err } @@ -110,22 +115,18 @@ func (client *ManagementClient) checkDNSNameAvailabilityHandleResponse(resp *htt // bslRequest - Post request for all the Bastion Shareable Link endpoints. // options - ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink // method. -func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (ManagementClientDeleteBastionShareableLinkPollerResponse, error) { - resp, err := client.deleteBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return ManagementClientDeleteBastionShareableLinkPollerResponse{}, err - } - result := ManagementClientDeleteBastionShareableLinkPollerResponse{ - RawResponse: resp, +func (client *ManagementClient) BeginDeleteBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginDeleteBastionShareableLinkOptions) (*armruntime.Poller[ManagementClientDeleteBastionShareableLinkResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ManagementClientDeleteBastionShareableLinkResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ManagementClientDeleteBastionShareableLinkResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ManagementClient.DeleteBastionShareableLink", "location", resp, client.pl) - if err != nil { - return ManagementClientDeleteBastionShareableLinkPollerResponse{}, err - } - result.Poller = &ManagementClientDeleteBastionShareableLinkPoller{ - pt: pt, - } - return result, nil } // DeleteBastionShareableLink - Deletes the Bastion Shareable Links for all the VMs specified in the request. @@ -178,16 +179,32 @@ func (client *ManagementClient) deleteBastionShareableLinkCreateRequest(ctx cont // sessionIDs - The list of sessionids to disconnect. // options - ManagementClientDisconnectActiveSessionsOptions contains the optional parameters for the ManagementClient.DisconnectActiveSessions // method. -func (client *ManagementClient) DisconnectActiveSessions(resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) *ManagementClientDisconnectActiveSessionsPager { - return &ManagementClientDisconnectActiveSessionsPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) +func (client *ManagementClient) DisconnectActiveSessions(resourceGroupName string, bastionHostName string, sessionIDs SessionIDs, options *ManagementClientDisconnectActiveSessionsOptions) *runtime.Pager[ManagementClientDisconnectActiveSessionsResponse] { + return runtime.NewPager(runtime.PageProcessor[ManagementClientDisconnectActiveSessionsResponse]{ + More: func(page ManagementClientDisconnectActiveSessionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ManagementClientDisconnectActiveSessionsResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.BastionSessionDeleteResult.NextLink) + Fetcher: func(ctx context.Context, page *ManagementClientDisconnectActiveSessionsResponse) (ManagementClientDisconnectActiveSessionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.disconnectActiveSessionsCreateRequest(ctx, resourceGroupName, bastionHostName, sessionIDs, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagementClientDisconnectActiveSessionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ManagementClientDisconnectActiveSessionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientDisconnectActiveSessionsResponse{}, runtime.NewResponseError(resp) + } + return client.disconnectActiveSessionsHandleResponse(resp) }, - } + }) } // disconnectActiveSessionsCreateRequest creates the DisconnectActiveSessions request. @@ -218,7 +235,7 @@ func (client *ManagementClient) disconnectActiveSessionsCreateRequest(ctx contex // disconnectActiveSessionsHandleResponse handles the DisconnectActiveSessions response. func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *http.Response) (ManagementClientDisconnectActiveSessionsResponse, error) { - result := ManagementClientDisconnectActiveSessionsResponse{RawResponse: resp} + result := ManagementClientDisconnectActiveSessionsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionSessionDeleteResult); err != nil { return ManagementClientDisconnectActiveSessionsResponse{}, err } @@ -233,22 +250,18 @@ func (client *ManagementClient) disconnectActiveSessionsHandleResponse(resp *htt // vpnClientParams - Parameters supplied to the generate VirtualWan VPN profile generation operation. // options - ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters // for the ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. -func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse, error) { - resp, err := client.generatevirtualwanvpnserverconfigurationvpnprofile(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) - if err != nil { - return ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse{}, err - } - result := ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile", "location", resp, client.pl) - if err != nil { - return ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse{}, err - } - result.Poller = &ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller{ - pt: pt, +func (client *ManagementClient) BeginGeneratevirtualwanvpnserverconfigurationvpnprofile(ctx context.Context, resourceGroupName string, virtualWANName string, vpnClientParams VirtualWanVPNProfileParameters, options *ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions) (*armruntime.Poller[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generatevirtualwanvpnserverconfigurationvpnprofile(ctx, resourceGroupName, virtualWANName, vpnClientParams, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Generatevirtualwanvpnserverconfigurationvpnprofile - Generates a unique VPN profile for P2S clients for VirtualWan and @@ -301,23 +314,40 @@ func (client *ManagementClient) generatevirtualwanvpnserverconfigurationvpnprofi // bastionHostName - The name of the Bastion Host. // options - ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions // method. -func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (ManagementClientGetActiveSessionsPollerResponse, error) { - resp, err := client.getActiveSessions(ctx, resourceGroupName, bastionHostName, options) - if err != nil { - return ManagementClientGetActiveSessionsPollerResponse{}, err - } - result := ManagementClientGetActiveSessionsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ManagementClient.GetActiveSessions", "location", resp, client.pl) - if err != nil { - return ManagementClientGetActiveSessionsPollerResponse{}, err - } - result.Poller = &ManagementClientGetActiveSessionsPoller{ - pt: pt, - client: client, +func (client *ManagementClient) BeginGetActiveSessions(ctx context.Context, resourceGroupName string, bastionHostName string, options *ManagementClientBeginGetActiveSessionsOptions) (*armruntime.Poller[*runtime.Pager[ManagementClientGetActiveSessionsResponse]], error) { + pager := runtime.NewPager(runtime.PageProcessor[ManagementClientGetActiveSessionsResponse]{ + More: func(page ManagementClientGetActiveSessionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientGetActiveSessionsResponse) (ManagementClientGetActiveSessionsResponse, error) { + req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + if err != nil { + return ManagementClientGetActiveSessionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ManagementClientGetActiveSessionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientGetActiveSessionsResponse{}, runtime.NewResponseError(resp) + } + return client.getActiveSessionsHandleResponse(resp) + }, + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.getActiveSessions(ctx, resourceGroupName, bastionHostName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ + FinalStateVia: armruntime.FinalStateViaLocation, + Response: &pager, + }) + } else { + return armruntime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &armruntime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientGetActiveSessionsResponse]]{ + Response: &pager, + }) } - return result, nil } // GetActiveSessions - Returns the list of currently active sessions on the Bastion. @@ -365,7 +395,7 @@ func (client *ManagementClient) getActiveSessionsCreateRequest(ctx context.Conte // getActiveSessionsHandleResponse handles the GetActiveSessions response. func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Response) (ManagementClientGetActiveSessionsResponse, error) { - result := ManagementClientGetActiveSessionsResponse{RawResponse: resp} + result := ManagementClientGetActiveSessionsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionActiveSessionListResult); err != nil { return ManagementClientGetActiveSessionsResponse{}, err } @@ -379,16 +409,32 @@ func (client *ManagementClient) getActiveSessionsHandleResponse(resp *http.Respo // bslRequest - Post request for all the Bastion Shareable Link endpoints. // options - ManagementClientGetBastionShareableLinkOptions contains the optional parameters for the ManagementClient.GetBastionShareableLink // method. -func (client *ManagementClient) GetBastionShareableLink(resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) *ManagementClientGetBastionShareableLinkPager { - return &ManagementClientGetBastionShareableLinkPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) +func (client *ManagementClient) GetBastionShareableLink(resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientGetBastionShareableLinkOptions) *runtime.Pager[ManagementClientGetBastionShareableLinkResponse] { + return runtime.NewPager(runtime.PageProcessor[ManagementClientGetBastionShareableLinkResponse]{ + More: func(page ManagementClientGetBastionShareableLinkResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ManagementClientGetBastionShareableLinkResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.BastionShareableLinkListResult.NextLink) + Fetcher: func(ctx context.Context, page *ManagementClientGetBastionShareableLinkResponse) (ManagementClientGetBastionShareableLinkResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.getBastionShareableLinkCreateRequest(ctx, resourceGroupName, bastionHostName, bslRequest, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagementClientGetBastionShareableLinkResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ManagementClientGetBastionShareableLinkResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientGetBastionShareableLinkResponse{}, runtime.NewResponseError(resp) + } + return client.getBastionShareableLinkHandleResponse(resp) }, - } + }) } // getBastionShareableLinkCreateRequest creates the GetBastionShareableLink request. @@ -419,7 +465,7 @@ func (client *ManagementClient) getBastionShareableLinkCreateRequest(ctx context // getBastionShareableLinkHandleResponse handles the GetBastionShareableLink response. func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientGetBastionShareableLinkResponse, error) { - result := ManagementClientGetBastionShareableLinkResponse{RawResponse: resp} + result := ManagementClientGetBastionShareableLinkResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { return ManagementClientGetBastionShareableLinkResponse{}, err } @@ -433,23 +479,40 @@ func (client *ManagementClient) getBastionShareableLinkHandleResponse(resp *http // bslRequest - Post request for all the Bastion Shareable Link endpoints. // options - ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink // method. -func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (ManagementClientPutBastionShareableLinkPollerResponse, error) { - resp, err := client.putBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) - if err != nil { - return ManagementClientPutBastionShareableLinkPollerResponse{}, err - } - result := ManagementClientPutBastionShareableLinkPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ManagementClient.PutBastionShareableLink", "location", resp, client.pl) - if err != nil { - return ManagementClientPutBastionShareableLinkPollerResponse{}, err - } - result.Poller = &ManagementClientPutBastionShareableLinkPoller{ - pt: pt, - client: client, +func (client *ManagementClient) BeginPutBastionShareableLink(ctx context.Context, resourceGroupName string, bastionHostName string, bslRequest BastionShareableLinkListRequest, options *ManagementClientBeginPutBastionShareableLinkOptions) (*armruntime.Poller[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]], error) { + pager := runtime.NewPager(runtime.PageProcessor[ManagementClientPutBastionShareableLinkResponse]{ + More: func(page ManagementClientPutBastionShareableLinkResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagementClientPutBastionShareableLinkResponse) (ManagementClientPutBastionShareableLinkResponse, error) { + req, err := runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + if err != nil { + return ManagementClientPutBastionShareableLinkResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ManagementClientPutBastionShareableLinkResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagementClientPutBastionShareableLinkResponse{}, runtime.NewResponseError(resp) + } + return client.putBastionShareableLinkHandleResponse(resp) + }, + }) + if options == nil || options.ResumeToken == "" { + resp, err := client.putBastionShareableLink(ctx, resourceGroupName, bastionHostName, bslRequest, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ + FinalStateVia: armruntime.FinalStateViaLocation, + Response: &pager, + }) + } else { + return armruntime.NewPollerFromResumeToken(options.ResumeToken, client.pl, &armruntime.NewPollerFromResumeTokenOptions[*runtime.Pager[ManagementClientPutBastionShareableLinkResponse]]{ + Response: &pager, + }) } - return result, nil } // PutBastionShareableLink - Creates a Bastion Shareable Links for all the VMs specified in the request. @@ -497,7 +560,7 @@ func (client *ManagementClient) putBastionShareableLinkCreateRequest(ctx context // putBastionShareableLinkHandleResponse handles the PutBastionShareableLink response. func (client *ManagementClient) putBastionShareableLinkHandleResponse(resp *http.Response) (ManagementClientPutBastionShareableLinkResponse, error) { - result := ManagementClientPutBastionShareableLinkResponse{RawResponse: resp} + result := ManagementClientPutBastionShareableLinkResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BastionShareableLinkListResult); err != nil { return ManagementClientPutBastionShareableLinkResponse{}, err } @@ -553,7 +616,7 @@ func (client *ManagementClient) supportedSecurityProvidersCreateRequest(ctx cont // supportedSecurityProvidersHandleResponse handles the SupportedSecurityProviders response. func (client *ManagementClient) supportedSecurityProvidersHandleResponse(resp *http.Response) (ManagementClientSupportedSecurityProvidersResponse, error) { - result := ManagementClientSupportedSecurityProvidersResponse{RawResponse: resp} + result := ManagementClientSupportedSecurityProvidersResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWanSecurityProviders); err != nil { return ManagementClientSupportedSecurityProvidersResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_models.go b/sdk/resourcemanager/network/armnetwork/zz_generated_models.go index 58d184956ee7..2218dc96d8b8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_models.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_models.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -8,12 +8,7 @@ package armnetwork -import ( - "encoding/json" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "reflect" - "time" -) +import "time" // AADAuthenticationParameters - AAD Vpn authentication type related parameters. type AADAuthenticationParameters struct { @@ -33,13 +28,6 @@ type AddressSpace struct { AddressPrefixes []*string `json:"addressPrefixes,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AddressSpace. -func (a AddressSpace) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", a.AddressPrefixes) - return json.Marshal(objectMap) -} - // ApplicationGateway - Application gateway resource. type ApplicationGateway struct { // Resource ID. @@ -70,21 +58,6 @@ type ApplicationGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGateway. -func (a ApplicationGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "identity", a.Identity) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - // ApplicationGatewayAuthenticationCertificate - Authentication certificates of an application gateway. type ApplicationGatewayAuthenticationCertificate struct { // Resource ID. @@ -143,18 +116,6 @@ type ApplicationGatewayAvailableSSLOptions struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptions. -func (a ApplicationGatewayAvailableSSLOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - // ApplicationGatewayAvailableSSLOptionsPropertiesFormat - Properties of ApplicationGatewayAvailableSslOptions. type ApplicationGatewayAvailableSSLOptionsPropertiesFormat struct { // List of available Ssl cipher suites. @@ -170,16 +131,6 @@ type ApplicationGatewayAvailableSSLOptionsPropertiesFormat struct { PredefinedPolicies []*SubResource `json:"predefinedPolicies,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. -func (a ApplicationGatewayAvailableSSLOptionsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableCipherSuites", a.AvailableCipherSuites) - populate(objectMap, "availableProtocols", a.AvailableProtocols) - populate(objectMap, "defaultPolicy", a.DefaultPolicy) - populate(objectMap, "predefinedPolicies", a.PredefinedPolicies) - return json.Marshal(objectMap) -} - // ApplicationGatewayAvailableSSLPredefinedPolicies - Response for ApplicationGatewayAvailableSslOptions API service call. type ApplicationGatewayAvailableSSLPredefinedPolicies struct { // URL to get the next set of results. @@ -189,27 +140,12 @@ type ApplicationGatewayAvailableSSLPredefinedPolicies struct { Value []*ApplicationGatewaySSLPredefinedPolicy `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. -func (a ApplicationGatewayAvailableSSLPredefinedPolicies) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationGatewayAvailableWafRuleSetsResult - Response for ApplicationGatewayAvailableWafRuleSets API service call. type ApplicationGatewayAvailableWafRuleSetsResult struct { // The list of application gateway rule sets. Value []*ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. -func (a ApplicationGatewayAvailableWafRuleSetsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendAddress - Backend address of an application gateway. type ApplicationGatewayBackendAddress struct { // Fully qualified domain name (FQDN). @@ -249,15 +185,6 @@ type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. -func (a ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddresses", a.BackendAddresses) - populate(objectMap, "backendIPConfigurations", a.BackendIPConfigurations) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendHTTPSettings - Backend address pool settings of an application gateway. type ApplicationGatewayBackendHTTPSettings struct { // Resource ID. @@ -322,39 +249,12 @@ type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. -func (a ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "affinityCookieName", a.AffinityCookieName) - populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) - populate(objectMap, "connectionDraining", a.ConnectionDraining) - populate(objectMap, "cookieBasedAffinity", a.CookieBasedAffinity) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "path", a.Path) - populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) - populate(objectMap, "port", a.Port) - populate(objectMap, "probe", a.Probe) - populate(objectMap, "probeEnabled", a.ProbeEnabled) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "requestTimeout", a.RequestTimeout) - populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendHealth - Response for ApplicationGatewayBackendHealth API service call. type ApplicationGatewayBackendHealth struct { // A list of ApplicationGatewayBackendHealthPool resources. BackendAddressPools []*ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealth. -func (a ApplicationGatewayBackendHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPools", a.BackendAddressPools) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendHealthHTTPSettings - Application gateway BackendHealthHttp settings. type ApplicationGatewayBackendHealthHTTPSettings struct { // Reference to an ApplicationGatewayBackendHttpSettings resource. @@ -364,14 +264,6 @@ type ApplicationGatewayBackendHealthHTTPSettings struct { Servers []*ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. -func (a ApplicationGatewayBackendHealthHTTPSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "servers", a.Servers) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendHealthOnDemand - Result of on demand test probe. type ApplicationGatewayBackendHealthOnDemand struct { // Reference to an ApplicationGatewayBackendAddressPool resource. @@ -390,14 +282,6 @@ type ApplicationGatewayBackendHealthPool struct { BackendHTTPSettingsCollection []*ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthPool. -func (a ApplicationGatewayBackendHealthPool) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) - return json.Marshal(objectMap) -} - // ApplicationGatewayBackendHealthServer - Application gateway backendhealth http settings. type ApplicationGatewayBackendHealthServer struct { // IP address or FQDN of backend server. @@ -447,14 +331,6 @@ type ApplicationGatewayFirewallDisabledRuleGroup struct { Rules []*int32 `json:"rules,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. -func (a ApplicationGatewayFirewallDisabledRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", a.RuleGroupName) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - // ApplicationGatewayFirewallExclusion - Allow to exclude some variable satisfy the condition for the WAF check. type ApplicationGatewayFirewallExclusion struct { // REQUIRED; The variable to be excluded. @@ -490,15 +366,6 @@ type ApplicationGatewayFirewallRuleGroup struct { Description *string `json:"description,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleGroup. -func (a ApplicationGatewayFirewallRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "ruleGroupName", a.RuleGroupName) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - // ApplicationGatewayFirewallRuleSet - A web application firewall rule set. type ApplicationGatewayFirewallRuleSet struct { // Resource ID. @@ -520,18 +387,6 @@ type ApplicationGatewayFirewallRuleSet struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSet. -func (a ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - // ApplicationGatewayFirewallRuleSetPropertiesFormat - Properties of the web application firewall rule set. type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { // REQUIRED; The rule groups of the web application firewall rule set. @@ -547,16 +402,6 @@ type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. -func (a ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "ruleGroups", a.RuleGroups) - populate(objectMap, "ruleSetType", a.RuleSetType) - populate(objectMap, "ruleSetVersion", a.RuleSetVersion) - return json.Marshal(objectMap) -} - // ApplicationGatewayFrontendIPConfiguration - Frontend IP configuration of an application gateway. type ApplicationGatewayFrontendIPConfiguration struct { // Resource ID. @@ -686,23 +531,6 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. -func (a ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) - populate(objectMap, "frontendPort", a.FrontendPort) - populate(objectMap, "hostName", a.HostName) - populate(objectMap, "hostNames", a.HostNames) - populate(objectMap, "protocol", a.Protocol) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "requireServerNameIndication", a.RequireServerNameIndication) - populate(objectMap, "sslCertificate", a.SSLCertificate) - populate(objectMap, "sslProfile", a.SSLProfile) - return json.Marshal(objectMap) -} - // ApplicationGatewayHeaderConfiguration - Header configuration of the Actions set in Application Gateway. type ApplicationGatewayHeaderConfiguration struct { // Header name of the header configuration. @@ -749,14 +577,6 @@ type ApplicationGatewayListResult struct { Value []*ApplicationGateway `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListResult. -func (a ApplicationGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationGatewayLoadDistributionPolicy - Load Distribution Policy of an application gateway. type ApplicationGatewayLoadDistributionPolicy struct { // Resource ID. @@ -787,15 +607,6 @@ type ApplicationGatewayLoadDistributionPolicyPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. -func (a ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "loadDistributionAlgorithm", a.LoadDistributionAlgorithm) - populate(objectMap, "loadDistributionTargets", a.LoadDistributionTargets) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - // ApplicationGatewayLoadDistributionTarget - Load Distribution Target of an application gateway. type ApplicationGatewayLoadDistributionTarget struct { // Resource ID. @@ -895,20 +706,6 @@ type ApplicationGatewayPathRulePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRulePropertiesFormat. -func (a ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", a.BackendAddressPool) - populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) - populate(objectMap, "paths", a.Paths) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) - populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) - return json.Marshal(objectMap) -} - // ApplicationGatewayPrivateEndpointConnection - Private Endpoint connection on an application gateway. type ApplicationGatewayPrivateEndpointConnection struct { // Resource ID. @@ -937,14 +734,6 @@ type ApplicationGatewayPrivateEndpointConnectionListResult struct { Value []*ApplicationGatewayPrivateEndpointConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. -func (a ApplicationGatewayPrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationGatewayPrivateEndpointConnectionProperties - Properties of Private Link Resource of an application gateway. type ApplicationGatewayPrivateEndpointConnectionProperties struct { // A collection of information about the state of the connection between service consumer and provider. @@ -963,13 +752,15 @@ type ApplicationGatewayPrivateEndpointConnectionProperties struct { // ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginDelete // method. type ApplicationGatewayPrivateEndpointConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.BeginUpdate // method. type ApplicationGatewayPrivateEndpointConnectionsClientBeginUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewayPrivateEndpointConnectionsClientGetOptions contains the optional parameters for the ApplicationGatewayPrivateEndpointConnectionsClient.Get @@ -1011,14 +802,6 @@ type ApplicationGatewayPrivateLinkConfigurationProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. -func (a ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipConfigurations", a.IPConfigurations) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - // ApplicationGatewayPrivateLinkIPConfiguration - The application gateway private link ip configuration. type ApplicationGatewayPrivateLinkIPConfiguration struct { // Resource ID. @@ -1083,14 +866,6 @@ type ApplicationGatewayPrivateLinkResourceListResult struct { Value []*ApplicationGatewayPrivateLinkResource `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. -func (a ApplicationGatewayPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationGatewayPrivateLinkResourceProperties - Properties of a private link resource. type ApplicationGatewayPrivateLinkResourceProperties struct { // Required DNS zone names of the the private link resource. @@ -1103,15 +878,6 @@ type ApplicationGatewayPrivateLinkResourceProperties struct { RequiredMembers []*string `json:"requiredMembers,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. -func (a ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupId", a.GroupID) - populate(objectMap, "requiredMembers", a.RequiredMembers) - populate(objectMap, "requiredZoneNames", a.RequiredZoneNames) - return json.Marshal(objectMap) -} - // ApplicationGatewayPrivateLinkResourcesClientListOptions contains the optional parameters for the ApplicationGatewayPrivateLinkResourcesClient.List // method. type ApplicationGatewayPrivateLinkResourcesClientListOptions struct { @@ -1145,14 +911,6 @@ type ApplicationGatewayProbeHealthResponseMatch struct { StatusCodes []*string `json:"statusCodes,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbeHealthResponseMatch. -func (a ApplicationGatewayProbeHealthResponseMatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "body", a.Body) - populate(objectMap, "statusCodes", a.StatusCodes) - return json.Marshal(objectMap) -} - // ApplicationGatewayProbePropertiesFormat - Properties of probe of an application gateway. type ApplicationGatewayProbePropertiesFormat struct { // Host name to send the probe to. @@ -1301,44 +1059,6 @@ type ApplicationGatewayPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPropertiesFormat. -func (a ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) - populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) - populate(objectMap, "backendAddressPools", a.BackendAddressPools) - populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) - populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) - populate(objectMap, "enableFips", a.EnableFips) - populate(objectMap, "enableHttp2", a.EnableHTTP2) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "forceFirewallPolicyAssociation", a.ForceFirewallPolicyAssociation) - populate(objectMap, "frontendIPConfigurations", a.FrontendIPConfigurations) - populate(objectMap, "frontendPorts", a.FrontendPorts) - populate(objectMap, "gatewayIPConfigurations", a.GatewayIPConfigurations) - populate(objectMap, "globalConfiguration", a.GlobalConfiguration) - populate(objectMap, "httpListeners", a.HTTPListeners) - populate(objectMap, "loadDistributionPolicies", a.LoadDistributionPolicies) - populate(objectMap, "operationalState", a.OperationalState) - populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) - populate(objectMap, "privateLinkConfigurations", a.PrivateLinkConfigurations) - populate(objectMap, "probes", a.Probes) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "redirectConfigurations", a.RedirectConfigurations) - populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) - populate(objectMap, "resourceGuid", a.ResourceGUID) - populate(objectMap, "rewriteRuleSets", a.RewriteRuleSets) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "sslCertificates", a.SSLCertificates) - populate(objectMap, "sslPolicy", a.SSLPolicy) - populate(objectMap, "sslProfiles", a.SSLProfiles) - populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) - populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) - populate(objectMap, "urlPathMaps", a.URLPathMaps) - populate(objectMap, "webApplicationFirewallConfiguration", a.WebApplicationFirewallConfiguration) - return json.Marshal(objectMap) -} - // ApplicationGatewayRedirectConfiguration - Redirect configuration of an application gateway. type ApplicationGatewayRedirectConfiguration struct { // Resource ID. @@ -1384,20 +1104,6 @@ type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { URLPathMaps []*SubResource `json:"urlPathMaps,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. -func (a ApplicationGatewayRedirectConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "includePath", a.IncludePath) - populate(objectMap, "includeQueryString", a.IncludeQueryString) - populate(objectMap, "pathRules", a.PathRules) - populate(objectMap, "redirectType", a.RedirectType) - populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) - populate(objectMap, "targetListener", a.TargetListener) - populate(objectMap, "targetUrl", a.TargetURL) - populate(objectMap, "urlPathMaps", a.URLPathMaps) - return json.Marshal(objectMap) -} - // ApplicationGatewayRequestRoutingRule - Request routing rule of an application gateway. type ApplicationGatewayRequestRoutingRule struct { // Resource ID. @@ -1464,16 +1170,6 @@ type ApplicationGatewayRewriteRule struct { RuleSequence *int32 `json:"ruleSequence,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRule. -func (a ApplicationGatewayRewriteRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actionSet", a.ActionSet) - populate(objectMap, "conditions", a.Conditions) - populate(objectMap, "name", a.Name) - populate(objectMap, "ruleSequence", a.RuleSequence) - return json.Marshal(objectMap) -} - // ApplicationGatewayRewriteRuleActionSet - Set of actions in the Rewrite Rule in Application Gateway. type ApplicationGatewayRewriteRuleActionSet struct { // Request Header Actions in the Action Set. @@ -1486,15 +1182,6 @@ type ApplicationGatewayRewriteRuleActionSet struct { URLConfiguration *ApplicationGatewayURLConfiguration `json:"urlConfiguration,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleActionSet. -func (a ApplicationGatewayRewriteRuleActionSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "requestHeaderConfigurations", a.RequestHeaderConfigurations) - populate(objectMap, "responseHeaderConfigurations", a.ResponseHeaderConfigurations) - populate(objectMap, "urlConfiguration", a.URLConfiguration) - return json.Marshal(objectMap) -} - // ApplicationGatewayRewriteRuleCondition - Set of conditions in the Rewrite Rule in Application Gateway. type ApplicationGatewayRewriteRuleCondition struct { // Setting this parameter to truth value with force the pattern to do a case in-sensitive comparison. @@ -1534,14 +1221,6 @@ type ApplicationGatewayRewriteRuleSetPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. -func (a ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rewriteRules", a.RewriteRules) - return json.Marshal(objectMap) -} - // ApplicationGatewaySKU - SKU of an application gateway. type ApplicationGatewaySKU struct { // Capacity (instance count) of an application gateway. @@ -1608,17 +1287,6 @@ type ApplicationGatewaySSLPolicy struct { PolicyType *ApplicationGatewaySSLPolicyType `json:"policyType,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPolicy. -func (a ApplicationGatewaySSLPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cipherSuites", a.CipherSuites) - populate(objectMap, "disabledSslProtocols", a.DisabledSSLProtocols) - populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) - populate(objectMap, "policyName", a.PolicyName) - populate(objectMap, "policyType", a.PolicyType) - return json.Marshal(objectMap) -} - // ApplicationGatewaySSLPredefinedPolicy - An Ssl predefined policy. type ApplicationGatewaySSLPredefinedPolicy struct { // Resource ID. @@ -1640,14 +1308,6 @@ type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat struct { MinProtocolVersion *ApplicationGatewaySSLProtocol `json:"minProtocolVersion,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. -func (a ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cipherSuites", a.CipherSuites) - populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) - return json.Marshal(objectMap) -} - // ApplicationGatewaySSLProfile - SSL profile of an application gateway. type ApplicationGatewaySSLProfile struct { // Resource ID. @@ -1681,16 +1341,6 @@ type ApplicationGatewaySSLProfilePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. -func (a ApplicationGatewaySSLProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "clientAuthConfiguration", a.ClientAuthConfiguration) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sslPolicy", a.SSLPolicy) - populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) - return json.Marshal(objectMap) -} - // ApplicationGatewayTrustedClientCertificate - Trusted client certificates of an application gateway. type ApplicationGatewayTrustedClientCertificate struct { // Resource ID. @@ -1809,19 +1459,6 @@ type ApplicationGatewayURLPathMapPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. -func (a ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultBackendAddressPool", a.DefaultBackendAddressPool) - populate(objectMap, "defaultBackendHttpSettings", a.DefaultBackendHTTPSettings) - populate(objectMap, "defaultLoadDistributionPolicy", a.DefaultLoadDistributionPolicy) - populate(objectMap, "defaultRedirectConfiguration", a.DefaultRedirectConfiguration) - populate(objectMap, "defaultRewriteRuleSet", a.DefaultRewriteRuleSet) - populate(objectMap, "pathRules", a.PathRules) - populate(objectMap, "provisioningState", a.ProvisioningState) - return json.Marshal(objectMap) -} - // ApplicationGatewayWebApplicationFirewallConfiguration - Application gateway web application firewall configuration. type ApplicationGatewayWebApplicationFirewallConfiguration struct { // REQUIRED; Whether the web application firewall is enabled or not. @@ -1855,27 +1492,13 @@ type ApplicationGatewayWebApplicationFirewallConfiguration struct { RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. -func (a ApplicationGatewayWebApplicationFirewallConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disabledRuleGroups", a.DisabledRuleGroups) - populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "exclusions", a.Exclusions) - populate(objectMap, "fileUploadLimitInMb", a.FileUploadLimitInMb) - populate(objectMap, "firewallMode", a.FirewallMode) - populate(objectMap, "maxRequestBodySize", a.MaxRequestBodySize) - populate(objectMap, "maxRequestBodySizeInKb", a.MaxRequestBodySizeInKb) - populate(objectMap, "requestBodyCheck", a.RequestBodyCheck) - populate(objectMap, "ruleSetType", a.RuleSetType) - populate(objectMap, "ruleSetVersion", a.RuleSetVersion) - return json.Marshal(objectMap) -} - // 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 @@ -1883,30 +1506,36 @@ type ApplicationGatewaysClientBeginBackendHealthOnDemandOptions struct { 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewaysClientBeginDeleteOptions contains the optional parameters for the ApplicationGatewaysClient.BeginDelete // method. type ApplicationGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewaysClientBeginStartOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStart // method. type ApplicationGatewaysClientBeginStartOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewaysClientBeginStopOptions contains the optional parameters for the ApplicationGatewaysClient.BeginStop // method. type ApplicationGatewaysClientBeginStopOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationGatewaysClientGetOptions contains the optional parameters for the ApplicationGatewaysClient.Get method. @@ -2011,86 +1640,6 @@ type ApplicationRule struct { WebCategories []*string `json:"webCategories,omitempty"` } -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type ApplicationRule. -func (a *ApplicationRule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: a.Name, - Description: a.Description, - RuleType: a.RuleType, - } -} - -// MarshalJSON implements the json.Marshaller interface for type ApplicationRule. -func (a ApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "fqdnTags", a.FqdnTags) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - objectMap["ruleType"] = FirewallPolicyRuleTypeApplicationRule - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "targetFqdns", a.TargetFqdns) - populate(objectMap, "targetUrls", a.TargetUrls) - populate(objectMap, "terminateTLS", a.TerminateTLS) - populate(objectMap, "webCategories", a.WebCategories) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationRule. -func (a *ApplicationRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, &a.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, &a.DestinationAddresses) - delete(rawMsg, key) - case "fqdnTags": - err = unpopulate(val, &a.FqdnTags) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &a.Name) - delete(rawMsg, key) - case "protocols": - err = unpopulate(val, &a.Protocols) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, &a.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, &a.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, &a.SourceIPGroups) - delete(rawMsg, key) - case "targetFqdns": - err = unpopulate(val, &a.TargetFqdns) - delete(rawMsg, key) - case "targetUrls": - err = unpopulate(val, &a.TargetUrls) - delete(rawMsg, key) - case "terminateTLS": - err = unpopulate(val, &a.TerminateTLS) - delete(rawMsg, key) - case "webCategories": - err = unpopulate(val, &a.WebCategories) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // ApplicationSecurityGroup - An application security group in a resource group. type ApplicationSecurityGroup struct { // Resource ID. @@ -2115,19 +1664,6 @@ type ApplicationSecurityGroup struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroup. -func (a ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - // ApplicationSecurityGroupListResult - A list of application security groups. type ApplicationSecurityGroupListResult struct { // A list of application security groups. @@ -2137,14 +1673,6 @@ type ApplicationSecurityGroupListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupListResult. -func (a ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // ApplicationSecurityGroupPropertiesFormat - Application security group properties. type ApplicationSecurityGroupPropertiesFormat struct { // READ-ONLY; The provisioning state of the application security group resource. @@ -2159,13 +1687,15 @@ type ApplicationSecurityGroupPropertiesFormat struct { // ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginCreateOrUpdate // method. type ApplicationSecurityGroupsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationSecurityGroupsClientBeginDeleteOptions contains the optional parameters for the ApplicationSecurityGroupsClient.BeginDelete // method. type ApplicationSecurityGroupsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ApplicationSecurityGroupsClientGetOptions contains the optional parameters for the ApplicationSecurityGroupsClient.Get @@ -2202,14 +1732,6 @@ type AuthorizationListResult struct { Value []*ExpressRouteCircuitAuthorization `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AuthorizationListResult. -func (a AuthorizationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AuthorizationPropertiesFormat - Properties of ExpressRouteCircuitAuthorization. type AuthorizationPropertiesFormat struct { // The authorization key. @@ -2238,14 +1760,6 @@ type AutoApprovedPrivateLinkServicesResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkServicesResult. -func (a AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // Availability of the metric. type Availability struct { // Duration of the availability blob. @@ -2276,17 +1790,6 @@ type AvailableDelegation struct { Type *string `json:"type,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableDelegation. -func (a AvailableDelegation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", a.Actions) - populate(objectMap, "id", a.ID) - populate(objectMap, "name", a.Name) - populate(objectMap, "serviceName", a.ServiceName) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - // AvailableDelegationsClientListOptions contains the optional parameters for the AvailableDelegationsClient.List method. type AvailableDelegationsClientListOptions struct { // placeholder for future optional parameters @@ -2301,14 +1804,6 @@ type AvailableDelegationsResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableDelegationsResult. -func (a AvailableDelegationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AvailableEndpointServicesClientListOptions contains the optional parameters for the AvailableEndpointServicesClient.List // method. type AvailableEndpointServicesClientListOptions struct { @@ -2354,27 +1849,12 @@ type AvailablePrivateEndpointTypesResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointTypesResult. -func (a AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AvailableProvidersList - List of available countries with details. type AvailableProvidersList struct { // REQUIRED; List of available countries. Countries []*AvailableProvidersListCountry `json:"countries,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersList. -func (a AvailableProvidersList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "countries", a.Countries) - return json.Marshal(objectMap) -} - // AvailableProvidersListCity - City or town details. type AvailableProvidersListCity struct { // The city or town name. @@ -2384,14 +1864,6 @@ type AvailableProvidersListCity struct { Providers []*string `json:"providers,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCity. -func (a AvailableProvidersListCity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cityName", a.CityName) - populate(objectMap, "providers", a.Providers) - return json.Marshal(objectMap) -} - // AvailableProvidersListCountry - Country details. type AvailableProvidersListCountry struct { // The country name. @@ -2404,15 +1876,6 @@ type AvailableProvidersListCountry struct { States []*AvailableProvidersListState `json:"states,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCountry. -func (a AvailableProvidersListCountry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "countryName", a.CountryName) - populate(objectMap, "providers", a.Providers) - populate(objectMap, "states", a.States) - return json.Marshal(objectMap) -} - // AvailableProvidersListParameters - Constraints that determine the list of available Internet service providers. type AvailableProvidersListParameters struct { // A list of Azure regions. @@ -2428,16 +1891,6 @@ type AvailableProvidersListParameters struct { State *string `json:"state,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListParameters. -func (a AvailableProvidersListParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocations", a.AzureLocations) - populate(objectMap, "city", a.City) - populate(objectMap, "country", a.Country) - populate(objectMap, "state", a.State) - return json.Marshal(objectMap) -} - // AvailableProvidersListState - State details. type AvailableProvidersListState struct { // List of available cities or towns in the state. @@ -2450,15 +1903,6 @@ type AvailableProvidersListState struct { StateName *string `json:"stateName,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListState. -func (a AvailableProvidersListState) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "cities", a.Cities) - populate(objectMap, "providers", a.Providers) - populate(objectMap, "stateName", a.StateName) - return json.Marshal(objectMap) -} - // AvailableResourceGroupDelegationsClientListOptions contains the optional parameters for the AvailableResourceGroupDelegationsClient.List // method. type AvailableResourceGroupDelegationsClientListOptions struct { @@ -2500,14 +1944,6 @@ type AvailableServiceAliasesResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAliasesResult. -func (a AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AzureAsyncOperationResult - The response body contains the status of the specified asynchronous operation, indicating whether // it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP // status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response @@ -2549,20 +1985,6 @@ type AzureFirewall struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewall. -func (a AzureFirewall) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - populate(objectMap, "zones", a.Zones) - return json.Marshal(objectMap) -} - // AzureFirewallApplicationRule - Properties of an application rule. type AzureFirewallApplicationRule struct { // Description of the rule. @@ -2587,19 +2009,6 @@ type AzureFirewallApplicationRule struct { TargetFqdns []*string `json:"targetFqdns,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRule. -func (a AzureFirewallApplicationRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "fqdnTags", a.FqdnTags) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "targetFqdns", a.TargetFqdns) - return json.Marshal(objectMap) -} - // AzureFirewallApplicationRuleCollection - Application rule collection resource. type AzureFirewallApplicationRuleCollection struct { // Resource ID. @@ -2630,16 +2039,6 @@ type AzureFirewallApplicationRuleCollectionPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. -func (a AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - // AzureFirewallApplicationRuleProtocol - Properties of the application rule protocol. type AzureFirewallApplicationRuleProtocol struct { // Port number for the protocol, cannot be greater than 64000. This field is optional. @@ -2673,19 +2072,6 @@ type AzureFirewallFqdnTag struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTag. -func (a AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", a.Etag) - populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) - populate(objectMap, "name", a.Name) - populate(objectMap, "properties", a.Properties) - populate(objectMap, "tags", a.Tags) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - // AzureFirewallFqdnTagListResult - Response for ListAzureFirewallFqdnTags API service call. type AzureFirewallFqdnTagListResult struct { // URL to get the next set of results. @@ -2695,14 +2081,6 @@ type AzureFirewallFqdnTagListResult struct { Value []*AzureFirewallFqdnTag `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagListResult. -func (a AzureFirewallFqdnTagListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AzureFirewallFqdnTagPropertiesFormat - Azure Firewall FQDN Tag Properties. type AzureFirewallFqdnTagPropertiesFormat struct { // READ-ONLY; The name of this FQDN Tag. @@ -2769,14 +2147,6 @@ type AzureFirewallListResult struct { Value []*AzureFirewall `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallListResult. -func (a AzureFirewallListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AzureFirewallNatRCAction - AzureFirewall NAT Rule Collection Action. type AzureFirewallNatRCAction struct { // The type of action. @@ -2816,22 +2186,6 @@ type AzureFirewallNatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRule. -func (a AzureFirewallNatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "destinationPorts", a.DestinationPorts) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - populate(objectMap, "translatedAddress", a.TranslatedAddress) - populate(objectMap, "translatedFqdn", a.TranslatedFqdn) - populate(objectMap, "translatedPort", a.TranslatedPort) - return json.Marshal(objectMap) -} - // AzureFirewallNatRuleCollection - NAT rule collection resource. type AzureFirewallNatRuleCollection struct { // Resource ID. @@ -2862,16 +2216,6 @@ type AzureFirewallNatRuleCollectionProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollectionProperties. -func (a AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - // AzureFirewallNetworkRule - Properties of the network rule. type AzureFirewallNetworkRule struct { // Description of the rule. @@ -2902,21 +2246,6 @@ type AzureFirewallNetworkRule struct { SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRule. -func (a AzureFirewallNetworkRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", a.Description) - populate(objectMap, "destinationAddresses", a.DestinationAddresses) - populate(objectMap, "destinationFqdns", a.DestinationFqdns) - populate(objectMap, "destinationIpGroups", a.DestinationIPGroups) - populate(objectMap, "destinationPorts", a.DestinationPorts) - populate(objectMap, "name", a.Name) - populate(objectMap, "protocols", a.Protocols) - populate(objectMap, "sourceAddresses", a.SourceAddresses) - populate(objectMap, "sourceIpGroups", a.SourceIPGroups) - return json.Marshal(objectMap) -} - // AzureFirewallNetworkRuleCollection - Network rule collection resource. type AzureFirewallNetworkRuleCollection struct { // Resource ID. @@ -2947,16 +2276,6 @@ type AzureFirewallNetworkRuleCollectionPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. -func (a AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", a.Action) - populate(objectMap, "priority", a.Priority) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "rules", a.Rules) - return json.Marshal(objectMap) -} - // AzureFirewallPropertiesFormat - Properties of the Azure Firewall. type AzureFirewallPropertiesFormat struct { // The additional properties used to further config this azure firewall. @@ -2999,25 +2318,6 @@ type AzureFirewallPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPropertiesFormat. -func (a AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "additionalProperties", a.AdditionalProperties) - populate(objectMap, "applicationRuleCollections", a.ApplicationRuleCollections) - populate(objectMap, "firewallPolicy", a.FirewallPolicy) - populate(objectMap, "hubIPAddresses", a.HubIPAddresses) - populate(objectMap, "ipConfigurations", a.IPConfigurations) - populate(objectMap, "ipGroups", a.IPGroups) - populate(objectMap, "managementIpConfiguration", a.ManagementIPConfiguration) - populate(objectMap, "natRuleCollections", a.NatRuleCollections) - populate(objectMap, "networkRuleCollections", a.NetworkRuleCollections) - populate(objectMap, "provisioningState", a.ProvisioningState) - populate(objectMap, "sku", a.SKU) - populate(objectMap, "threatIntelMode", a.ThreatIntelMode) - populate(objectMap, "virtualHub", a.VirtualHub) - return json.Marshal(objectMap) -} - // AzureFirewallPublicIPAddress - Public IP Address associated with azure firewall. type AzureFirewallPublicIPAddress struct { // Public IP Address value. @@ -3042,18 +2342,21 @@ type AzureFirewallSKU struct { // AzureFirewallsClientBeginCreateOrUpdateOptions contains the optional parameters for the AzureFirewallsClient.BeginCreateOrUpdate // method. type AzureFirewallsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // AzureFirewallsClientBeginDeleteOptions contains the optional parameters for the AzureFirewallsClient.BeginDelete method. type AzureFirewallsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // AzureFirewallsClientBeginUpdateTagsOptions contains the optional parameters for the AzureFirewallsClient.BeginUpdateTags // method. type AzureFirewallsClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // AzureFirewallsClientGetOptions contains the optional parameters for the AzureFirewallsClient.Get method. @@ -3083,15 +2386,6 @@ type AzureReachabilityReport struct { ReachabilityReport []*AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReport. -func (a AzureReachabilityReport) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregationLevel", a.AggregationLevel) - populate(objectMap, "providerLocation", a.ProviderLocation) - populate(objectMap, "reachabilityReport", a.ReachabilityReport) - return json.Marshal(objectMap) -} - // AzureReachabilityReportItem - Azure reachability report details for a given provider location. type AzureReachabilityReportItem struct { // The Azure region. @@ -3104,15 +2398,6 @@ type AzureReachabilityReportItem struct { Provider *string `json:"provider,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportItem. -func (a AzureReachabilityReportItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocation", a.AzureLocation) - populate(objectMap, "latencies", a.Latencies) - populate(objectMap, "provider", a.Provider) - return json.Marshal(objectMap) -} - // AzureReachabilityReportLatencyInfo - Details on latency for a time series. type AzureReachabilityReportLatencyInfo struct { // The relative latency score between 1 and 100, higher values indicating a faster connection. @@ -3122,37 +2407,6 @@ type AzureReachabilityReportLatencyInfo struct { TimeStamp *time.Time `json:"timeStamp,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLatencyInfo. -func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "score", a.Score) - populateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLatencyInfo. -func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "score": - err = unpopulate(val, &a.Score) - delete(rawMsg, key) - case "timeStamp": - err = unpopulateTimeRFC3339(val, &a.TimeStamp) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // AzureReachabilityReportLocation - Parameters that define a geographic location. type AzureReachabilityReportLocation struct { // REQUIRED; The name of the country. @@ -3183,49 +2437,6 @@ type AzureReachabilityReportParameters struct { Providers []*string `json:"providers,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportParameters. -func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureLocations", a.AzureLocations) - populateTimeRFC3339(objectMap, "endTime", a.EndTime) - populate(objectMap, "providerLocation", a.ProviderLocation) - populate(objectMap, "providers", a.Providers) - populateTimeRFC3339(objectMap, "startTime", a.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportParameters. -func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "azureLocations": - err = unpopulate(val, &a.AzureLocations) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, &a.EndTime) - delete(rawMsg, key) - case "providerLocation": - err = unpopulate(val, &a.ProviderLocation) - delete(rawMsg, key) - case "providers": - err = unpopulate(val, &a.Providers) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, &a.StartTime) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // AzureWebCategory - Azure Web Category Resource. type AzureWebCategory struct { // Resource ID. @@ -3253,14 +2464,6 @@ type AzureWebCategoryListResult struct { Value []*AzureWebCategory `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryListResult. -func (a AzureWebCategoryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", a.NextLink) - populate(objectMap, "value", a.Value) - return json.Marshal(objectMap) -} - // AzureWebCategoryPropertiesFormat - Azure Web Category Properties. type AzureWebCategoryPropertiesFormat struct { // READ-ONLY; The name of the group that the category belongs to. @@ -3288,31 +2491,12 @@ type BGPCommunity struct { ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BGPCommunity. -func (b BGPCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "communityName", b.CommunityName) - populate(objectMap, "communityPrefixes", b.CommunityPrefixes) - populate(objectMap, "communityValue", b.CommunityValue) - populate(objectMap, "isAuthorizedToUse", b.IsAuthorizedToUse) - populate(objectMap, "serviceGroup", b.ServiceGroup) - populate(objectMap, "serviceSupportedRegion", b.ServiceSupportedRegion) - return json.Marshal(objectMap) -} - // BackendAddressInboundNatRulePortMappings - The response for a QueryInboundNatRulePortMapping API. type BackendAddressInboundNatRulePortMappings struct { // Collection of inbound NAT rule port mappings. InboundNatRulePortMappings []*InboundNatRulePortMapping `json:"inboundNatRulePortMappings,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BackendAddressInboundNatRulePortMappings. -func (b BackendAddressInboundNatRulePortMappings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "inboundNatRulePortMappings", b.InboundNatRulePortMappings) - return json.Marshal(objectMap) -} - // BackendAddressPool - Pool of backend IP addresses. type BackendAddressPool struct { // Resource ID. @@ -3362,21 +2546,6 @@ type BackendAddressPoolPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type BackendAddressPoolPropertiesFormat. -func (b BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendIPConfigurations", b.BackendIPConfigurations) - populate(objectMap, "inboundNatRules", b.InboundNatRules) - populate(objectMap, "loadBalancerBackendAddresses", b.LoadBalancerBackendAddresses) - populate(objectMap, "loadBalancingRules", b.LoadBalancingRules) - populate(objectMap, "location", b.Location) - populate(objectMap, "outboundRule", b.OutboundRule) - populate(objectMap, "outboundRules", b.OutboundRules) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "tunnelInterfaces", b.TunnelInterfaces) - return json.Marshal(objectMap) -} - // BastionActiveSession - The session detail for a target. type BastionActiveSession struct { // READ-ONLY; The protocol used to connect to the target. @@ -3392,7 +2561,7 @@ type BastionActiveSession struct { SessionID *string `json:"sessionId,omitempty" azure:"ro"` // READ-ONLY; The time when the session started. - StartTime map[string]interface{} `json:"startTime,omitempty" azure:"ro"` + StartTime interface{} `json:"startTime,omitempty" azure:"ro"` // READ-ONLY; The host name of the target. TargetHostName *string `json:"targetHostName,omitempty" azure:"ro"` @@ -3422,14 +2591,6 @@ type BastionActiveSessionListResult struct { Value []*BastionActiveSession `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BastionActiveSessionListResult. -func (b BastionActiveSessionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BastionHost - Bastion Host resource. type BastionHost struct { // Resource ID. @@ -3457,20 +2618,6 @@ type BastionHost struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type BastionHost. -func (b BastionHost) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", b.Etag) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "sku", b.SKU) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - // BastionHostIPConfiguration - IP configuration of an Bastion Host. type BastionHostIPConfiguration struct { // Resource ID. @@ -3513,14 +2660,6 @@ type BastionHostListResult struct { Value []*BastionHost `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BastionHostListResult. -func (b BastionHostListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BastionHostPropertiesFormat - Properties of the Bastion Host. type BastionHostPropertiesFormat struct { // FQDN for the endpoint on which bastion host is accessible. @@ -3551,35 +2690,23 @@ type BastionHostPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormat. -func (b BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsName", b.DNSName) - populate(objectMap, "disableCopyPaste", b.DisableCopyPaste) - populate(objectMap, "enableFileCopy", b.EnableFileCopy) - populate(objectMap, "enableIpConnect", b.EnableIPConnect) - populate(objectMap, "enableShareableLink", b.EnableShareableLink) - populate(objectMap, "enableTunneling", b.EnableTunneling) - populate(objectMap, "ipConfigurations", b.IPConfigurations) - populate(objectMap, "provisioningState", b.ProvisioningState) - populate(objectMap, "scaleUnits", b.ScaleUnits) - return json.Marshal(objectMap) -} - // BastionHostsClientBeginCreateOrUpdateOptions contains the optional parameters for the BastionHostsClient.BeginCreateOrUpdate // method. type BastionHostsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // BastionHostsClientBeginDeleteOptions contains the optional parameters for the BastionHostsClient.BeginDelete method. type BastionHostsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // BastionHostsClientBeginUpdateTagsOptions contains the optional parameters for the BastionHostsClient.BeginUpdateTags method. type BastionHostsClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // BastionHostsClientGetOptions contains the optional parameters for the BastionHostsClient.Get method. @@ -3607,14 +2734,6 @@ type BastionSessionDeleteResult struct { Value []*BastionSessionState `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BastionSessionDeleteResult. -func (b BastionSessionDeleteResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BastionSessionState - The session state detail for a target. type BastionSessionState struct { // READ-ONLY; Used for extra information. @@ -3648,13 +2767,6 @@ type BastionShareableLinkListRequest struct { VMs []*BastionShareableLink `json:"vms,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListRequest. -func (b BastionShareableLinkListRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vms", b.VMs) - return json.Marshal(objectMap) -} - // BastionShareableLinkListResult - Response for all the Bastion Shareable Link endpoints. type BastionShareableLinkListResult struct { // The URL to get the next set of results. @@ -3664,14 +2776,6 @@ type BastionShareableLinkListResult struct { Value []*BastionShareableLink `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListResult. -func (b BastionShareableLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BgpConnection - Virtual Appliance Site resource. type BgpConnection struct { // Resource ID. @@ -3741,13 +2845,6 @@ type BgpPeerStatusListResult struct { Value []*BgpPeerStatus `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatusListResult. -func (b BgpPeerStatusListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BgpServiceCommunitiesClientListOptions contains the optional parameters for the BgpServiceCommunitiesClient.List method. type BgpServiceCommunitiesClientListOptions struct { // placeholder for future optional parameters @@ -3774,18 +2871,6 @@ type BgpServiceCommunity struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunity. -func (b BgpServiceCommunity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", b.ID) - populate(objectMap, "location", b.Location) - populate(objectMap, "name", b.Name) - populate(objectMap, "properties", b.Properties) - populate(objectMap, "tags", b.Tags) - populate(objectMap, "type", b.Type) - return json.Marshal(objectMap) -} - // BgpServiceCommunityListResult - Response for the ListServiceCommunity API service call. type BgpServiceCommunityListResult struct { // The URL to get the next set of results. @@ -3795,14 +2880,6 @@ type BgpServiceCommunityListResult struct { Value []*BgpServiceCommunity `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityListResult. -func (b BgpServiceCommunityListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", b.NextLink) - populate(objectMap, "value", b.Value) - return json.Marshal(objectMap) -} - // BgpServiceCommunityPropertiesFormat - Properties of Service Community. type BgpServiceCommunityPropertiesFormat struct { // A list of bgp communities. @@ -3812,14 +2889,6 @@ type BgpServiceCommunityPropertiesFormat struct { ServiceName *string `json:"serviceName,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityPropertiesFormat. -func (b BgpServiceCommunityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpCommunities", b.BgpCommunities) - populate(objectMap, "serviceName", b.ServiceName) - return json.Marshal(objectMap) -} - // BgpSettings - BGP settings details. type BgpSettings struct { // The BGP speaker's ASN. @@ -3835,16 +2904,6 @@ type BgpSettings struct { PeerWeight *int32 `json:"peerWeight,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type BgpSettings. -func (b BgpSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "asn", b.Asn) - populate(objectMap, "bgpPeeringAddress", b.BgpPeeringAddress) - populate(objectMap, "bgpPeeringAddresses", b.BgpPeeringAddresses) - populate(objectMap, "peerWeight", b.PeerWeight) - return json.Marshal(objectMap) -} - // BreakOutCategoryPolicies - Network Virtual Appliance Sku Properties. type BreakOutCategoryPolicies struct { // Flag to control breakout of o365 allow category. @@ -3884,16 +2943,6 @@ type CloudErrorBody struct { Target *string `json:"target,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type CloudErrorBody. -func (c CloudErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", c.Code) - populate(objectMap, "details", c.Details) - populate(objectMap, "message", c.Message) - populate(objectMap, "target", c.Target) - return json.Marshal(objectMap) -} - type Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties struct { // READ-ONLY; The client id of user assigned identity. ClientID *string `json:"clientId,omitempty" azure:"ro"` @@ -3915,15 +2964,6 @@ type ConfigurationDiagnosticParameters struct { VerbosityLevel *VerbosityLevel `json:"verbosityLevel,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticParameters. -func (c ConfigurationDiagnosticParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "profiles", c.Profiles) - populate(objectMap, "targetResourceId", c.TargetResourceID) - populate(objectMap, "verbosityLevel", c.VerbosityLevel) - return json.Marshal(objectMap) -} - // ConfigurationDiagnosticProfile - Parameters to compare with network configuration. type ConfigurationDiagnosticProfile struct { // REQUIRED; Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. @@ -3948,13 +2988,6 @@ type ConfigurationDiagnosticResponse struct { Results []*ConfigurationDiagnosticResult `json:"results,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResponse. -func (c ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "results", c.Results) - return json.Marshal(objectMap) -} - // ConfigurationDiagnosticResult - Network configuration diagnostic result corresponded to provided traffic query. type ConfigurationDiagnosticResult struct { // Network security group result. @@ -3976,15 +3009,6 @@ type ConnectionMonitor struct { Tags map[string]*string `json:"tags,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitor. -func (c ConnectionMonitor) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "location", c.Location) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - return json.Marshal(objectMap) -} - // ConnectionMonitorDestination - Describes the destination of connection monitor. type ConnectionMonitorDestination struct { // Address of the connection monitor destination (IP or domain name). @@ -4030,14 +3054,6 @@ type ConnectionMonitorEndpointFilter struct { Type *ConnectionMonitorEndpointFilterType `json:"type,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilter. -func (c ConnectionMonitorEndpointFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "items", c.Items) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - // ConnectionMonitorEndpointFilterItem - Describes the connection monitor endpoint filter item. type ConnectionMonitorEndpointFilterItem struct { // The address of the filter item. @@ -4056,14 +3072,6 @@ type ConnectionMonitorEndpointScope struct { Include []*ConnectionMonitorEndpointScopeItem `json:"include,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScope. -func (c ConnectionMonitorEndpointScope) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclude", c.Exclude) - populate(objectMap, "include", c.Include) - return json.Marshal(objectMap) -} - // ConnectionMonitorEndpointScopeItem - Describes the connection monitor endpoint scope item. type ConnectionMonitorEndpointScopeItem struct { // The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or IPv4/IPv6 IP address. @@ -4091,18 +3099,6 @@ type ConnectionMonitorHTTPConfiguration struct { ValidStatusCodeRanges []*string `json:"validStatusCodeRanges,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorHTTPConfiguration. -func (c ConnectionMonitorHTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "method", c.Method) - populate(objectMap, "path", c.Path) - populate(objectMap, "port", c.Port) - populate(objectMap, "preferHTTPS", c.PreferHTTPS) - populate(objectMap, "requestHeaders", c.RequestHeaders) - populate(objectMap, "validStatusCodeRanges", c.ValidStatusCodeRanges) - return json.Marshal(objectMap) -} - // ConnectionMonitorIcmpConfiguration - Describes the ICMP configuration. type ConnectionMonitorIcmpConfiguration struct { // Value indicating whether path evaluation with trace route should be disabled. @@ -4115,13 +3111,6 @@ type ConnectionMonitorListResult struct { Value []*ConnectionMonitorResult `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorListResult. -func (c ConnectionMonitorListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - // ConnectionMonitorOutput - Describes a connection monitor output destination. type ConnectionMonitorOutput struct { // Connection monitor output destination type. Currently, only "Workspace" is supported. @@ -4161,21 +3150,6 @@ type ConnectionMonitorParameters struct { TestGroups []*ConnectionMonitorTestGroup `json:"testGroups,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorParameters. -func (c ConnectionMonitorParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoStart", c.AutoStart) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "endpoints", c.Endpoints) - populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) - populate(objectMap, "notes", c.Notes) - populate(objectMap, "outputs", c.Outputs) - populate(objectMap, "source", c.Source) - populate(objectMap, "testConfigurations", c.TestConfigurations) - populate(objectMap, "testGroups", c.TestGroups) - return json.Marshal(objectMap) -} - // ConnectionMonitorQueryResult - List of connection states snapshots. type ConnectionMonitorQueryResult struct { // Status of connection monitor source. @@ -4185,14 +3159,6 @@ type ConnectionMonitorQueryResult struct { States []*ConnectionStateSnapshot `json:"states,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorQueryResult. -func (c ConnectionMonitorQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sourceStatus", c.SourceStatus) - populate(objectMap, "states", c.States) - return json.Marshal(objectMap) -} - // ConnectionMonitorResult - Information about the connection monitor. type ConnectionMonitorResult struct { // Connection monitor location. @@ -4217,19 +3183,6 @@ type ConnectionMonitorResult struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResult. -func (c ConnectionMonitorResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - // ConnectionMonitorResultProperties - Describes the properties of a connection monitor. type ConnectionMonitorResultProperties struct { // Determines if the connection monitor will start automatically once created. @@ -4272,81 +3225,6 @@ type ConnectionMonitorResultProperties struct { StartTime *time.Time `json:"startTime,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResultProperties. -func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoStart", c.AutoStart) - populate(objectMap, "connectionMonitorType", c.ConnectionMonitorType) - populate(objectMap, "destination", c.Destination) - populate(objectMap, "endpoints", c.Endpoints) - populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) - populate(objectMap, "monitoringStatus", c.MonitoringStatus) - populate(objectMap, "notes", c.Notes) - populate(objectMap, "outputs", c.Outputs) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "source", c.Source) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - populate(objectMap, "testConfigurations", c.TestConfigurations) - populate(objectMap, "testGroups", c.TestGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResultProperties. -func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "autoStart": - err = unpopulate(val, &c.AutoStart) - delete(rawMsg, key) - case "connectionMonitorType": - err = unpopulate(val, &c.ConnectionMonitorType) - delete(rawMsg, key) - case "destination": - err = unpopulate(val, &c.Destination) - delete(rawMsg, key) - case "endpoints": - err = unpopulate(val, &c.Endpoints) - delete(rawMsg, key) - case "monitoringIntervalInSeconds": - err = unpopulate(val, &c.MonitoringIntervalInSeconds) - delete(rawMsg, key) - case "monitoringStatus": - err = unpopulate(val, &c.MonitoringStatus) - delete(rawMsg, key) - case "notes": - err = unpopulate(val, &c.Notes) - delete(rawMsg, key) - case "outputs": - err = unpopulate(val, &c.Outputs) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, &c.ProvisioningState) - delete(rawMsg, key) - case "source": - err = unpopulate(val, &c.Source) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, &c.StartTime) - delete(rawMsg, key) - case "testConfigurations": - err = unpopulate(val, &c.TestConfigurations) - delete(rawMsg, key) - case "testGroups": - err = unpopulate(val, &c.TestGroups) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // ConnectionMonitorSource - Describes the source of connection monitor. type ConnectionMonitorSource struct { // REQUIRED; The ID of the resource used as the source by connection monitor. @@ -4423,17 +3301,6 @@ type ConnectionMonitorTestGroup struct { Disable *bool `json:"disable,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestGroup. -func (c ConnectionMonitorTestGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinations", c.Destinations) - populate(objectMap, "disable", c.Disable) - populate(objectMap, "name", c.Name) - populate(objectMap, "sources", c.Sources) - populate(objectMap, "testConfigurations", c.TestConfigurations) - return json.Marshal(objectMap) -} - // ConnectionMonitorWorkspaceSettings - Describes the settings for producing output into a log analytics workspace. type ConnectionMonitorWorkspaceSettings struct { // Log analytics workspace resource ID. @@ -4445,29 +3312,35 @@ type ConnectionMonitorWorkspaceSettings struct { 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ConnectionMonitorsClientBeginQueryOptions contains the optional parameters for the ConnectionMonitorsClient.BeginQuery // method. type ConnectionMonitorsClientBeginQueryOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ConnectionMonitorsClientBeginStartOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStart // method. type ConnectionMonitorsClientBeginStartOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ConnectionMonitorsClientBeginStopOptions contains the optional parameters for the ConnectionMonitorsClient.BeginStop method. type ConnectionMonitorsClientBeginStopOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ConnectionMonitorsClientGetOptions contains the optional parameters for the ConnectionMonitorsClient.Get method. @@ -4534,69 +3407,6 @@ type ConnectionStateSnapshot struct { Hops []*ConnectivityHop `json:"hops,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectionStateSnapshot. -func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) - populate(objectMap, "connectionState", c.ConnectionState) - populateTimeRFC3339(objectMap, "endTime", c.EndTime) - populate(objectMap, "evaluationState", c.EvaluationState) - populate(objectMap, "hops", c.Hops) - populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) - populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) - populate(objectMap, "probesFailed", c.ProbesFailed) - populate(objectMap, "probesSent", c.ProbesSent) - populateTimeRFC3339(objectMap, "startTime", c.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStateSnapshot. -func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "avgLatencyInMs": - err = unpopulate(val, &c.AvgLatencyInMs) - delete(rawMsg, key) - case "connectionState": - err = unpopulate(val, &c.ConnectionState) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, &c.EndTime) - delete(rawMsg, key) - case "evaluationState": - err = unpopulate(val, &c.EvaluationState) - delete(rawMsg, key) - case "hops": - err = unpopulate(val, &c.Hops) - delete(rawMsg, key) - case "maxLatencyInMs": - err = unpopulate(val, &c.MaxLatencyInMs) - delete(rawMsg, key) - case "minLatencyInMs": - err = unpopulate(val, &c.MinLatencyInMs) - delete(rawMsg, key) - case "probesFailed": - err = unpopulate(val, &c.ProbesFailed) - delete(rawMsg, key) - case "probesSent": - err = unpopulate(val, &c.ProbesSent) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, &c.StartTime) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // 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. @@ -4639,21 +3449,6 @@ type ConnectivityHop struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. -func (c ConnectivityHop) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", c.Address) - populate(objectMap, "id", c.ID) - populate(objectMap, "issues", c.Issues) - populate(objectMap, "links", c.Links) - populate(objectMap, "nextHopIds", c.NextHopIDs) - populate(objectMap, "previousHopIds", c.PreviousHopIDs) - populate(objectMap, "previousLinks", c.PreviousLinks) - populate(objectMap, "resourceId", c.ResourceID) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - // ConnectivityInformation - Information on the connectivity status. type ConnectivityInformation struct { // READ-ONLY; Average latency in milliseconds. @@ -4678,19 +3473,6 @@ type ConnectivityInformation struct { ProbesSent *int32 `json:"probesSent,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectivityInformation. -func (c ConnectivityInformation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) - populate(objectMap, "connectionStatus", c.ConnectionStatus) - populate(objectMap, "hops", c.Hops) - populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) - populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) - populate(objectMap, "probesFailed", c.ProbesFailed) - populate(objectMap, "probesSent", c.ProbesSent) - return json.Marshal(objectMap) -} - // ConnectivityIssue - Information about an issue encountered in the process of checking for connectivity. type ConnectivityIssue struct { // READ-ONLY; Provides additional context on the issue. @@ -4706,16 +3488,6 @@ type ConnectivityIssue struct { Type *IssueType `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. -func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "context", c.Context) - populate(objectMap, "origin", c.Origin) - populate(objectMap, "severity", c.Severity) - populate(objectMap, "type", c.Type) - return json.Marshal(objectMap) -} - // ConnectivityParameters - Parameters that determine how the connectivity check will be performed. type ConnectivityParameters struct { // REQUIRED; The destination of connection. @@ -4797,15 +3569,6 @@ type ContainerNetworkInterfaceConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. -func (c ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerNetworkInterfaces", c.ContainerNetworkInterfaces) - populate(objectMap, "ipConfigurations", c.IPConfigurations) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - // ContainerNetworkInterfaceIPConfiguration - The ip configuration for a container network interface. type ContainerNetworkInterfaceIPConfiguration struct { // The name of the resource. This name can be used to access the resource. @@ -4842,16 +3605,6 @@ type ContainerNetworkInterfacePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfacePropertiesFormat. -func (c ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "container", c.Container) - populate(objectMap, "containerNetworkInterfaceConfiguration", c.ContainerNetworkInterfaceConfiguration) - populate(objectMap, "ipConfigurations", c.IPConfigurations) - populate(objectMap, "provisioningState", c.ProvisioningState) - return json.Marshal(objectMap) -} - // CustomDNSConfigPropertiesFormat - Contains custom Dns resolution configuration from customer. type CustomDNSConfigPropertiesFormat struct { // Fqdn that resolves to private endpoint ip address. @@ -4861,14 +3614,6 @@ type CustomDNSConfigPropertiesFormat struct { IPAddresses []*string `json:"ipAddresses,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type CustomDNSConfigPropertiesFormat. -func (c CustomDNSConfigPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdn", c.Fqdn) - populate(objectMap, "ipAddresses", c.IPAddresses) - return json.Marshal(objectMap) -} - // CustomIPPrefix - Custom IP prefix resource. type CustomIPPrefix struct { // The extended location of the custom IP prefix. @@ -4899,21 +3644,6 @@ type CustomIPPrefix struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefix. -func (c CustomIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", c.Etag) - populate(objectMap, "extendedLocation", c.ExtendedLocation) - populate(objectMap, "id", c.ID) - populate(objectMap, "location", c.Location) - populate(objectMap, "name", c.Name) - populate(objectMap, "properties", c.Properties) - populate(objectMap, "tags", c.Tags) - populate(objectMap, "type", c.Type) - populate(objectMap, "zones", c.Zones) - return json.Marshal(objectMap) -} - // CustomIPPrefixListResult - Response for ListCustomIpPrefixes API service call. type CustomIPPrefixListResult struct { // The URL to get the next set of results. @@ -4923,14 +3653,6 @@ type CustomIPPrefixListResult struct { Value []*CustomIPPrefix `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixListResult. -func (c CustomIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", c.NextLink) - populate(objectMap, "value", c.Value) - return json.Marshal(objectMap) -} - // CustomIPPrefixPropertiesFormat - Custom IP prefix properties. type CustomIPPrefixPropertiesFormat struct { // Authorization message for WAN validation. @@ -4964,31 +3686,17 @@ type CustomIPPrefixPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixPropertiesFormat. -func (c CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationMessage", c.AuthorizationMessage) - populate(objectMap, "childCustomIpPrefixes", c.ChildCustomIPPrefixes) - populate(objectMap, "cidr", c.Cidr) - populate(objectMap, "commissionedState", c.CommissionedState) - populate(objectMap, "customIpPrefixParent", c.CustomIPPrefixParent) - populate(objectMap, "failedReason", c.FailedReason) - populate(objectMap, "provisioningState", c.ProvisioningState) - populate(objectMap, "publicIpPrefixes", c.PublicIPPrefixes) - populate(objectMap, "resourceGuid", c.ResourceGUID) - populate(objectMap, "signedMessage", c.SignedMessage) - return json.Marshal(objectMap) -} - // CustomIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the CustomIPPrefixesClient.BeginCreateOrUpdate // method. type CustomIPPrefixesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // CustomIPPrefixesClientBeginDeleteOptions contains the optional parameters for the CustomIPPrefixesClient.BeginDelete method. type CustomIPPrefixesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // CustomIPPrefixesClientGetOptions contains the optional parameters for the CustomIPPrefixesClient.Get method. @@ -5030,25 +3738,18 @@ type DNSSettings struct { Servers []*string `json:"servers,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type DNSSettings. -func (d DNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "enableProxy", d.EnableProxy) - populate(objectMap, "requireProxyForNetworkRules", d.RequireProxyForNetworkRules) - populate(objectMap, "servers", d.Servers) - return json.Marshal(objectMap) -} - // DdosCustomPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginCreateOrUpdate // method. type DdosCustomPoliciesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DdosCustomPoliciesClientBeginDeleteOptions contains the optional parameters for the DdosCustomPoliciesClient.BeginDelete // method. type DdosCustomPoliciesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DdosCustomPoliciesClientGetOptions contains the optional parameters for the DdosCustomPoliciesClient.Get method. @@ -5086,19 +3787,6 @@ type DdosCustomPolicy struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicy. -func (d DdosCustomPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - // DdosCustomPolicyPropertiesFormat - DDoS custom policy properties. type DdosCustomPolicyPropertiesFormat struct { // The protocol-specific DDoS policy customization parameters. @@ -5115,16 +3803,6 @@ type DdosCustomPolicyPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicyPropertiesFormat. -func (d DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "protocolCustomSettings", d.ProtocolCustomSettings) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "publicIPAddresses", d.PublicIPAddresses) - populate(objectMap, "resourceGuid", d.ResourceGUID) - return json.Marshal(objectMap) -} - // DdosProtectionPlan - A DDoS protection plan in a resource group. type DdosProtectionPlan struct { // Resource location. @@ -5149,19 +3827,6 @@ type DdosProtectionPlan struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlan. -func (d DdosProtectionPlan) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - // DdosProtectionPlanListResult - A list of DDoS protection plans. type DdosProtectionPlanListResult struct { // A list of DDoS protection plans. @@ -5171,14 +3836,6 @@ type DdosProtectionPlanListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanListResult. -func (d DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - // DdosProtectionPlanPropertiesFormat - DDoS protection plan properties. type DdosProtectionPlanPropertiesFormat struct { // READ-ONLY; The provisioning state of the DDoS protection plan resource. @@ -5192,25 +3849,18 @@ type DdosProtectionPlanPropertiesFormat struct { VirtualNetworks []*SubResource `json:"virtualNetworks,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanPropertiesFormat. -func (d DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "resourceGuid", d.ResourceGUID) - populate(objectMap, "virtualNetworks", d.VirtualNetworks) - return json.Marshal(objectMap) -} - // DdosProtectionPlansClientBeginCreateOrUpdateOptions contains the optional parameters for the DdosProtectionPlansClient.BeginCreateOrUpdate // method. type DdosProtectionPlansClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DdosProtectionPlansClientBeginDeleteOptions contains the optional parameters for the DdosProtectionPlansClient.BeginDelete // method. type DdosProtectionPlansClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DdosProtectionPlansClientGetOptions contains the optional parameters for the DdosProtectionPlansClient.Get method. @@ -5294,13 +3944,6 @@ type DhcpOptions struct { DNSServers []*string `json:"dnsServers,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type DhcpOptions. -func (d DhcpOptions) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsServers", d.DNSServers) - return json.Marshal(objectMap) -} - // Dimension of the metric. type Dimension struct { // The display name of the dimension. @@ -5337,29 +3980,18 @@ type DscpConfiguration struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DscpConfiguration. -func (d DscpConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", d.Etag) - populate(objectMap, "id", d.ID) - populate(objectMap, "location", d.Location) - populate(objectMap, "name", d.Name) - populate(objectMap, "properties", d.Properties) - populate(objectMap, "tags", d.Tags) - populate(objectMap, "type", d.Type) - return json.Marshal(objectMap) -} - // DscpConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the DscpConfigurationClient.BeginCreateOrUpdate // method. type DscpConfigurationClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DscpConfigurationClientBeginDeleteOptions contains the optional parameters for the DscpConfigurationClient.BeginDelete // method. type DscpConfigurationClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // DscpConfigurationClientGetOptions contains the optional parameters for the DscpConfigurationClient.Get method. @@ -5386,14 +4018,6 @@ type DscpConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationListResult. -func (d DscpConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", d.NextLink) - populate(objectMap, "value", d.Value) - return json.Marshal(objectMap) -} - // DscpConfigurationPropertiesFormat - Differentiated Services Code Point configuration properties. type DscpConfigurationPropertiesFormat struct { // Destination IP ranges. @@ -5430,23 +4054,6 @@ type DscpConfigurationPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationPropertiesFormat. -func (d DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associatedNetworkInterfaces", d.AssociatedNetworkInterfaces) - populate(objectMap, "destinationIpRanges", d.DestinationIPRanges) - populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) - populate(objectMap, "markings", d.Markings) - populate(objectMap, "protocol", d.Protocol) - populate(objectMap, "provisioningState", d.ProvisioningState) - populate(objectMap, "qosCollectionId", d.QosCollectionID) - populate(objectMap, "qosDefinitionCollection", d.QosDefinitionCollection) - populate(objectMap, "resourceGuid", d.ResourceGUID) - populate(objectMap, "sourceIpRanges", d.SourceIPRanges) - populate(objectMap, "sourcePortRanges", d.SourcePortRanges) - return json.Marshal(objectMap) -} - // EffectiveNetworkSecurityGroup - Effective network security group. type EffectiveNetworkSecurityGroup struct { // Associated resources. @@ -5462,16 +4069,6 @@ type EffectiveNetworkSecurityGroup struct { TagMap *string `json:"tagMap,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroup. -func (e EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "association", e.Association) - populate(objectMap, "effectiveSecurityRules", e.EffectiveSecurityRules) - populate(objectMap, "networkSecurityGroup", e.NetworkSecurityGroup) - populate(objectMap, "tagMap", e.TagMap) - return json.Marshal(objectMap) -} - // EffectiveNetworkSecurityGroupAssociation - The effective network security group association. type EffectiveNetworkSecurityGroupAssociation struct { // The ID of the network interface if assigned. @@ -5493,14 +4090,6 @@ type EffectiveNetworkSecurityGroupListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupListResult. -func (e EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // EffectiveNetworkSecurityRule - Effective network security rules. type EffectiveNetworkSecurityRule struct { // Whether network traffic is allowed or denied. @@ -5553,27 +4142,6 @@ type EffectiveNetworkSecurityRule struct { SourcePortRanges []*string `json:"sourcePortRanges,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityRule. -func (e EffectiveNetworkSecurityRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", e.Access) - populate(objectMap, "destinationAddressPrefix", e.DestinationAddressPrefix) - populate(objectMap, "destinationAddressPrefixes", e.DestinationAddressPrefixes) - populate(objectMap, "destinationPortRange", e.DestinationPortRange) - populate(objectMap, "destinationPortRanges", e.DestinationPortRanges) - populate(objectMap, "direction", e.Direction) - populate(objectMap, "expandedDestinationAddressPrefix", e.ExpandedDestinationAddressPrefix) - populate(objectMap, "expandedSourceAddressPrefix", e.ExpandedSourceAddressPrefix) - populate(objectMap, "name", e.Name) - populate(objectMap, "priority", e.Priority) - populate(objectMap, "protocol", e.Protocol) - populate(objectMap, "sourceAddressPrefix", e.SourceAddressPrefix) - populate(objectMap, "sourceAddressPrefixes", e.SourceAddressPrefixes) - populate(objectMap, "sourcePortRange", e.SourcePortRange) - populate(objectMap, "sourcePortRanges", e.SourcePortRanges) - return json.Marshal(objectMap) -} - // EffectiveRoute - Effective Route. type EffectiveRoute struct { // The address prefixes of the effective routes in CIDR notation. @@ -5598,19 +4166,6 @@ type EffectiveRoute struct { State *EffectiveRouteState `json:"state,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type EffectiveRoute. -func (e EffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", e.AddressPrefix) - populate(objectMap, "disableBgpRoutePropagation", e.DisableBgpRoutePropagation) - populate(objectMap, "name", e.Name) - populate(objectMap, "nextHopIpAddress", e.NextHopIPAddress) - populate(objectMap, "nextHopType", e.NextHopType) - populate(objectMap, "source", e.Source) - populate(objectMap, "state", e.State) - return json.Marshal(objectMap) -} - // EffectiveRouteListResult - Response for list effective route API service call. type EffectiveRouteListResult struct { // A list of effective routes. @@ -5620,14 +4175,6 @@ type EffectiveRouteListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteListResult. -func (e EffectiveRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // EffectiveRoutesParameters - The parameters specifying the resource whose effective routes are being requested. type EffectiveRoutesParameters struct { // The resource whose effective routes are being requested. @@ -5659,14 +4206,6 @@ type EndpointServicesListResult struct { Value []*EndpointServiceResult `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type EndpointServicesListResult. -func (e EndpointServicesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // Error - Common error representation. type Error struct { // Error code. @@ -5685,17 +4224,6 @@ type Error struct { Target *string `json:"target,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type Error. -func (e Error) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "innerError", e.InnerError) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - // ErrorDetails - Common error details representation. type ErrorDetails struct { // Error code. @@ -5729,16 +4257,6 @@ type EvaluatedNetworkSecurityGroup struct { RulesEvaluationResult []*SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type EvaluatedNetworkSecurityGroup. -func (e EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliedTo", e.AppliedTo) - populate(objectMap, "matchedRule", e.MatchedRule) - populate(objectMap, "networkSecurityGroupId", e.NetworkSecurityGroupID) - populate(objectMap, "rulesEvaluationResult", e.RulesEvaluationResult) - return json.Marshal(objectMap) -} - // ExclusionManagedRule - Defines a managed rule to use for exclusion. type ExclusionManagedRule struct { // REQUIRED; Identifier for the managed rule. @@ -5754,14 +4272,6 @@ type ExclusionManagedRuleGroup struct { Rules []*ExclusionManagedRule `json:"rules,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleGroup. -func (e ExclusionManagedRuleGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", e.RuleGroupName) - populate(objectMap, "rules", e.Rules) - return json.Marshal(objectMap) -} - // ExclusionManagedRuleSet - Defines a managed rule set for Exclusions. type ExclusionManagedRuleSet struct { // REQUIRED; Defines the rule set type to use. @@ -5774,15 +4284,6 @@ type ExclusionManagedRuleSet struct { RuleGroups []*ExclusionManagedRuleGroup `json:"ruleGroups,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleSet. -func (e ExclusionManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroups", e.RuleGroups) - populate(objectMap, "ruleSetType", e.RuleSetType) - populate(objectMap, "ruleSetVersion", e.RuleSetVersion) - return json.Marshal(objectMap) -} - // ExplicitProxySettings - Explicit Proxy Settings in Firewall Policy. type ExplicitProxySettings struct { // When set to true, explicit proxy mode is enabled. @@ -5828,20 +4329,6 @@ type ExpressRouteCircuit struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuit. -func (e ExpressRouteCircuit) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "sku", e.SKU) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitArpTable - The ARP table associated with the ExpressRouteCircuit. type ExpressRouteCircuitArpTable struct { // Entry age in minutes. @@ -5878,13 +4365,15 @@ type ExpressRouteCircuitAuthorization struct { // ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginCreateOrUpdate // method. type ExpressRouteCircuitAuthorizationsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.BeginDelete // method. type ExpressRouteCircuitAuthorizationsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitAuthorizationsClientGetOptions contains the optional parameters for the ExpressRouteCircuitAuthorizationsClient.Get @@ -5927,14 +4416,6 @@ type ExpressRouteCircuitConnectionListResult struct { Value []*ExpressRouteCircuitConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionListResult. -func (e ExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitConnectionPropertiesFormat - Properties of the express route circuit connection. type ExpressRouteCircuitConnectionPropertiesFormat struct { // /29 IP address space to carve out Customer addresses for tunnels. @@ -5962,13 +4443,15 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct { // ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginCreateOrUpdate // method. type ExpressRouteCircuitConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.BeginDelete // method. type ExpressRouteCircuitConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCircuitConnectionsClient.Get @@ -5992,14 +4475,6 @@ type ExpressRouteCircuitListResult struct { Value []*ExpressRouteCircuit `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitListResult. -func (e ExpressRouteCircuitListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitPeering - Peering in an ExpressRouteCircuit resource. type ExpressRouteCircuitPeering struct { // Resource ID. @@ -6039,18 +4514,6 @@ type ExpressRouteCircuitPeeringConfig struct { AdvertisedPublicPrefixesState *ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringConfig. -func (e ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "advertisedCommunities", e.AdvertisedCommunities) - populate(objectMap, "advertisedPublicPrefixes", e.AdvertisedPublicPrefixes) - populate(objectMap, "advertisedPublicPrefixesState", e.AdvertisedPublicPrefixesState) - populate(objectMap, "customerASN", e.CustomerASN) - populate(objectMap, "legacyMode", e.LegacyMode) - populate(objectMap, "routingRegistryName", e.RoutingRegistryName) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitPeeringID - ExpressRoute circuit peering identifier. type ExpressRouteCircuitPeeringID struct { // The ID of the ExpressRoute circuit peering. @@ -6067,14 +4530,6 @@ type ExpressRouteCircuitPeeringListResult struct { Value []*ExpressRouteCircuitPeering `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringListResult. -func (e ExpressRouteCircuitPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitPeeringPropertiesFormat - Properties of the express route circuit peering. type ExpressRouteCircuitPeeringPropertiesFormat struct { // The Azure ASN. @@ -6138,42 +4593,18 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. -func (e ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "azureASN", e.AzureASN) - populate(objectMap, "connections", e.Connections) - populate(objectMap, "expressRouteConnection", e.ExpressRouteConnection) - populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) - populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) - populate(objectMap, "lastModifiedBy", e.LastModifiedBy) - populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) - populate(objectMap, "peerASN", e.PeerASN) - populate(objectMap, "peeredConnections", e.PeeredConnections) - populate(objectMap, "peeringType", e.PeeringType) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "routeFilter", e.RouteFilter) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) - populate(objectMap, "sharedKey", e.SharedKey) - populate(objectMap, "state", e.State) - populate(objectMap, "stats", e.Stats) - populate(objectMap, "vlanId", e.VlanID) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginCreateOrUpdate // method. type ExpressRouteCircuitPeeringsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.BeginDelete // method. type ExpressRouteCircuitPeeringsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCircuitPeeringsClient.Get @@ -6233,26 +4664,6 @@ type ExpressRouteCircuitPropertiesFormat struct { Stag *int32 `json:"stag,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPropertiesFormat. -func (e ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowClassicOperations", e.AllowClassicOperations) - populate(objectMap, "authorizations", e.Authorizations) - populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) - populate(objectMap, "circuitProvisioningState", e.CircuitProvisioningState) - populate(objectMap, "expressRoutePort", e.ExpressRoutePort) - populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) - populate(objectMap, "globalReachEnabled", e.GlobalReachEnabled) - populate(objectMap, "peerings", e.Peerings) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "serviceKey", e.ServiceKey) - populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) - populate(objectMap, "serviceProviderProperties", e.ServiceProviderProperties) - populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) - populate(objectMap, "stag", e.Stag) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitReference - Reference to an express route circuit. type ExpressRouteCircuitReference struct { // Corresponding Express Route Circuit Id. @@ -6344,42 +4755,39 @@ type ExpressRouteCircuitsArpTableListResult struct { Value []*ExpressRouteCircuitArpTable `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsArpTableListResult. -func (e ExpressRouteCircuitsArpTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginCreateOrUpdate // method. type ExpressRouteCircuitsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginDelete // method. type ExpressRouteCircuitsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListArpTable // method. type ExpressRouteCircuitsClientBeginListArpTableOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTable // method. type ExpressRouteCircuitsClientBeginListRoutesTableOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCircuitsClient.BeginListRoutesTableSummary // method. type ExpressRouteCircuitsClientBeginListRoutesTableSummaryOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCircuitsClientGetOptions contains the optional parameters for the ExpressRouteCircuitsClient.Get method. @@ -6424,14 +4832,6 @@ type ExpressRouteCircuitsRoutesTableListResult struct { Value []*ExpressRouteCircuitRoutesTable `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableListResult. -func (e ExpressRouteCircuitsRoutesTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCircuitsRoutesTableSummaryListResult - Response for ListRoutesTable associated with the Express Route Circuits // API. type ExpressRouteCircuitsRoutesTableSummaryListResult struct { @@ -6442,14 +4842,6 @@ type ExpressRouteCircuitsRoutesTableSummaryListResult struct { Value []*ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. -func (e ExpressRouteCircuitsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteConnection resource. type ExpressRouteConnection struct { // REQUIRED; The name of the resource. @@ -6474,13 +4866,6 @@ type ExpressRouteConnectionList struct { Value []*ExpressRouteConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionList. -func (e ExpressRouteConnectionList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteConnectionProperties - Properties of the ExpressRouteConnection subresource. type ExpressRouteConnectionProperties struct { // REQUIRED; The ExpressRoute circuit peering. @@ -6508,13 +4893,15 @@ type ExpressRouteConnectionProperties struct { // ExpressRouteConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginCreateOrUpdate // method. type ExpressRouteConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteConnectionsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteConnectionsClient.BeginDelete // method. type ExpressRouteConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteConnectionsClientGetOptions contains the optional parameters for the ExpressRouteConnectionsClient.Get method. @@ -6551,19 +4938,6 @@ type ExpressRouteCrossConnection struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnection. -func (e ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRouteCrossConnectionListResult - Response for ListExpressRouteCrossConnection API service call. type ExpressRouteCrossConnectionListResult struct { // A list of ExpressRouteCrossConnection resources. @@ -6573,14 +4947,6 @@ type ExpressRouteCrossConnectionListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionListResult. -func (e ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCrossConnectionPeering - Peering in an ExpressRoute Cross Connection resource. type ExpressRouteCrossConnectionPeering struct { // Resource ID. @@ -6606,14 +4972,6 @@ type ExpressRouteCrossConnectionPeeringList struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringList. -func (e ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteCrossConnectionPeeringProperties - Properties of express route cross connection peering. type ExpressRouteCrossConnectionPeeringProperties struct { // The GatewayManager Etag. @@ -6665,13 +5023,15 @@ type ExpressRouteCrossConnectionPeeringProperties struct { // ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginCreateOrUpdate // method. type ExpressRouteCrossConnectionPeeringsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.BeginDelete // method. type ExpressRouteCrossConnectionPeeringsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionPeeringsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionPeeringsClient.Get @@ -6719,22 +5079,6 @@ type ExpressRouteCrossConnectionProperties struct { SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionProperties. -func (e ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) - populate(objectMap, "expressRouteCircuit", e.ExpressRouteCircuit) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "peerings", e.Peerings) - populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "sTag", e.STag) - populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) - populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) - populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) - return json.Marshal(objectMap) -} - // ExpressRouteCrossConnectionRoutesTableSummary - The routes table associated with the ExpressRouteCircuit. type ExpressRouteCrossConnectionRoutesTableSummary struct { // Autonomous system number. @@ -6754,25 +5098,29 @@ type ExpressRouteCrossConnectionRoutesTableSummary struct { // ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginCreateOrUpdate // method. type ExpressRouteCrossConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionsClientBeginListArpTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListArpTable // method. type ExpressRouteCrossConnectionsClientBeginListArpTableOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTable // method. type ExpressRouteCrossConnectionsClientBeginListRoutesTableOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.BeginListRoutesTableSummary // method. type ExpressRouteCrossConnectionsClientBeginListRoutesTableSummaryOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteCrossConnectionsClientGetOptions contains the optional parameters for the ExpressRouteCrossConnectionsClient.Get @@ -6809,14 +5157,6 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. -func (e ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteGateway - ExpressRoute gateway resource. type ExpressRouteGateway struct { // Resource ID. @@ -6841,32 +5181,12 @@ type ExpressRouteGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGateway. -func (e ExpressRouteGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRouteGatewayList - List of ExpressRoute gateways. type ExpressRouteGatewayList struct { // List of ExpressRoute gateways. Value []*ExpressRouteGateway `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayList. -func (e ExpressRouteGatewayList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteGatewayProperties - ExpressRoute gateway resource properties. type ExpressRouteGatewayProperties struct { // REQUIRED; The Virtual Hub where the ExpressRoute gateway is or will be deployed. @@ -6882,16 +5202,6 @@ type ExpressRouteGatewayProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayProperties. -func (e ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "autoScaleConfiguration", e.AutoScaleConfiguration) - populate(objectMap, "expressRouteConnections", e.ExpressRouteConnections) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "virtualHub", e.VirtualHub) - return json.Marshal(objectMap) -} - // ExpressRouteGatewayPropertiesAutoScaleConfiguration - Configuration for auto scaling. type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct { // Minimum and maximum number of scale units to deploy. @@ -6910,19 +5220,22 @@ type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct { // ExpressRouteGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginCreateOrUpdate // method. type ExpressRouteGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteGatewaysClientBeginDeleteOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginDelete // method. type ExpressRouteGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the ExpressRouteGatewaysClient.BeginUpdateTags // method. type ExpressRouteGatewaysClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRouteGatewaysClientGetOptions contains the optional parameters for the ExpressRouteGatewaysClient.Get method. @@ -6966,14 +5279,6 @@ type ExpressRouteLinkListResult struct { Value []*ExpressRouteLink `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkListResult. -func (e ExpressRouteLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteLinkMacSecConfig - ExpressRouteLink Mac Security Configuration. type ExpressRouteLinkMacSecConfig struct { // Keyvault Secret Identifier URL containing Mac security CAK key. @@ -7053,20 +5358,6 @@ type ExpressRoutePort struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePort. -func (e ExpressRoutePort) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", e.Etag) - populate(objectMap, "id", e.ID) - populate(objectMap, "identity", e.Identity) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRoutePortListResult - Response for ListExpressRoutePorts API service call. type ExpressRoutePortListResult struct { // The URL to get the next set of results. @@ -7076,14 +5367,6 @@ type ExpressRoutePortListResult struct { Value []*ExpressRoutePort `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortListResult. -func (e ExpressRoutePortListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRoutePortPropertiesFormat - Properties specific to ExpressRoutePort resources. type ExpressRoutePortPropertiesFormat struct { // Bandwidth of procured ports in Gbps. @@ -7120,33 +5403,18 @@ type ExpressRoutePortPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortPropertiesFormat. -func (e ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocationDate", e.AllocationDate) - populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) - populate(objectMap, "circuits", e.Circuits) - populate(objectMap, "encapsulation", e.Encapsulation) - populate(objectMap, "etherType", e.EtherType) - populate(objectMap, "links", e.Links) - populate(objectMap, "mtu", e.Mtu) - populate(objectMap, "peeringLocation", e.PeeringLocation) - populate(objectMap, "provisionedBandwidthInGbps", e.ProvisionedBandwidthInGbps) - populate(objectMap, "provisioningState", e.ProvisioningState) - populate(objectMap, "resourceGuid", e.ResourceGUID) - return json.Marshal(objectMap) -} - // ExpressRoutePortsClientBeginCreateOrUpdateOptions contains the optional parameters for the ExpressRoutePortsClient.BeginCreateOrUpdate // method. type ExpressRoutePortsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRoutePortsClientBeginDeleteOptions contains the optional parameters for the ExpressRoutePortsClient.BeginDelete // method. type ExpressRoutePortsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ExpressRoutePortsClientGenerateLOAOptions contains the optional parameters for the ExpressRoutePortsClient.GenerateLOA @@ -7197,18 +5465,6 @@ type ExpressRoutePortsLocation struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocation. -func (e ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRoutePortsLocationBandwidths - Real-time inventory of available ExpressRoute port bandwidths. type ExpressRoutePortsLocationBandwidths struct { // READ-ONLY; Bandwidth descriptive name. @@ -7227,14 +5483,6 @@ type ExpressRoutePortsLocationListResult struct { Value []*ExpressRoutePortsLocation `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationListResult. -func (e ExpressRoutePortsLocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRoutePortsLocationPropertiesFormat - Properties specific to ExpressRoutePorts peering location resources. type ExpressRoutePortsLocationPropertiesFormat struct { // The inventory of available ExpressRoutePort bandwidths. @@ -7250,16 +5498,6 @@ type ExpressRoutePortsLocationPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationPropertiesFormat. -func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "address", e.Address) - populate(objectMap, "availableBandwidths", e.AvailableBandwidths) - populate(objectMap, "contact", e.Contact) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - // ExpressRoutePortsLocationsClientGetOptions contains the optional parameters for the ExpressRoutePortsLocationsClient.Get // method. type ExpressRoutePortsLocationsClientGetOptions struct { @@ -7293,18 +5531,6 @@ type ExpressRouteServiceProvider struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. -func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", e.ID) - populate(objectMap, "location", e.Location) - populate(objectMap, "name", e.Name) - populate(objectMap, "properties", e.Properties) - populate(objectMap, "tags", e.Tags) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - // ExpressRouteServiceProviderBandwidthsOffered - Contains bandwidths offered in ExpressRouteServiceProvider resources. type ExpressRouteServiceProviderBandwidthsOffered struct { // The OfferName. @@ -7323,14 +5549,6 @@ type ExpressRouteServiceProviderListResult struct { Value []*ExpressRouteServiceProvider `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderListResult. -func (e ExpressRouteServiceProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", e.NextLink) - populate(objectMap, "value", e.Value) - return json.Marshal(objectMap) -} - // ExpressRouteServiceProviderPropertiesFormat - Properties of ExpressRouteServiceProvider. type ExpressRouteServiceProviderPropertiesFormat struct { // A list of bandwidths offered. @@ -7343,15 +5561,6 @@ type ExpressRouteServiceProviderPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderPropertiesFormat. -func (e ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bandwidthsOffered", e.BandwidthsOffered) - populate(objectMap, "peeringLocations", e.PeeringLocations) - populate(objectMap, "provisioningState", e.ProvisioningState) - return json.Marshal(objectMap) -} - // ExpressRouteServiceProvidersClientListOptions contains the optional parameters for the ExpressRouteServiceProvidersClient.List // method. type ExpressRouteServiceProvidersClientListOptions struct { @@ -7376,23 +5585,17 @@ type FilterItems struct { Values []*string `json:"values,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FilterItems. -func (f FilterItems) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "field", f.Field) - populate(objectMap, "values", f.Values) - return json.Marshal(objectMap) -} - // FirewallPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPoliciesClient.BeginCreateOrUpdate // method. type FirewallPoliciesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the FirewallPoliciesClient.BeginDelete method. type FirewallPoliciesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FirewallPoliciesClientGetOptions contains the optional parameters for the FirewallPoliciesClient.Get method. @@ -7438,20 +5641,6 @@ type FirewallPolicy struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicy. -func (f FirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "identity", f.Identity) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "tags", f.Tags) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - // FirewallPolicyCertificateAuthority - Trusted Root certificates properties for tls. type FirewallPolicyCertificateAuthority struct { // Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault. @@ -7479,58 +5668,6 @@ type FirewallPolicyFilterRuleCollection struct { Rules []FirewallPolicyRuleClassification `json:"rules,omitempty"` } -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyFilterRuleCollection. -func (f *FirewallPolicyFilterRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, - Name: f.Name, - Priority: f.Priority, - } -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollection. -func (f FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", f.Action) - populate(objectMap, "name", f.Name) - populate(objectMap, "priority", f.Priority) - objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection - populate(objectMap, "rules", f.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollection. -func (f *FirewallPolicyFilterRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, &f.Action) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &f.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, &f.Priority) - delete(rawMsg, key) - case "ruleCollectionType": - err = unpopulate(val, &f.RuleCollectionType) - delete(rawMsg, key) - case "rules": - f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // FirewallPolicyFilterRuleCollectionAction - Properties of the FirewallPolicyFilterRuleCollectionAction. type FirewallPolicyFilterRuleCollectionAction struct { // The type of action. @@ -7621,20 +5758,6 @@ type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications struct { SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. -func (f FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", f.Description) - populate(objectMap, "destinationAddresses", f.DestinationAddresses) - populate(objectMap, "destinationIpGroups", f.DestinationIPGroups) - populate(objectMap, "destinationPorts", f.DestinationPorts) - populate(objectMap, "name", f.Name) - populate(objectMap, "protocol", f.Protocol) - populate(objectMap, "sourceAddresses", f.SourceAddresses) - populate(objectMap, "sourceIpGroups", f.SourceIPGroups) - return json.Marshal(objectMap) -} - // FirewallPolicyIntrusionDetectionConfiguration - The operation for configuring intrusion detection. type FirewallPolicyIntrusionDetectionConfiguration struct { // List of rules for traffic to bypass. @@ -7644,14 +5767,6 @@ type FirewallPolicyIntrusionDetectionConfiguration struct { SignatureOverrides []*FirewallPolicyIntrusionDetectionSignatureSpecification `json:"signatureOverrides,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. -func (f FirewallPolicyIntrusionDetectionConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bypassTrafficSettings", f.BypassTrafficSettings) - populate(objectMap, "signatureOverrides", f.SignatureOverrides) - return json.Marshal(objectMap) -} - // FirewallPolicyIntrusionDetectionSignatureSpecification - Intrusion detection signatures specification states. type FirewallPolicyIntrusionDetectionSignatureSpecification struct { // Signature id. @@ -7670,14 +5785,6 @@ type FirewallPolicyListResult struct { Value []*FirewallPolicy `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyListResult. -func (f FirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - // FirewallPolicyLogAnalyticsResources - Log Analytics Resources for Firewall Policy Insights. type FirewallPolicyLogAnalyticsResources struct { // The default workspace Id for Firewall Policy Insights. @@ -7687,14 +5794,6 @@ type FirewallPolicyLogAnalyticsResources struct { Workspaces []*FirewallPolicyLogAnalyticsWorkspace `json:"workspaces,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsResources. -func (f FirewallPolicyLogAnalyticsResources) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultWorkspaceId", f.DefaultWorkspaceID) - populate(objectMap, "workspaces", f.Workspaces) - return json.Marshal(objectMap) -} - // FirewallPolicyLogAnalyticsWorkspace - Log Analytics Workspace for Firewall Policy Insights. type FirewallPolicyLogAnalyticsWorkspace struct { // Region to configure the Workspace. @@ -7722,58 +5821,6 @@ type FirewallPolicyNatRuleCollection struct { Rules []FirewallPolicyRuleClassification `json:"rules,omitempty"` } -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyNatRuleCollection. -func (f *FirewallPolicyNatRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return &FirewallPolicyRuleCollection{ - RuleCollectionType: f.RuleCollectionType, - Name: f.Name, - Priority: f.Priority, - } -} - -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollection. -func (f FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", f.Action) - populate(objectMap, "name", f.Name) - populate(objectMap, "priority", f.Priority) - objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection - populate(objectMap, "rules", f.Rules) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollection. -func (f *FirewallPolicyNatRuleCollection) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "action": - err = unpopulate(val, &f.Action) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &f.Name) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, &f.Priority) - delete(rawMsg, key) - case "ruleCollectionType": - err = unpopulate(val, &f.RuleCollectionType) - delete(rawMsg, key) - case "rules": - f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // FirewallPolicyNatRuleCollectionAction - Properties of the FirewallPolicyNatRuleCollectionAction. type FirewallPolicyNatRuleCollectionAction struct { // The type of action. @@ -7828,27 +5875,6 @@ type FirewallPolicyPropertiesFormat struct { RuleCollectionGroups []*SubResource `json:"ruleCollectionGroups,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyPropertiesFormat. -func (f FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "basePolicy", f.BasePolicy) - populate(objectMap, "childPolicies", f.ChildPolicies) - populate(objectMap, "dnsSettings", f.DNSSettings) - populate(objectMap, "explicitProxySettings", f.ExplicitProxySettings) - populate(objectMap, "firewalls", f.Firewalls) - populate(objectMap, "insights", f.Insights) - populate(objectMap, "intrusionDetection", f.IntrusionDetection) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "ruleCollectionGroups", f.RuleCollectionGroups) - populate(objectMap, "sku", f.SKU) - populate(objectMap, "sql", f.SQL) - populate(objectMap, "snat", f.Snat) - populate(objectMap, "threatIntelMode", f.ThreatIntelMode) - populate(objectMap, "threatIntelWhitelist", f.ThreatIntelWhitelist) - populate(objectMap, "transportSecurity", f.TransportSecurity) - return json.Marshal(objectMap) -} - // 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: @@ -7870,9 +5896,6 @@ type FirewallPolicyRule struct { Name *string `json:"name,omitempty"` } -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type FirewallPolicyRule. -func (f *FirewallPolicyRule) GetFirewallPolicyRule() *FirewallPolicyRule { return f } - // FirewallPolicyRuleApplicationProtocol - Properties of the application rule protocol. type FirewallPolicyRuleApplicationProtocol struct { // Port number for the protocol, cannot be greater than 64000. @@ -7903,11 +5926,6 @@ type FirewallPolicyRuleCollection struct { Priority *int32 `json:"priority,omitempty"` } -// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyRuleCollection. -func (f *FirewallPolicyRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { - return f -} - // FirewallPolicyRuleCollectionGroup - Rule Collection Group resource. type FirewallPolicyRuleCollectionGroup struct { // Resource ID. @@ -7935,14 +5953,6 @@ type FirewallPolicyRuleCollectionGroupListResult struct { Value []*FirewallPolicyRuleCollectionGroup `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupListResult. -func (f FirewallPolicyRuleCollectionGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - // FirewallPolicyRuleCollectionGroupProperties - Properties of the rule collection group. type FirewallPolicyRuleCollectionGroupProperties struct { // Priority of the Firewall Policy Rule Collection Group resource. @@ -7955,51 +5965,18 @@ type FirewallPolicyRuleCollectionGroupProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupProperties. -func (f FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "priority", f.Priority) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "ruleCollections", f.RuleCollections) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupProperties. -func (f *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "priority": - err = unpopulate(val, &f.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, &f.ProvisioningState) - delete(rawMsg, key) - case "ruleCollections": - f.RuleCollections, err = unmarshalFirewallPolicyRuleCollectionClassificationArray(val) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginCreateOrUpdate // method. type FirewallPolicyRuleCollectionGroupsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.BeginDelete // method. type FirewallPolicyRuleCollectionGroupsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FirewallPolicyRuleCollectionGroupsClientGetOptions contains the optional parameters for the FirewallPolicyRuleCollectionGroupsClient.Get @@ -8026,13 +6003,6 @@ type FirewallPolicySNAT struct { PrivateRanges []*string `json:"privateRanges,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySNAT. -func (f FirewallPolicySNAT) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateRanges", f.PrivateRanges) - return json.Marshal(objectMap) -} - // FirewallPolicySQL - SQL Settings in Firewall Policy. type FirewallPolicySQL struct { // A flag to indicate if SQL Redirect traffic filtering is enabled. Turning on the flag requires no rule using port 11000-11999. @@ -8048,14 +6018,6 @@ type FirewallPolicyThreatIntelWhitelist struct { IPAddresses []*string `json:"ipAddresses,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyThreatIntelWhitelist. -func (f FirewallPolicyThreatIntelWhitelist) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdns", f.Fqdns) - populate(objectMap, "ipAddresses", f.IPAddresses) - return json.Marshal(objectMap) -} - // FirewallPolicyTransportSecurity - Configuration needed to perform TLS termination & initiation. type FirewallPolicyTransportSecurity struct { // The CA used for intermediate CA generation. @@ -8086,19 +6048,6 @@ type FlowLog struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FlowLog. -func (f FlowLog) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "location", f.Location) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "tags", f.Tags) - populate(objectMap, "type", f.Type) - return json.Marshal(objectMap) -} - // FlowLogFormatParameters - Parameters that define the flow log format. type FlowLogFormatParameters struct { // The file type of flow log. @@ -8129,14 +6078,6 @@ type FlowLogListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FlowLogListResult. -func (f FlowLogListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", f.NextLink) - populate(objectMap, "value", f.Value) - return json.Marshal(objectMap) -} - // FlowLogProperties - Parameters that define the configuration of flow log. type FlowLogProperties struct { // REQUIRED; Flag to enable/disable flow logging. @@ -8187,12 +6128,14 @@ type FlowLogStatusParameters struct { // FlowLogsClientBeginCreateOrUpdateOptions contains the optional parameters for the FlowLogsClient.BeginCreateOrUpdate method. type FlowLogsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FlowLogsClientBeginDeleteOptions contains the optional parameters for the FlowLogsClient.BeginDelete method. type FlowLogsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // FlowLogsClientGetOptions contains the optional parameters for the FlowLogsClient.Get method. @@ -8232,18 +6175,6 @@ type FrontendIPConfiguration struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfiguration. -func (f FrontendIPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", f.Etag) - populate(objectMap, "id", f.ID) - populate(objectMap, "name", f.Name) - populate(objectMap, "properties", f.Properties) - populate(objectMap, "type", f.Type) - populate(objectMap, "zones", f.Zones) - return json.Marshal(objectMap) -} - // FrontendIPConfigurationPropertiesFormat - Properties of Frontend IP Configuration of the load balancer. type FrontendIPConfigurationPropertiesFormat struct { // The reference to gateway load balancer frontend IP. @@ -8283,24 +6214,6 @@ type FrontendIPConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfigurationPropertiesFormat. -func (f FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "gatewayLoadBalancer", f.GatewayLoadBalancer) - populate(objectMap, "inboundNatPools", f.InboundNatPools) - populate(objectMap, "inboundNatRules", f.InboundNatRules) - populate(objectMap, "loadBalancingRules", f.LoadBalancingRules) - populate(objectMap, "outboundRules", f.OutboundRules) - populate(objectMap, "privateIPAddress", f.PrivateIPAddress) - populate(objectMap, "privateIPAddressVersion", f.PrivateIPAddressVersion) - populate(objectMap, "privateIPAllocationMethod", f.PrivateIPAllocationMethod) - populate(objectMap, "provisioningState", f.ProvisioningState) - populate(objectMap, "publicIPAddress", f.PublicIPAddress) - populate(objectMap, "publicIPPrefix", f.PublicIPPrefix) - populate(objectMap, "subnet", f.Subnet) - return json.Marshal(objectMap) -} - // GatewayLoadBalancerTunnelInterface - Gateway load balancer tunnel interface of a load balancer backend address pool. type GatewayLoadBalancerTunnelInterface struct { // Identifier of gateway load balancer tunnel interface. @@ -8346,13 +6259,6 @@ type GatewayRouteListResult struct { Value []*GatewayRoute `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type GatewayRouteListResult. -func (g GatewayRouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - // GenerateExpressRoutePortsLOARequest - The customer name to be printed on a letter of authorization. type GenerateExpressRoutePortsLOARequest struct { // REQUIRED; The customer name. @@ -8374,14 +6280,6 @@ type GetVPNSitesConfigurationRequest struct { VPNSites []*string `json:"vpnSites,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type GetVPNSitesConfigurationRequest. -func (g GetVPNSitesConfigurationRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "outputBlobSasUrl", g.OutputBlobSasURL) - populate(objectMap, "vpnSites", g.VPNSites) - return json.Marshal(objectMap) -} - // HTTPConfiguration - HTTP configuration of the connectivity check. type HTTPConfiguration struct { // List of HTTP headers. @@ -8394,15 +6292,6 @@ type HTTPConfiguration struct { ValidStatusCodes []*int32 `json:"validStatusCodes,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type HTTPConfiguration. -func (h HTTPConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "headers", h.Headers) - populate(objectMap, "method", h.Method) - populate(objectMap, "validStatusCodes", h.ValidStatusCodes) - return json.Marshal(objectMap) -} - // HTTPHeader - The HTTP header. type HTTPHeader struct { // The name in HTTP header. @@ -8433,18 +6322,6 @@ type HopLink struct { ResourceID *string `json:"resourceId,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type HopLink. -func (h HopLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "context", h.Context) - populate(objectMap, "issues", h.Issues) - populate(objectMap, "linkType", h.LinkType) - populate(objectMap, "nextHopId", h.NextHopID) - populate(objectMap, "properties", h.Properties) - populate(objectMap, "resourceId", h.ResourceID) - return json.Marshal(objectMap) -} - // HopLinkProperties - Hop link properties. type HopLinkProperties struct { // READ-ONLY; Average roundtrip time in milliseconds. @@ -8511,14 +6388,6 @@ type HubPublicIPAddresses struct { Count *int32 `json:"count,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type HubPublicIPAddresses. -func (h HubPublicIPAddresses) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addresses", h.Addresses) - populate(objectMap, "count", h.Count) - return json.Marshal(objectMap) -} - // HubRoute - RouteTable route. type HubRoute struct { // REQUIRED; The type of destinations (eg: CIDR, ResourceId, Service). @@ -8537,17 +6406,6 @@ type HubRoute struct { NextHopType *string `json:"nextHopType,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type HubRoute. -func (h HubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationType", h.DestinationType) - populate(objectMap, "destinations", h.Destinations) - populate(objectMap, "name", h.Name) - populate(objectMap, "nextHop", h.NextHop) - populate(objectMap, "nextHopType", h.NextHopType) - return json.Marshal(objectMap) -} - // HubRouteTable - RouteTable resource in a virtual hub. type HubRouteTable struct { // Resource ID. @@ -8584,26 +6442,17 @@ type HubRouteTableProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type HubRouteTableProperties. -func (h HubRouteTableProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associatedConnections", h.AssociatedConnections) - populate(objectMap, "labels", h.Labels) - populate(objectMap, "propagatingConnections", h.PropagatingConnections) - populate(objectMap, "provisioningState", h.ProvisioningState) - populate(objectMap, "routes", h.Routes) - return json.Marshal(objectMap) -} - // HubRouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the HubRouteTablesClient.BeginCreateOrUpdate // method. type HubRouteTablesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // HubRouteTablesClientBeginDeleteOptions contains the optional parameters for the HubRouteTablesClient.BeginDelete method. type HubRouteTablesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // HubRouteTablesClientGetOptions contains the optional parameters for the HubRouteTablesClient.Get method. @@ -8655,13 +6504,15 @@ type HubVirtualNetworkConnectionProperties struct { // HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginCreateOrUpdate // method. type HubVirtualNetworkConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // HubVirtualNetworkConnectionsClientBeginDeleteOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.BeginDelete // method. type HubVirtualNetworkConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // HubVirtualNetworkConnectionsClientGetOptions contains the optional parameters for the HubVirtualNetworkConnectionsClient.Get @@ -8694,17 +6545,6 @@ type IDPSQueryObject struct { Skip *int32 `json:"skip,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type IDPSQueryObject. -func (i IDPSQueryObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filters", i.Filters) - populate(objectMap, "orderBy", i.OrderBy) - populate(objectMap, "resultsPerPage", i.ResultsPerPage) - populate(objectMap, "search", i.Search) - populate(objectMap, "skip", i.Skip) - return json.Marshal(objectMap) -} - // IPAddressAvailabilityResult - Response for CheckIPAddressAvailability API service call. type IPAddressAvailabilityResult struct { // Private IP address availability. @@ -8717,15 +6557,6 @@ type IPAddressAvailabilityResult struct { IsPlatformReserved *bool `json:"isPlatformReserved,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type IPAddressAvailabilityResult. -func (i IPAddressAvailabilityResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "available", i.Available) - populate(objectMap, "availableIPAddresses", i.AvailableIPAddresses) - populate(objectMap, "isPlatformReserved", i.IsPlatformReserved) - return json.Marshal(objectMap) -} - // IPAllocation - IpAllocation resource. type IPAllocation struct { // Resource ID. @@ -8750,19 +6581,6 @@ type IPAllocation struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IPAllocation. -func (i IPAllocation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - // IPAllocationListResult - Response for the ListIpAllocations API service call. type IPAllocationListResult struct { // The URL to get the next set of results. @@ -8772,14 +6590,6 @@ type IPAllocationListResult struct { Value []*IPAllocation `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type IPAllocationListResult. -func (i IPAllocationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // IPAllocationPropertiesFormat - Properties of the IpAllocation. type IPAllocationPropertiesFormat struct { // IpAllocation tags. @@ -8807,29 +6617,17 @@ type IPAllocationPropertiesFormat struct { VirtualNetwork *SubResource `json:"virtualNetwork,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IPAllocationPropertiesFormat. -func (i IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocationTags", i.AllocationTags) - populate(objectMap, "ipamAllocationId", i.IpamAllocationID) - populate(objectMap, "prefix", i.Prefix) - populate(objectMap, "prefixLength", i.PrefixLength) - populate(objectMap, "prefixType", i.PrefixType) - populate(objectMap, "subnet", i.Subnet) - populate(objectMap, "type", i.Type) - populate(objectMap, "virtualNetwork", i.VirtualNetwork) - return json.Marshal(objectMap) -} - // IPAllocationsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPAllocationsClient.BeginCreateOrUpdate // method. type IPAllocationsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // IPAllocationsClientBeginDeleteOptions contains the optional parameters for the IPAllocationsClient.BeginDelete method. type IPAllocationsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // IPAllocationsClientGetOptions contains the optional parameters for the IPAllocationsClient.Get method. @@ -8884,16 +6682,6 @@ type IPConfigurationBgpPeeringAddress struct { TunnelIPAddresses []*string `json:"tunnelIpAddresses,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IPConfigurationBgpPeeringAddress. -func (i IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customBgpIpAddresses", i.CustomBgpIPAddresses) - populate(objectMap, "defaultBgpIpAddresses", i.DefaultBgpIPAddresses) - populate(objectMap, "ipconfigurationId", i.IPConfigurationID) - populate(objectMap, "tunnelIpAddresses", i.TunnelIPAddresses) - return json.Marshal(objectMap) -} - // IPConfigurationProfile - IP configuration profile child resource. type IPConfigurationProfile struct { // Resource ID. @@ -8963,19 +6751,6 @@ type IPGroup struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IPGroup. -func (i IPGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - // IPGroupListResult - Response for the ListIpGroups API service call. type IPGroupListResult struct { // URL to get the next set of results. @@ -8985,14 +6760,6 @@ type IPGroupListResult struct { Value []*IPGroup `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type IPGroupListResult. -func (i IPGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // IPGroupPropertiesFormat - The IpGroups property information. type IPGroupPropertiesFormat struct { // IpAddresses/IpAddressPrefixes in the IpGroups resource. @@ -9008,24 +6775,16 @@ type IPGroupPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IPGroupPropertiesFormat. -func (i IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "firewallPolicies", i.FirewallPolicies) - populate(objectMap, "firewalls", i.Firewalls) - populate(objectMap, "ipAddresses", i.IPAddresses) - populate(objectMap, "provisioningState", i.ProvisioningState) - return json.Marshal(objectMap) -} - // IPGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the IPGroupsClient.BeginCreateOrUpdate method. type IPGroupsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // IPGroupsClientBeginDeleteOptions contains the optional parameters for the IPGroupsClient.BeginDelete method. type IPGroupsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // IPGroupsClientGetOptions contains the optional parameters for the IPGroupsClient.Get method. @@ -9197,14 +6956,6 @@ type InboundNatRuleListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InboundNatRuleListResult. -func (i InboundNatRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // InboundNatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. type InboundNatRulePortMapping struct { // READ-ONLY; Backend port. @@ -9272,12 +7023,14 @@ type InboundNatRulePropertiesFormat struct { // InboundNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundNatRulesClient.BeginCreateOrUpdate // method. type InboundNatRulesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InboundNatRulesClientBeginDeleteOptions contains the optional parameters for the InboundNatRulesClient.BeginDelete method. type InboundNatRulesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InboundNatRulesClientGetOptions contains the optional parameters for the InboundNatRulesClient.Get method. @@ -9312,7 +7065,8 @@ type InboundSecurityRule struct { // InboundSecurityRuleClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundSecurityRuleClient.BeginCreateOrUpdate // method. type InboundSecurityRuleClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InboundSecurityRuleProperties - Properties of the Inbound Security Rules resource. @@ -9324,14 +7078,6 @@ type InboundSecurityRuleProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRuleProperties. -func (i InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "rules", i.Rules) - return json.Marshal(objectMap) -} - // InboundSecurityRules - Properties of the Inbound Security Rules resource. type InboundSecurityRules struct { // NVA port ranges to be opened up. One needs to provide specific ports. @@ -9365,18 +7111,6 @@ type IntentPolicy struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type IntentPolicy. -func (i IntentPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - // IntentPolicyConfiguration - Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. type IntentPolicyConfiguration struct { // The name of the Network Intent Policy for storing in target subscription. @@ -9413,20 +7147,6 @@ type Interface struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type Interface. -func (i Interface) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", i.Etag) - populate(objectMap, "extendedLocation", i.ExtendedLocation) - populate(objectMap, "id", i.ID) - populate(objectMap, "location", i.Location) - populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "tags", i.Tags) - populate(objectMap, "type", i.Type) - return json.Marshal(objectMap) -} - // InterfaceAssociation - Network interface and its custom security rules. type InterfaceAssociation struct { // Collection of custom security rules. @@ -9436,14 +7156,6 @@ type InterfaceAssociation struct { ID *string `json:"id,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceAssociation. -func (i InterfaceAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", i.ID) - populate(objectMap, "securityRules", i.SecurityRules) - return json.Marshal(objectMap) -} - // InterfaceDNSSettings - DNS settings of a network interface. type InterfaceDNSSettings struct { // List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS resolution. 'AzureProvidedDNS' @@ -9468,17 +7180,6 @@ type InterfaceDNSSettings struct { InternalFqdn *string `json:"internalFqdn,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings. -func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "appliedDnsServers", i.AppliedDNSServers) - populate(objectMap, "dnsServers", i.DNSServers) - populate(objectMap, "internalDnsNameLabel", i.InternalDNSNameLabel) - populate(objectMap, "internalDomainNameSuffix", i.InternalDomainNameSuffix) - populate(objectMap, "internalFqdn", i.InternalFqdn) - return json.Marshal(objectMap) -} - // InterfaceIPConfiguration - IPConfiguration in a network interface. type InterfaceIPConfiguration struct { // Resource ID. @@ -9506,14 +7207,6 @@ type InterfaceIPConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationListResult. -func (i InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // InterfaceIPConfigurationPrivateLinkConnectionProperties - PrivateLinkConnection properties for the network interface. type InterfaceIPConfigurationPrivateLinkConnectionProperties struct { // READ-ONLY; List of FQDNs for current private link connection. @@ -9526,15 +7219,6 @@ type InterfaceIPConfigurationPrivateLinkConnectionProperties struct { RequiredMemberName *string `json:"requiredMemberName,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. -func (i InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdns", i.Fqdns) - populate(objectMap, "groupId", i.GroupID) - populate(objectMap, "requiredMemberName", i.RequiredMemberName) - return json.Marshal(objectMap) -} - // InterfaceIPConfigurationPropertiesFormat - Properties of IP configuration. type InterfaceIPConfigurationPropertiesFormat struct { // The reference to ApplicationGatewayBackendAddressPool resource. @@ -9580,26 +7264,6 @@ type InterfaceIPConfigurationPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPropertiesFormat. -func (i InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGatewayBackendAddressPools", i.ApplicationGatewayBackendAddressPools) - populate(objectMap, "applicationSecurityGroups", i.ApplicationSecurityGroups) - populate(objectMap, "gatewayLoadBalancer", i.GatewayLoadBalancer) - populate(objectMap, "loadBalancerBackendAddressPools", i.LoadBalancerBackendAddressPools) - populate(objectMap, "loadBalancerInboundNatRules", i.LoadBalancerInboundNatRules) - populate(objectMap, "primary", i.Primary) - populate(objectMap, "privateIPAddress", i.PrivateIPAddress) - populate(objectMap, "privateIPAddressVersion", i.PrivateIPAddressVersion) - populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) - populate(objectMap, "privateLinkConnectionProperties", i.PrivateLinkConnectionProperties) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "publicIPAddress", i.PublicIPAddress) - populate(objectMap, "subnet", i.Subnet) - populate(objectMap, "virtualNetworkTaps", i.VirtualNetworkTaps) - return json.Marshal(objectMap) -} - // InterfaceIPConfigurationsClientGetOptions contains the optional parameters for the InterfaceIPConfigurationsClient.Get // method. type InterfaceIPConfigurationsClientGetOptions struct { @@ -9621,14 +7285,6 @@ type InterfaceListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceListResult. -func (i InterfaceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // InterfaceLoadBalancerListResult - Response for list ip configurations API service call. type InterfaceLoadBalancerListResult struct { // A list of load balancers. @@ -9638,14 +7294,6 @@ type InterfaceLoadBalancerListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceLoadBalancerListResult. -func (i InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // InterfaceLoadBalancersClientListOptions contains the optional parameters for the InterfaceLoadBalancersClient.List method. type InterfaceLoadBalancersClientListOptions struct { // placeholder for future optional parameters @@ -9711,31 +7359,6 @@ type InterfacePropertiesFormat struct { VnetEncryptionSupported *bool `json:"vnetEncryptionSupported,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfacePropertiesFormat. -func (i InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsSettings", i.DNSSettings) - populate(objectMap, "dscpConfiguration", i.DscpConfiguration) - populate(objectMap, "enableAcceleratedNetworking", i.EnableAcceleratedNetworking) - populate(objectMap, "enableIPForwarding", i.EnableIPForwarding) - populate(objectMap, "hostedWorkloads", i.HostedWorkloads) - populate(objectMap, "ipConfigurations", i.IPConfigurations) - populate(objectMap, "macAddress", i.MacAddress) - populate(objectMap, "migrationPhase", i.MigrationPhase) - populate(objectMap, "networkSecurityGroup", i.NetworkSecurityGroup) - populate(objectMap, "nicType", i.NicType) - populate(objectMap, "primary", i.Primary) - populate(objectMap, "privateEndpoint", i.PrivateEndpoint) - populate(objectMap, "privateLinkService", i.PrivateLinkService) - populate(objectMap, "provisioningState", i.ProvisioningState) - populate(objectMap, "resourceGuid", i.ResourceGUID) - populate(objectMap, "tapConfigurations", i.TapConfigurations) - populate(objectMap, "virtualMachine", i.VirtualMachine) - populate(objectMap, "vnetEncryptionSupported", i.VnetEncryptionSupported) - populate(objectMap, "workloadType", i.WorkloadType) - return json.Marshal(objectMap) -} - // InterfaceTapConfiguration - Tap configuration in a Network Interface. type InterfaceTapConfiguration struct { // Resource ID. @@ -9763,14 +7386,6 @@ type InterfaceTapConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationListResult. -func (i InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) - return json.Marshal(objectMap) -} - // InterfaceTapConfigurationPropertiesFormat - Properties of Virtual Network Tap configuration. type InterfaceTapConfigurationPropertiesFormat struct { // The reference to the Virtual Network Tap resource. @@ -9783,13 +7398,15 @@ type InterfaceTapConfigurationPropertiesFormat struct { // InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginCreateOrUpdate // method. type InterfaceTapConfigurationsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfaceTapConfigurationsClientBeginDeleteOptions contains the optional parameters for the InterfaceTapConfigurationsClient.BeginDelete // method. type InterfaceTapConfigurationsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfaceTapConfigurationsClientGetOptions contains the optional parameters for the InterfaceTapConfigurationsClient.Get @@ -9807,24 +7424,28 @@ type InterfaceTapConfigurationsClientListOptions struct { // InterfacesClientBeginCreateOrUpdateOptions contains the optional parameters for the InterfacesClient.BeginCreateOrUpdate // method. type InterfacesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfacesClientBeginDeleteOptions contains the optional parameters for the InterfacesClient.BeginDelete method. type InterfacesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfacesClientBeginGetEffectiveRouteTableOptions contains the optional parameters for the InterfacesClient.BeginGetEffectiveRouteTable // method. type InterfacesClientBeginGetEffectiveRouteTableOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions contains the optional parameters for the InterfacesClient.BeginListEffectiveNetworkSecurityGroups // method. type InterfacesClientBeginListEffectiveNetworkSecurityGroupsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // InterfacesClientGetCloudServiceNetworkInterfaceOptions contains the optional parameters for the InterfacesClient.GetCloudServiceNetworkInterface @@ -9909,14 +7530,6 @@ type ListHubRouteTablesResult struct { Value []*HubRouteTable `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListHubRouteTablesResult. -func (l ListHubRouteTablesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListHubVirtualNetworkConnectionsResult - List of HubVirtualNetworkConnections and a URL nextLink to get the next set of // results. type ListHubVirtualNetworkConnectionsResult struct { @@ -9927,14 +7540,6 @@ type ListHubVirtualNetworkConnectionsResult struct { Value []*HubVirtualNetworkConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListHubVirtualNetworkConnectionsResult. -func (l ListHubVirtualNetworkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListP2SVPNGatewaysResult - Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL // nextLink to get the next set of results. type ListP2SVPNGatewaysResult struct { @@ -9945,14 +7550,6 @@ type ListP2SVPNGatewaysResult struct { Value []*P2SVPNGateway `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListP2SVPNGatewaysResult. -func (l ListP2SVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListRoutingIntentResult - List of the routing intent result and a URL nextLink to get the next set of results. type ListRoutingIntentResult struct { // URL to get the next set of operation list results if there are any. @@ -9962,14 +7559,6 @@ type ListRoutingIntentResult struct { Value []*RoutingIntent `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListRoutingIntentResult. -func (l ListRoutingIntentResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNConnectionsResult - 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. type ListVPNConnectionsResult struct { @@ -9980,14 +7569,6 @@ type ListVPNConnectionsResult struct { Value []*VPNConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNConnectionsResult. -func (l ListVPNConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNGatewayNatRulesResult - 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. type ListVPNGatewayNatRulesResult struct { @@ -9998,14 +7579,6 @@ type ListVPNGatewayNatRulesResult struct { Value []*VPNGatewayNatRule `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewayNatRulesResult. -func (l ListVPNGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNGatewaysResult - Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink // to get the next set of results. type ListVPNGatewaysResult struct { @@ -10016,14 +7589,6 @@ type ListVPNGatewaysResult struct { Value []*VPNGateway `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewaysResult. -func (l ListVPNGatewaysResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNServerConfigurationsResult - 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. type ListVPNServerConfigurationsResult struct { @@ -10034,14 +7599,6 @@ type ListVPNServerConfigurationsResult struct { Value []*VPNServerConfiguration `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationsResult. -func (l ListVPNServerConfigurationsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNSiteLinkConnectionsResult - 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. type ListVPNSiteLinkConnectionsResult struct { @@ -10052,14 +7609,6 @@ type ListVPNSiteLinkConnectionsResult struct { Value []*VPNSiteLinkConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinkConnectionsResult. -func (l ListVPNSiteLinkConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNSiteLinksResult - Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink // to get the next set of results. type ListVPNSiteLinksResult struct { @@ -10070,14 +7619,6 @@ type ListVPNSiteLinksResult struct { Value []*VPNSiteLink `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinksResult. -func (l ListVPNSiteLinksResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVPNSitesResult - Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the // next set of results. type ListVPNSitesResult struct { @@ -10088,14 +7629,6 @@ type ListVPNSitesResult struct { Value []*VPNSite `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVPNSitesResult. -func (l ListVPNSitesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualHubBgpConnectionResults - VirtualHubBgpConnections list. type ListVirtualHubBgpConnectionResults struct { // URL to get the next set of results. @@ -10105,14 +7638,6 @@ type ListVirtualHubBgpConnectionResults struct { Value []*BgpConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubBgpConnectionResults. -func (l ListVirtualHubBgpConnectionResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualHubIPConfigurationResults - VirtualHubIpConfigurations list. type ListVirtualHubIPConfigurationResults struct { // URL to get the next set of results. @@ -10122,14 +7647,6 @@ type ListVirtualHubIPConfigurationResults struct { Value []*HubIPConfiguration `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubIPConfigurationResults. -func (l ListVirtualHubIPConfigurationResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualHubRouteTableV2SResult - List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. type ListVirtualHubRouteTableV2SResult struct { // URL to get the next set of operation list results if there are any. @@ -10139,14 +7656,6 @@ type ListVirtualHubRouteTableV2SResult struct { Value []*VirtualHubRouteTableV2 `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubRouteTableV2SResult. -func (l ListVirtualHubRouteTableV2SResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualHubsResult - Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink // to get the next set of results. type ListVirtualHubsResult struct { @@ -10157,14 +7666,6 @@ type ListVirtualHubsResult struct { Value []*VirtualHub `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubsResult. -func (l ListVirtualHubsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualNetworkGatewayNatRulesResult - 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. type ListVirtualNetworkGatewayNatRulesResult struct { @@ -10175,14 +7676,6 @@ type ListVirtualNetworkGatewayNatRulesResult struct { Value []*VirtualNetworkGatewayNatRule `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualNetworkGatewayNatRulesResult. -func (l ListVirtualNetworkGatewayNatRulesResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // ListVirtualWANsResult - Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink // to get the next set of results. type ListVirtualWANsResult struct { @@ -10193,14 +7686,6 @@ type ListVirtualWANsResult struct { Value []*VirtualWAN `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ListVirtualWANsResult. -func (l ListVirtualWANsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancer resource. type LoadBalancer struct { // The extended location of the load balancer. @@ -10231,21 +7716,6 @@ type LoadBalancer struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancer. -func (l LoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "extendedLocation", l.ExtendedLocation) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "sku", l.SKU) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - // LoadBalancerBackendAddress - Load balancer backend addresses. type LoadBalancerBackendAddress struct { // Name of the backend address. @@ -10264,24 +7734,18 @@ type LoadBalancerBackendAddressPoolListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPoolListResult. -func (l LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginCreateOrUpdate // method. type LoadBalancerBackendAddressPoolsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancerBackendAddressPoolsClientBeginDeleteOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.BeginDelete // method. type LoadBalancerBackendAddressPoolsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancerBackendAddressPoolsClientGetOptions contains the optional parameters for the LoadBalancerBackendAddressPoolsClient.Get @@ -10317,18 +7781,6 @@ type LoadBalancerBackendAddressPropertiesFormat struct { NetworkInterfaceIPConfiguration *SubResource `json:"networkInterfaceIPConfiguration,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPropertiesFormat. -func (l LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipAddress", l.IPAddress) - populate(objectMap, "inboundNatRulesPortMapping", l.InboundNatRulesPortMapping) - populate(objectMap, "loadBalancerFrontendIPConfiguration", l.LoadBalancerFrontendIPConfiguration) - populate(objectMap, "networkInterfaceIPConfiguration", l.NetworkInterfaceIPConfiguration) - populate(objectMap, "subnet", l.Subnet) - populate(objectMap, "virtualNetwork", l.VirtualNetwork) - return json.Marshal(objectMap) -} - // LoadBalancerFrontendIPConfigurationListResult - Response for ListFrontendIPConfiguration API service call. type LoadBalancerFrontendIPConfigurationListResult struct { // A list of frontend IP configurations in a load balancer. @@ -10338,14 +7790,6 @@ type LoadBalancerFrontendIPConfigurationListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationListResult. -func (l LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerFrontendIPConfigurationsClientGetOptions contains the optional parameters for the LoadBalancerFrontendIPConfigurationsClient.Get // method. type LoadBalancerFrontendIPConfigurationsClientGetOptions struct { @@ -10367,14 +7811,6 @@ type LoadBalancerListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. -func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerLoadBalancingRuleListResult - Response for ListLoadBalancingRule API service call. type LoadBalancerLoadBalancingRuleListResult struct { // A list of load balancing rules in a load balancer. @@ -10384,14 +7820,6 @@ type LoadBalancerLoadBalancingRuleListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerLoadBalancingRuleListResult. -func (l LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerLoadBalancingRulesClientGetOptions contains the optional parameters for the LoadBalancerLoadBalancingRulesClient.Get // method. type LoadBalancerLoadBalancingRulesClientGetOptions struct { @@ -10419,14 +7847,6 @@ type LoadBalancerOutboundRuleListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerOutboundRuleListResult. -func (l LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerOutboundRulesClientGetOptions contains the optional parameters for the LoadBalancerOutboundRulesClient.Get // method. type LoadBalancerOutboundRulesClientGetOptions struct { @@ -10448,14 +7868,6 @@ type LoadBalancerProbeListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerProbeListResult. -func (l LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LoadBalancerProbesClientGetOptions contains the optional parameters for the LoadBalancerProbesClient.Get method. type LoadBalancerProbesClientGetOptions struct { // placeholder for future optional parameters @@ -10504,21 +7916,6 @@ type LoadBalancerPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerPropertiesFormat. -func (l LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPools", l.BackendAddressPools) - populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) - populate(objectMap, "inboundNatPools", l.InboundNatPools) - populate(objectMap, "inboundNatRules", l.InboundNatRules) - populate(objectMap, "loadBalancingRules", l.LoadBalancingRules) - populate(objectMap, "outboundRules", l.OutboundRules) - populate(objectMap, "probes", l.Probes) - populate(objectMap, "provisioningState", l.ProvisioningState) - populate(objectMap, "resourceGuid", l.ResourceGUID) - return json.Marshal(objectMap) -} - // LoadBalancerSKU - SKU of a load balancer. type LoadBalancerSKU struct { // Name of a load balancer SKU. @@ -10534,13 +7931,6 @@ type LoadBalancerVipSwapRequest struct { FrontendIPConfigurations []*LoadBalancerVipSwapRequestFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequest. -func (l LoadBalancerVipSwapRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) - return json.Marshal(objectMap) -} - // LoadBalancerVipSwapRequestFrontendIPConfiguration - VIP swap request's frontend IP configuration object. type LoadBalancerVipSwapRequestFrontendIPConfiguration struct { // The ID of frontend IP configuration resource. @@ -10560,24 +7950,28 @@ type LoadBalancerVipSwapRequestFrontendIPConfigurationProperties struct { // LoadBalancersClientBeginCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.BeginCreateOrUpdate // method. type LoadBalancersClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. type LoadBalancersClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancersClientBeginListInboundNatRulePortMappingsOptions contains the optional parameters for the LoadBalancersClient.BeginListInboundNatRulePortMappings // method. type LoadBalancersClientBeginListInboundNatRulePortMappingsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancersClientBeginSwapPublicIPAddressesOptions contains the optional parameters for the LoadBalancersClient.BeginSwapPublicIPAddresses // method. type LoadBalancersClientBeginSwapPublicIPAddressesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. @@ -10669,25 +8063,6 @@ type LoadBalancingRulePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRulePropertiesFormat. -func (l LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "backendAddressPool", l.BackendAddressPool) - populate(objectMap, "backendAddressPools", l.BackendAddressPools) - populate(objectMap, "backendPort", l.BackendPort) - populate(objectMap, "disableOutboundSnat", l.DisableOutboundSnat) - populate(objectMap, "enableFloatingIP", l.EnableFloatingIP) - populate(objectMap, "enableTcpReset", l.EnableTCPReset) - populate(objectMap, "frontendIPConfiguration", l.FrontendIPConfiguration) - populate(objectMap, "frontendPort", l.FrontendPort) - populate(objectMap, "idleTimeoutInMinutes", l.IdleTimeoutInMinutes) - populate(objectMap, "loadDistribution", l.LoadDistribution) - populate(objectMap, "probe", l.Probe) - populate(objectMap, "protocol", l.Protocol) - populate(objectMap, "provisioningState", l.ProvisioningState) - return json.Marshal(objectMap) -} - // LocalNetworkGateway - A common class for general resource information. type LocalNetworkGateway struct { // REQUIRED; Properties of the local network gateway. @@ -10712,19 +8087,6 @@ type LocalNetworkGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGateway. -func (l LocalNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", l.Etag) - populate(objectMap, "id", l.ID) - populate(objectMap, "location", l.Location) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "tags", l.Tags) - populate(objectMap, "type", l.Type) - return json.Marshal(objectMap) -} - // LocalNetworkGatewayListResult - Response for ListLocalNetworkGateways API service call. type LocalNetworkGatewayListResult struct { // A list of local network gateways that exists in a resource group. @@ -10734,14 +8096,6 @@ type LocalNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayListResult. -func (l LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) - return json.Marshal(objectMap) -} - // LocalNetworkGatewayPropertiesFormat - LocalNetworkGateway properties. type LocalNetworkGatewayPropertiesFormat struct { // Local network gateway's BGP speaker settings. @@ -10766,13 +8120,15 @@ type LocalNetworkGatewayPropertiesFormat struct { // LocalNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginCreateOrUpdate // method. type LocalNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LocalNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the LocalNetworkGatewaysClient.BeginDelete // method. type LocalNetworkGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // LocalNetworkGatewaysClientGetOptions contains the optional parameters for the LocalNetworkGatewaysClient.Get method. @@ -10812,14 +8168,6 @@ type ManagedRuleGroupOverride struct { Rules []*ManagedRuleOverride `json:"rules,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. -func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupName", m.RuleGroupName) - populate(objectMap, "rules", m.Rules) - return json.Marshal(objectMap) -} - // ManagedRuleOverride - Defines a managed rule group override setting. type ManagedRuleOverride struct { // REQUIRED; Identifier for the managed rule. @@ -10841,15 +8189,6 @@ type ManagedRuleSet struct { RuleGroupOverrides []*ManagedRuleGroupOverride `json:"ruleGroupOverrides,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. -func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) - populate(objectMap, "ruleSetType", m.RuleSetType) - populate(objectMap, "ruleSetVersion", m.RuleSetVersion) - return json.Marshal(objectMap) -} - // ManagedRulesDefinition - Allow to exclude some variable satisfy the condition for the WAF check. type ManagedRulesDefinition struct { // REQUIRED; The managed rule sets that are associated with the policy. @@ -10859,14 +8198,6 @@ type ManagedRulesDefinition struct { Exclusions []*OwaspCrsExclusionEntry `json:"exclusions,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ManagedRulesDefinition. -func (m ManagedRulesDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclusions", m.Exclusions) - populate(objectMap, "managedRuleSets", m.ManagedRuleSets) - return json.Marshal(objectMap) -} - // ManagedServiceIdentity - Identity for the resource. type ManagedServiceIdentity struct { // The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created @@ -10887,38 +8218,32 @@ type ManagedServiceIdentity struct { TenantID *string `json:"tenantId,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. -func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - // ManagementClientBeginDeleteBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginDeleteBastionShareableLink // method. type ManagementClientBeginDeleteBastionShareableLinkOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions contains the optional parameters for the // ManagementClient.BeginGeneratevirtualwanvpnserverconfigurationvpnprofile method. type ManagementClientBeginGeneratevirtualwanvpnserverconfigurationvpnprofileOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ManagementClientBeginGetActiveSessionsOptions contains the optional parameters for the ManagementClient.BeginGetActiveSessions // method. type ManagementClientBeginGetActiveSessionsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ManagementClientBeginPutBastionShareableLinkOptions contains the optional parameters for the ManagementClient.BeginPutBastionShareableLink // method. type ManagementClientBeginPutBastionShareableLinkOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ManagementClientCheckDNSNameAvailabilityOptions contains the optional parameters for the ManagementClient.CheckDNSNameAvailability @@ -10963,17 +8288,6 @@ type MatchCondition struct { Transforms []*WebApplicationFirewallTransform `json:"transforms,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type MatchCondition. -func (m MatchCondition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "matchValues", m.MatchValues) - populate(objectMap, "matchVariables", m.MatchVariables) - populate(objectMap, "negationConditon", m.NegationConditon) - populate(objectMap, "operator", m.Operator) - populate(objectMap, "transforms", m.Transforms) - return json.Marshal(objectMap) -} - // MatchVariable - Define match variables. type MatchVariable struct { // REQUIRED; Match Variable. @@ -11037,26 +8351,6 @@ type MetricSpecification struct { Unit *string `json:"unit,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. -func (m MetricSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aggregationType", m.AggregationType) - populate(objectMap, "availabilities", m.Availabilities) - populate(objectMap, "dimensions", m.Dimensions) - populate(objectMap, "displayDescription", m.DisplayDescription) - populate(objectMap, "displayName", m.DisplayName) - populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) - populate(objectMap, "fillGapWithZero", m.FillGapWithZero) - populate(objectMap, "isInternal", m.IsInternal) - populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) - populate(objectMap, "name", m.Name) - populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) - populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) - populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) - populate(objectMap, "unit", m.Unit) - return json.Marshal(objectMap) -} - // NatGateway - Nat Gateway resource. type NatGateway struct { // Resource ID. @@ -11087,21 +8381,6 @@ type NatGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type NatGateway. -func (n NatGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", n.Etag) - populate(objectMap, "id", n.ID) - populate(objectMap, "location", n.Location) - populate(objectMap, "name", n.Name) - populate(objectMap, "properties", n.Properties) - populate(objectMap, "sku", n.SKU) - populate(objectMap, "tags", n.Tags) - populate(objectMap, "type", n.Type) - populate(objectMap, "zones", n.Zones) - return json.Marshal(objectMap) -} - // NatGatewayListResult - Response for ListNatGateways API service call. type NatGatewayListResult struct { // The URL to get the next set of results. @@ -11111,14 +8390,6 @@ type NatGatewayListResult struct { Value []*NatGateway `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type NatGatewayListResult. -func (n NatGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) - return json.Marshal(objectMap) -} - // NatGatewayPropertiesFormat - Nat Gateway properties. type NatGatewayPropertiesFormat struct { // The idle timeout of the nat gateway. @@ -11140,18 +8411,6 @@ type NatGatewayPropertiesFormat struct { Subnets []*SubResource `json:"subnets,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type NatGatewayPropertiesFormat. -func (n NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "idleTimeoutInMinutes", n.IdleTimeoutInMinutes) - populate(objectMap, "provisioningState", n.ProvisioningState) - populate(objectMap, "publicIpAddresses", n.PublicIPAddresses) - populate(objectMap, "publicIpPrefixes", n.PublicIPPrefixes) - populate(objectMap, "resourceGuid", n.ResourceGUID) - populate(objectMap, "subnets", n.Subnets) - return json.Marshal(objectMap) -} - // NatGatewaySKU - SKU of nat gateway. type NatGatewaySKU struct { // Name of Nat Gateway SKU. @@ -11161,12 +8420,14 @@ type NatGatewaySKU struct { // NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate // method. type NatGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. type NatGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // NatGatewaysClientGetOptions contains the optional parameters for the NatGatewaysClient.Get method. @@ -11226,82 +8487,6 @@ type NatRule struct { TranslatedPort *string `json:"translatedPort,omitempty"` } -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type NatRule. -func (n *NatRule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: n.Name, - Description: n.Description, - RuleType: n.RuleType, - } -} - -// MarshalJSON implements the json.Marshaller interface for type NatRule. -func (n NatRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", n.Description) - populate(objectMap, "destinationAddresses", n.DestinationAddresses) - populate(objectMap, "destinationPorts", n.DestinationPorts) - populate(objectMap, "ipProtocols", n.IPProtocols) - populate(objectMap, "name", n.Name) - objectMap["ruleType"] = FirewallPolicyRuleTypeNatRule - populate(objectMap, "sourceAddresses", n.SourceAddresses) - populate(objectMap, "sourceIpGroups", n.SourceIPGroups) - populate(objectMap, "translatedAddress", n.TranslatedAddress) - populate(objectMap, "translatedFqdn", n.TranslatedFqdn) - populate(objectMap, "translatedPort", n.TranslatedPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NatRule. -func (n *NatRule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, &n.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, &n.DestinationAddresses) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, &n.DestinationPorts) - delete(rawMsg, key) - case "ipProtocols": - err = unpopulate(val, &n.IPProtocols) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &n.Name) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, &n.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, &n.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, &n.SourceIPGroups) - delete(rawMsg, key) - case "translatedAddress": - err = unpopulate(val, &n.TranslatedAddress) - delete(rawMsg, key) - case "translatedFqdn": - err = unpopulate(val, &n.TranslatedFqdn) - delete(rawMsg, key) - case "translatedPort": - err = unpopulate(val, &n.TranslatedPort) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // NatRulePortMapping - Individual port mappings for inbound NAT rule created for backend pool. type NatRulePortMapping struct { // Backend port. @@ -11316,12 +8501,14 @@ type NatRulePortMapping struct { // NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate method. type NatRulesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. type NatRulesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // NatRulesClientGetOptions contains the optional parameters for the NatRulesClient.Get method. @@ -11428,14 +8615,6 @@ type OperationListResult struct { Value []*Operation `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", o.NextLink) - populate(objectMap, "value", o.Value) - return json.Marshal(objectMap) -} - // OperationPropertiesFormat - Description of operation properties format. type OperationPropertiesFormat struct { // Specification of the service. @@ -11451,14 +8630,6 @@ type OperationPropertiesFormatServiceSpecification struct { MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. -func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "logSpecifications", o.LogSpecifications) - populate(objectMap, "metricSpecifications", o.MetricSpecifications) - return json.Marshal(objectMap) -} - // OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. type OperationsClientListOptions struct { // placeholder for future optional parameters @@ -11517,19 +8688,6 @@ type OutboundRulePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type OutboundRulePropertiesFormat. -func (o OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocatedOutboundPorts", o.AllocatedOutboundPorts) - populate(objectMap, "backendAddressPool", o.BackendAddressPool) - populate(objectMap, "enableTcpReset", o.EnableTCPReset) - populate(objectMap, "frontendIPConfigurations", o.FrontendIPConfigurations) - populate(objectMap, "idleTimeoutInMinutes", o.IdleTimeoutInMinutes) - populate(objectMap, "protocol", o.Protocol) - populate(objectMap, "provisioningState", o.ProvisioningState) - return json.Marshal(objectMap) -} - // OwaspCrsExclusionEntry - Allow to exclude some variable satisfy the condition for the WAF check. type OwaspCrsExclusionEntry struct { // REQUIRED; The variable to be excluded. @@ -11547,16 +8705,6 @@ type OwaspCrsExclusionEntry struct { ExclusionManagedRuleSets []*ExclusionManagedRuleSet `json:"exclusionManagedRuleSets,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type OwaspCrsExclusionEntry. -func (o OwaspCrsExclusionEntry) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "exclusionManagedRuleSets", o.ExclusionManagedRuleSets) - populate(objectMap, "matchVariable", o.MatchVariable) - populate(objectMap, "selector", o.Selector) - populate(objectMap, "selectorMatchOperator", o.SelectorMatchOperator) - return json.Marshal(objectMap) -} - // P2SConnectionConfiguration Resource. type P2SConnectionConfiguration struct { // Resource ID. @@ -11602,27 +8750,12 @@ type P2SVPNConnectionHealthRequest struct { VPNUserNamesFilter []*string `json:"vpnUserNamesFilter,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealthRequest. -func (p P2SVPNConnectionHealthRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "outputBlobSasUrl", p.OutputBlobSasURL) - populate(objectMap, "vpnUserNamesFilter", p.VPNUserNamesFilter) - return json.Marshal(objectMap) -} - // P2SVPNConnectionRequest - List of p2s vpn connections to be disconnected. type P2SVPNConnectionRequest struct { // List of p2s vpn connection Ids. VPNConnectionIDs []*string `json:"vpnConnectionIds,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionRequest. -func (p P2SVPNConnectionRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vpnConnectionIds", p.VPNConnectionIDs) - return json.Marshal(objectMap) -} - // P2SVPNGateway - P2SVpnGateway Resource. type P2SVPNGateway struct { // Resource ID. @@ -11647,19 +8780,6 @@ type P2SVPNGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type P2SVPNGateway. -func (p P2SVPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - // P2SVPNGatewayProperties - Parameters for P2SVpnGateway. type P2SVPNGatewayProperties struct { // List of all customer specified DNS servers IP addresses. @@ -11687,64 +8807,58 @@ type P2SVPNGatewayProperties struct { VPNClientConnectionHealth *VPNClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type P2SVPNGatewayProperties. -func (p P2SVPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customDnsServers", p.CustomDNSServers) - populate(objectMap, "isRoutingPreferenceInternet", p.IsRoutingPreferenceInternet) - populate(objectMap, "p2SConnectionConfigurations", p.P2SConnectionConfigurations) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "vpnClientConnectionHealth", p.VPNClientConnectionHealth) - populate(objectMap, "vpnGatewayScaleUnit", p.VPNGatewayScaleUnit) - populate(objectMap, "vpnServerConfiguration", p.VPNServerConfiguration) - populate(objectMap, "virtualHub", p.VirtualHub) - return json.Marshal(objectMap) -} - // P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate // method. type P2SVPNGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete method. type P2SVPNGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections // method. type P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile // method. type P2SVPNGatewaysClientBeginGenerateVPNProfileOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed // method. type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth // method. type P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset method. type P2SVPNGatewaysClientBeginResetOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags // method. type P2SVPNGatewaysClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // P2SVPNGatewaysClientGetOptions contains the optional parameters for the P2SVPNGatewaysClient.Get method. @@ -11807,13 +8921,6 @@ type PacketCaptureListResult struct { Value []*PacketCaptureResult `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureListResult. -func (p PacketCaptureListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PacketCaptureParameters - Parameters that define the create packet capture operation. type PacketCaptureParameters struct { // REQUIRED; The storage location for a packet capture session. @@ -11835,18 +8942,6 @@ type PacketCaptureParameters struct { TotalBytesPerSession *int64 `json:"totalBytesPerSession,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureParameters. -func (p PacketCaptureParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) - populate(objectMap, "filters", p.Filters) - populate(objectMap, "storageLocation", p.StorageLocation) - populate(objectMap, "target", p.Target) - populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) - populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) - return json.Marshal(objectMap) -} - // PacketCaptureQueryStatusResult - Status of packet capture session. type PacketCaptureQueryStatusResult struct { // The start time of the packet capture session. @@ -11868,53 +8963,6 @@ type PacketCaptureQueryStatusResult struct { StopReason *string `json:"stopReason,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. -func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "packetCaptureError", p.PacketCaptureError) - populate(objectMap, "packetCaptureStatus", p.PacketCaptureStatus) - populate(objectMap, "stopReason", p.StopReason) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureQueryStatusResult. -func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "captureStartTime": - err = unpopulateTimeRFC3339(val, &p.CaptureStartTime) - delete(rawMsg, key) - case "id": - err = unpopulate(val, &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &p.Name) - delete(rawMsg, key) - case "packetCaptureError": - err = unpopulate(val, &p.PacketCaptureError) - delete(rawMsg, key) - case "packetCaptureStatus": - err = unpopulate(val, &p.PacketCaptureStatus) - delete(rawMsg, key) - case "stopReason": - err = unpopulate(val, &p.StopReason) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // PacketCaptureResult - Information about packet capture session. type PacketCaptureResult struct { // Properties of the packet capture result. @@ -11954,19 +9002,6 @@ type PacketCaptureResultProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResultProperties. -func (p PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) - populate(objectMap, "filters", p.Filters) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "storageLocation", p.StorageLocation) - populate(objectMap, "target", p.Target) - populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) - populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) - return json.Marshal(objectMap) -} - // PacketCaptureStorageLocation - The storage location for a packet capture session. type PacketCaptureStorageLocation struct { // A valid local path on the targeting VM. Must include the name of the capture file (*.cap). For linux virtual machine it @@ -11984,23 +9019,27 @@ type PacketCaptureStorageLocation struct { // PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate method. type PacketCapturesClientBeginCreateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete method. type PacketCapturesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus // method. type PacketCapturesClientBeginGetStatusOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop method. type PacketCapturesClientBeginStopOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PacketCapturesClientGetOptions contains the optional parameters for the PacketCapturesClient.Get method. @@ -12034,18 +9073,6 @@ type PatchRouteFilter struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilter. -func (p PatchRouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - // PatchRouteFilterRule - Route Filter Rule Resource. type PatchRouteFilterRule struct { // Resource ID. @@ -12089,14 +9116,6 @@ type PeerExpressRouteCircuitConnectionListResult struct { Value []*PeerExpressRouteCircuitConnection `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionListResult. -func (p PeerExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PeerExpressRouteCircuitConnectionPropertiesFormat - Properties of the peer express route circuit connection. type PeerExpressRouteCircuitConnectionPropertiesFormat struct { // /29 IP address space to carve out Customer addresses for tunnels. @@ -12163,13 +9182,6 @@ type PeerRouteList struct { Value []*PeerRoute `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PeerRouteList. -func (p PeerRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PolicySettings - Defines contents of a web application firewall global configuration. type PolicySettings struct { // Maximum file upload size in Mb for WAF. @@ -12197,14 +9209,6 @@ type PrepareNetworkPoliciesRequest struct { ServiceName *string `json:"serviceName,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PrepareNetworkPoliciesRequest. -func (p PrepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkIntentPolicyConfigurations", p.NetworkIntentPolicyConfigurations) - populate(objectMap, "serviceName", p.ServiceName) - return json.Marshal(objectMap) -} - // PrivateDNSZoneConfig - PrivateDnsZoneConfig resource. type PrivateDNSZoneConfig struct { // Name of the resource that is unique within a resource group. This name can be used to access the resource. @@ -12238,14 +9242,6 @@ type PrivateDNSZoneGroupListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupListResult. -func (p PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PrivateDNSZoneGroupPropertiesFormat - Properties of the private dns zone group. type PrivateDNSZoneGroupPropertiesFormat struct { // A collection of private dns zone configurations of the private dns zone group. @@ -12255,24 +9251,18 @@ type PrivateDNSZoneGroupPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupPropertiesFormat. -func (p PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateDnsZoneConfigs", p.PrivateDNSZoneConfigs) - populate(objectMap, "provisioningState", p.ProvisioningState) - return json.Marshal(objectMap) -} - // PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate // method. type PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete // method. type PrivateDNSZoneGroupsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateDNSZoneGroupsClientGetOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.Get method. @@ -12294,14 +9284,6 @@ type PrivateDNSZonePropertiesFormat struct { RecordSets []*RecordSet `json:"recordSets,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZonePropertiesFormat. -func (p PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "privateDnsZoneId", p.PrivateDNSZoneID) - populate(objectMap, "recordSets", p.RecordSets) - return json.Marshal(objectMap) -} - // PrivateEndpoint - Private endpoint resource. type PrivateEndpoint struct { // The extended location of the load balancer. @@ -12329,20 +9311,6 @@ type PrivateEndpoint struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. -func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - // PrivateEndpointConnection resource. type PrivateEndpointConnection struct { // Resource ID. @@ -12370,14 +9338,6 @@ type PrivateEndpointConnectionListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. -func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PrivateEndpointConnectionProperties - Properties of the PrivateEndpointConnectProperties. type PrivateEndpointConnectionProperties struct { // A collection of information about the state of the connection between service consumer and provider. @@ -12429,14 +9389,6 @@ type PrivateEndpointListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointListResult. -func (p PrivateEndpointListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PrivateEndpointProperties - Properties of the private endpoint. type PrivateEndpointProperties struct { // Application security groups in which the private endpoint IP configuration is included. @@ -12468,30 +9420,17 @@ type PrivateEndpointProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperties. -func (p PrivateEndpointProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationSecurityGroups", p.ApplicationSecurityGroups) - populate(objectMap, "customDnsConfigs", p.CustomDNSConfigs) - populate(objectMap, "customNetworkInterfaceName", p.CustomNetworkInterfaceName) - populate(objectMap, "ipConfigurations", p.IPConfigurations) - populate(objectMap, "manualPrivateLinkServiceConnections", p.ManualPrivateLinkServiceConnections) - populate(objectMap, "networkInterfaces", p.NetworkInterfaces) - populate(objectMap, "privateLinkServiceConnections", p.PrivateLinkServiceConnections) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "subnet", p.Subnet) - return json.Marshal(objectMap) -} - // PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate // method. type PrivateEndpointsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete method. type PrivateEndpointsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateEndpointsClientGetOptions contains the optional parameters for the PrivateEndpointsClient.Get method. @@ -12538,20 +9477,6 @@ type PrivateLinkService struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkService. -func (p PrivateLinkService) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - // PrivateLinkServiceConnection resource. type PrivateLinkServiceConnection struct { // Resource ID. @@ -12588,17 +9513,6 @@ type PrivateLinkServiceConnectionProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionProperties. -func (p PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "groupIds", p.GroupIDs) - populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) - populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "requestMessage", p.RequestMessage) - return json.Marshal(objectMap) -} - // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer // and provider. type PrivateLinkServiceConnectionState struct { @@ -12660,14 +9574,6 @@ type PrivateLinkServiceListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceListResult. -func (p PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PrivateLinkServiceProperties - Properties of the private link service. type PrivateLinkServiceProperties struct { // The auto-approval list of the private link service. @@ -12701,48 +9607,18 @@ type PrivateLinkServiceProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceProperties. -func (p PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "alias", p.Alias) - populate(objectMap, "autoApproval", p.AutoApproval) - populate(objectMap, "enableProxyProtocol", p.EnableProxyProtocol) - populate(objectMap, "fqdns", p.Fqdns) - populate(objectMap, "ipConfigurations", p.IPConfigurations) - populate(objectMap, "loadBalancerFrontendIpConfigurations", p.LoadBalancerFrontendIPConfigurations) - populate(objectMap, "networkInterfaces", p.NetworkInterfaces) - populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "visibility", p.Visibility) - return json.Marshal(objectMap) -} - // PrivateLinkServicePropertiesAutoApproval - The auto-approval list of the private link service. type PrivateLinkServicePropertiesAutoApproval struct { // The list of subscriptions. Subscriptions []*string `json:"subscriptions,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesAutoApproval. -func (p PrivateLinkServicePropertiesAutoApproval) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", p.Subscriptions) - return json.Marshal(objectMap) -} - // PrivateLinkServicePropertiesVisibility - The visibility list of the private link service. type PrivateLinkServicePropertiesVisibility struct { // The list of subscriptions. Subscriptions []*string `json:"subscriptions,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesVisibility. -func (p PrivateLinkServicePropertiesVisibility) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", p.Subscriptions) - return json.Marshal(objectMap) -} - // PrivateLinkServiceVisibility - Response for the CheckPrivateLinkServiceVisibility API service call. type PrivateLinkServiceVisibility struct { // Private Link Service Visibility (True/False). @@ -12752,31 +9628,36 @@ type PrivateLinkServiceVisibility struct { // PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters // for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility // method. type PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate // method. type PrivateLinkServicesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete // method. type PrivateLinkServicesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection // method. type PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PrivateLinkServicesClientGetOptions contains the optional parameters for the PrivateLinkServicesClient.Get method. @@ -12877,19 +9758,6 @@ type ProbePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ProbePropertiesFormat. -func (p ProbePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "intervalInSeconds", p.IntervalInSeconds) - populate(objectMap, "loadBalancingRules", p.LoadBalancingRules) - populate(objectMap, "numberOfProbes", p.NumberOfProbes) - populate(objectMap, "port", p.Port) - populate(objectMap, "protocol", p.Protocol) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "requestPath", p.RequestPath) - return json.Marshal(objectMap) -} - // Profile - Network profile resource. type Profile struct { // Resource ID. @@ -12914,19 +9782,6 @@ type Profile struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type Profile. -func (p Profile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - return json.Marshal(objectMap) -} - // ProfileListResult - Response for ListNetworkProfiles API service call. type ProfileListResult struct { // The URL to get the next set of results. @@ -12936,14 +9791,6 @@ type ProfileListResult struct { Value []*Profile `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. -func (p ProfileListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // ProfilePropertiesFormat - Network profile properties. type ProfilePropertiesFormat struct { // List of chid container network interface configurations. @@ -12959,19 +9806,10 @@ type ProfilePropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesFormat. -func (p ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "containerNetworkInterfaceConfigurations", p.ContainerNetworkInterfaceConfigurations) - populate(objectMap, "containerNetworkInterfaces", p.ContainerNetworkInterfaces) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "resourceGuid", p.ResourceGUID) - return json.Marshal(objectMap) -} - // ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. type ProfilesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ProfilesClientCreateOrUpdateOptions contains the optional parameters for the ProfilesClient.CreateOrUpdate method. @@ -13009,14 +9847,6 @@ type PropagatedRouteTable struct { Labels []*string `json:"labels,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PropagatedRouteTable. -func (p PropagatedRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ids", p.IDs) - populate(objectMap, "labels", p.Labels) - return json.Marshal(objectMap) -} - // ProtocolConfiguration - Configuration of the protocol. type ProtocolConfiguration struct { // HTTP configuration of the connectivity check. @@ -13074,22 +9904,6 @@ type PublicIPAddress struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddress. -func (p PublicIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - populate(objectMap, "zones", p.Zones) - return json.Marshal(objectMap) -} - // PublicIPAddressDNSSettings - Contains FQDN of the DNS record associated with the public IP address. type PublicIPAddressDNSSettings struct { // The domain name label. The concatenation of the domain name label and the regionalized DNS zone make up the fully qualified @@ -13116,14 +9930,6 @@ type PublicIPAddressListResult struct { Value []*PublicIPAddress `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressListResult. -func (p PublicIPAddressListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PublicIPAddressPropertiesFormat - Public IP address properties. type PublicIPAddressPropertiesFormat struct { // The FQDN of the DNS record associated with the public IP address. @@ -13175,28 +9981,6 @@ type PublicIPAddressPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressPropertiesFormat. -func (p PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "dnsSettings", p.DNSSettings) - populate(objectMap, "ddosSettings", p.DdosSettings) - populate(objectMap, "deleteOption", p.DeleteOption) - populate(objectMap, "ipAddress", p.IPAddress) - populate(objectMap, "ipConfiguration", p.IPConfiguration) - populate(objectMap, "ipTags", p.IPTags) - populate(objectMap, "idleTimeoutInMinutes", p.IdleTimeoutInMinutes) - populate(objectMap, "linkedPublicIPAddress", p.LinkedPublicIPAddress) - populate(objectMap, "migrationPhase", p.MigrationPhase) - populate(objectMap, "natGateway", p.NatGateway) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) - populate(objectMap, "publicIPAllocationMethod", p.PublicIPAllocationMethod) - populate(objectMap, "publicIPPrefix", p.PublicIPPrefix) - populate(objectMap, "resourceGuid", p.ResourceGUID) - populate(objectMap, "servicePublicIPAddress", p.ServicePublicIPAddress) - return json.Marshal(objectMap) -} - // PublicIPAddressSKU - SKU of a public IP address. type PublicIPAddressSKU struct { // Name of a public IP address SKU. @@ -13209,13 +9993,15 @@ type PublicIPAddressSKU struct { // PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate // method. type PublicIPAddressesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete // method. type PublicIPAddressesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PublicIPAddressesClientGetCloudServicePublicIPAddressOptions contains the optional parameters for the PublicIPAddressesClient.GetCloudServicePublicIPAddress @@ -13310,22 +10096,6 @@ type PublicIPPrefix struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefix. -func (p PublicIPPrefix) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", p.Etag) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "location", p.Location) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "sku", p.SKU) - populate(objectMap, "tags", p.Tags) - populate(objectMap, "type", p.Type) - populate(objectMap, "zones", p.Zones) - return json.Marshal(objectMap) -} - // PublicIPPrefixListResult - Response for ListPublicIpPrefixes API service call. type PublicIPPrefixListResult struct { // The URL to get the next set of results. @@ -13335,14 +10105,6 @@ type PublicIPPrefixListResult struct { Value []*PublicIPPrefix `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixListResult. -func (p PublicIPPrefixListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) - return json.Marshal(objectMap) -} - // PublicIPPrefixPropertiesFormat - Public IP prefix properties. type PublicIPPrefixPropertiesFormat struct { // The customIpPrefix that this prefix is associated with. @@ -13376,22 +10138,6 @@ type PublicIPPrefixPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixPropertiesFormat. -func (p PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "customIPPrefix", p.CustomIPPrefix) - populate(objectMap, "ipPrefix", p.IPPrefix) - populate(objectMap, "ipTags", p.IPTags) - populate(objectMap, "loadBalancerFrontendIpConfiguration", p.LoadBalancerFrontendIPConfiguration) - populate(objectMap, "natGateway", p.NatGateway) - populate(objectMap, "prefixLength", p.PrefixLength) - populate(objectMap, "provisioningState", p.ProvisioningState) - populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) - populate(objectMap, "publicIPAddresses", p.PublicIPAddresses) - populate(objectMap, "resourceGuid", p.ResourceGUID) - return json.Marshal(objectMap) -} - // PublicIPPrefixSKU - SKU of a public IP prefix. type PublicIPPrefixSKU struct { // Name of a public IP prefix SKU. @@ -13404,12 +10150,14 @@ type PublicIPPrefixSKU struct { // PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate // method. type PublicIPPrefixesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete method. type PublicIPPrefixesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // PublicIPPrefixesClientGetOptions contains the optional parameters for the PublicIPPrefixesClient.Get method. @@ -13454,18 +10202,6 @@ type QosDefinition struct { SourcePortRanges []*QosPortRange `json:"sourcePortRanges,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type QosDefinition. -func (q QosDefinition) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationIpRanges", q.DestinationIPRanges) - populate(objectMap, "destinationPortRanges", q.DestinationPortRanges) - populate(objectMap, "markings", q.Markings) - populate(objectMap, "protocol", q.Protocol) - populate(objectMap, "sourceIpRanges", q.SourceIPRanges) - populate(objectMap, "sourcePortRanges", q.SourcePortRanges) - return json.Marshal(objectMap) -} - // QosIPRange - Qos Traffic Profiler IP Range properties. type QosIPRange struct { // End IP Address. @@ -13503,14 +10239,6 @@ type QueryResults struct { Signatures []*SingleQueryResult `json:"signatures,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type QueryResults. -func (q QueryResults) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "matchingRecordsCount", q.MatchingRecordsCount) - populate(objectMap, "signatures", q.Signatures) - return json.Marshal(objectMap) -} - // QueryTroubleshootingParameters - Parameters that define the resource to query the troubleshooting result. type QueryTroubleshootingParameters struct { // REQUIRED; The target resource ID to query the troubleshooting result. @@ -13550,18 +10278,6 @@ type RecordSet struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RecordSet. -func (r RecordSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "fqdn", r.Fqdn) - populate(objectMap, "ipAddresses", r.IPAddresses) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "recordSetName", r.RecordSetName) - populate(objectMap, "recordType", r.RecordType) - populate(objectMap, "ttl", r.TTL) - return json.Marshal(objectMap) -} - // ReferencedPublicIPAddress - Reference to a public IP address. type ReferencedPublicIPAddress struct { // The PublicIPAddress Reference. @@ -13586,17 +10302,6 @@ type Resource struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - // ResourceNavigationLink resource. type ResourceNavigationLink struct { // Resource ID. @@ -13641,27 +10346,12 @@ type ResourceNavigationLinksListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinksListResult. -func (r ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // ResourceSet - The base resource set for visibility and auto-approval. type ResourceSet struct { // The list of subscriptions. Subscriptions []*string `json:"subscriptions,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ResourceSet. -func (r ResourceSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "subscriptions", r.Subscriptions) - return json.Marshal(objectMap) -} - // RetentionPolicyParameters - Parameters that define the retention policy for flow log. type RetentionPolicyParameters struct { // Number of days to retain flow log records. @@ -13713,19 +10403,6 @@ type RouteFilter struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RouteFilter. -func (r RouteFilter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - // RouteFilterListResult - Response for the ListRouteFilters API service call. type RouteFilterListResult struct { // The URL to get the next set of results. @@ -13735,14 +10412,6 @@ type RouteFilterListResult struct { Value []*RouteFilter `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type RouteFilterListResult. -func (r RouteFilterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // RouteFilterPropertiesFormat - Route Filter Resource. type RouteFilterPropertiesFormat struct { // Collection of RouteFilterRules contained within a route filter. @@ -13758,16 +10427,6 @@ type RouteFilterPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RouteFilterPropertiesFormat. -func (r RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "ipv6Peerings", r.IPv6Peerings) - populate(objectMap, "peerings", r.Peerings) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "rules", r.Rules) - return json.Marshal(objectMap) -} - // RouteFilterRule - Route Filter Rule Resource. type RouteFilterRule struct { // Resource ID. @@ -13795,14 +10454,6 @@ type RouteFilterRuleListResult struct { Value []*RouteFilterRule `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type RouteFilterRuleListResult. -func (r RouteFilterRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // RouteFilterRulePropertiesFormat - Route Filter Rule Resource. type RouteFilterRulePropertiesFormat struct { // REQUIRED; The access type of the rule. @@ -13818,25 +10469,17 @@ type RouteFilterRulePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RouteFilterRulePropertiesFormat. -func (r RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", r.Access) - populate(objectMap, "communities", r.Communities) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "routeFilterRuleType", r.RouteFilterRuleType) - return json.Marshal(objectMap) -} - // RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate // method. type RouteFilterRulesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete method. type RouteFilterRulesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteFilterRulesClientGetOptions contains the optional parameters for the RouteFilterRulesClient.Get method. @@ -13853,12 +10496,14 @@ type RouteFilterRulesClientListByRouteFilterOptions struct { // RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate // method. type RouteFiltersClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete method. type RouteFiltersClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteFiltersClientGetOptions contains the optional parameters for the RouteFiltersClient.Get method. @@ -13892,14 +10537,6 @@ type RouteListResult struct { Value []*Route `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type RouteListResult. -func (r RouteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // RoutePropertiesFormat - Route resource. type RoutePropertiesFormat struct { // REQUIRED; The type of Azure hop the packet should be sent to. @@ -13942,19 +10579,6 @@ type RouteTable struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RouteTable. -func (r RouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", r.Etag) - populate(objectMap, "id", r.ID) - populate(objectMap, "location", r.Location) - populate(objectMap, "name", r.Name) - populate(objectMap, "properties", r.Properties) - populate(objectMap, "tags", r.Tags) - populate(objectMap, "type", r.Type) - return json.Marshal(objectMap) -} - // RouteTableListResult - Response for the ListRouteTable API service call. type RouteTableListResult struct { // The URL to get the next set of results. @@ -13964,14 +10588,6 @@ type RouteTableListResult struct { Value []*RouteTable `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type RouteTableListResult. -func (r RouteTableListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", r.NextLink) - populate(objectMap, "value", r.Value) - return json.Marshal(objectMap) -} - // RouteTablePropertiesFormat - Route Table resource. type RouteTablePropertiesFormat struct { // Whether to disable the routes learned by BGP on that route table. True means disable. @@ -13990,26 +10606,17 @@ type RouteTablePropertiesFormat struct { Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat. -func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "resourceGuid", r.ResourceGUID) - populate(objectMap, "routes", r.Routes) - populate(objectMap, "subnets", r.Subnets) - return json.Marshal(objectMap) -} - // RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate // method. type RouteTablesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. type RouteTablesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RouteTablesClientGetOptions contains the optional parameters for the RouteTablesClient.Get method. @@ -14035,12 +10642,14 @@ type RouteTablesClientUpdateTagsOptions struct { // RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate method. type RoutesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. type RoutesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RoutesClientGetOptions contains the optional parameters for the RoutesClient.Get method. @@ -14086,12 +10695,14 @@ type RoutingIntent struct { // RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate // method. type RoutingIntentClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete method. type RoutingIntentClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // RoutingIntentClientGetOptions contains the optional parameters for the RoutingIntentClient.Get method. @@ -14113,14 +10724,6 @@ type RoutingIntentProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type RoutingIntentProperties. -func (r RoutingIntentProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "provisioningState", r.ProvisioningState) - populate(objectMap, "routingPolicies", r.RoutingPolicies) - return json.Marshal(objectMap) -} - // RoutingPolicy - The routing policy object used in a RoutingIntent resource. type RoutingPolicy struct { // REQUIRED; List of all destinations which this routing policy is applicable to (for example: Internet, PrivateTraffic). @@ -14133,15 +10736,6 @@ type RoutingPolicy struct { NextHop *string `json:"nextHop,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type RoutingPolicy. -func (r RoutingPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinations", r.Destinations) - populate(objectMap, "name", r.Name) - populate(objectMap, "nextHop", r.NextHop) - return json.Marshal(objectMap) -} - // Rule of type network. type Rule struct { // REQUIRED; Rule Type. @@ -14175,78 +10769,6 @@ type Rule struct { SourceIPGroups []*string `json:"sourceIpGroups,omitempty"` } -// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type Rule. -func (r *Rule) GetFirewallPolicyRule() *FirewallPolicyRule { - return &FirewallPolicyRule{ - Name: r.Name, - Description: r.Description, - RuleType: r.RuleType, - } -} - -// MarshalJSON implements the json.Marshaller interface for type Rule. -func (r Rule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", r.Description) - populate(objectMap, "destinationAddresses", r.DestinationAddresses) - populate(objectMap, "destinationFqdns", r.DestinationFqdns) - populate(objectMap, "destinationIpGroups", r.DestinationIPGroups) - populate(objectMap, "destinationPorts", r.DestinationPorts) - populate(objectMap, "ipProtocols", r.IPProtocols) - populate(objectMap, "name", r.Name) - objectMap["ruleType"] = FirewallPolicyRuleTypeNetworkRule - populate(objectMap, "sourceAddresses", r.SourceAddresses) - populate(objectMap, "sourceIpGroups", r.SourceIPGroups) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. -func (r *Rule) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "description": - err = unpopulate(val, &r.Description) - delete(rawMsg, key) - case "destinationAddresses": - err = unpopulate(val, &r.DestinationAddresses) - delete(rawMsg, key) - case "destinationFqdns": - err = unpopulate(val, &r.DestinationFqdns) - delete(rawMsg, key) - case "destinationIpGroups": - err = unpopulate(val, &r.DestinationIPGroups) - delete(rawMsg, key) - case "destinationPorts": - err = unpopulate(val, &r.DestinationPorts) - delete(rawMsg, key) - case "ipProtocols": - err = unpopulate(val, &r.IPProtocols) - delete(rawMsg, key) - case "name": - err = unpopulate(val, &r.Name) - delete(rawMsg, key) - case "ruleType": - err = unpopulate(val, &r.RuleType) - delete(rawMsg, key) - case "sourceAddresses": - err = unpopulate(val, &r.SourceAddresses) - delete(rawMsg, key) - case "sourceIpGroups": - err = unpopulate(val, &r.SourceIPGroups) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // SKU - The sku of this Bastion Host. type SKU struct { // The name of this Bastion Host. @@ -14277,19 +10799,6 @@ type SecurityGroup struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityGroup. -func (s SecurityGroup) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - // SecurityGroupListResult - Response for ListNetworkSecurityGroups API service call. type SecurityGroupListResult struct { // The URL to get the next set of results. @@ -14299,14 +10808,6 @@ type SecurityGroupListResult struct { Value []*SecurityGroup `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupListResult. -func (s SecurityGroupListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // SecurityGroupNetworkInterface - Network interface and all its associated security rules. type SecurityGroupNetworkInterface struct { // ID of the network interface. @@ -14340,19 +10841,6 @@ type SecurityGroupPropertiesFormat struct { Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupPropertiesFormat. -func (s SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) - populate(objectMap, "flowLogs", s.FlowLogs) - populate(objectMap, "networkInterfaces", s.NetworkInterfaces) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceGuid", s.ResourceGUID) - populate(objectMap, "securityRules", s.SecurityRules) - populate(objectMap, "subnets", s.Subnets) - return json.Marshal(objectMap) -} - // SecurityGroupResult - Network configuration diagnostic result corresponded provided traffic query. type SecurityGroupResult struct { // The network traffic is allowed or denied. @@ -14362,14 +10850,6 @@ type SecurityGroupResult struct { EvaluatedNetworkSecurityGroups []*EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupResult. -func (s SecurityGroupResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "evaluatedNetworkSecurityGroups", s.EvaluatedNetworkSecurityGroups) - populate(objectMap, "securityRuleAccessResult", s.SecurityRuleAccessResult) - return json.Marshal(objectMap) -} - // SecurityGroupViewParameters - Parameters that define the VM to check security groups for. type SecurityGroupViewParameters struct { // REQUIRED; ID of the target VM. @@ -14382,22 +10862,17 @@ type SecurityGroupViewResult struct { NetworkInterfaces []*SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewResult. -func (s SecurityGroupViewResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "networkInterfaces", s.NetworkInterfaces) - return json.Marshal(objectMap) -} - // SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate // method. type SecurityGroupsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete method. type SecurityGroupsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityGroupsClientGetOptions contains the optional parameters for the SecurityGroupsClient.Get method. @@ -14445,19 +10920,6 @@ type SecurityPartnerProvider struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProvider. -func (s SecurityPartnerProvider) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - // SecurityPartnerProviderListResult - Response for ListSecurityPartnerProviders API service call. type SecurityPartnerProviderListResult struct { // URL to get the next set of results. @@ -14467,14 +10929,6 @@ type SecurityPartnerProviderListResult struct { Value []*SecurityPartnerProvider `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderListResult. -func (s SecurityPartnerProviderListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // SecurityPartnerProviderPropertiesFormat - Properties of the Security Partner Provider. type SecurityPartnerProviderPropertiesFormat struct { // The security provider name. @@ -14493,13 +10947,15 @@ type SecurityPartnerProviderPropertiesFormat struct { // SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate // method. type SecurityPartnerProvidersClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete // method. type SecurityPartnerProvidersClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityPartnerProvidersClientGetOptions contains the optional parameters for the SecurityPartnerProvidersClient.Get method. @@ -14558,16 +11014,6 @@ type SecurityRuleAssociations struct { SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityRuleAssociations. -func (s SecurityRuleAssociations) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) - populate(objectMap, "effectiveSecurityRules", s.EffectiveSecurityRules) - populate(objectMap, "networkInterfaceAssociation", s.NetworkInterfaceAssociation) - populate(objectMap, "subnetAssociation", s.SubnetAssociation) - return json.Marshal(objectMap) -} - // SecurityRuleListResult - Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a // network security group. type SecurityRuleListResult struct { @@ -14578,14 +11024,6 @@ type SecurityRuleListResult struct { Value []*SecurityRule `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityRuleListResult. -func (s SecurityRuleListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // SecurityRulePropertiesFormat - Security rule resource. type SecurityRulePropertiesFormat struct { // REQUIRED; The network traffic is allowed or denied. @@ -14642,37 +11080,17 @@ type SecurityRulePropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SecurityRulePropertiesFormat. -func (s SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "access", s.Access) - populate(objectMap, "description", s.Description) - populate(objectMap, "destinationAddressPrefix", s.DestinationAddressPrefix) - populate(objectMap, "destinationAddressPrefixes", s.DestinationAddressPrefixes) - populate(objectMap, "destinationApplicationSecurityGroups", s.DestinationApplicationSecurityGroups) - populate(objectMap, "destinationPortRange", s.DestinationPortRange) - populate(objectMap, "destinationPortRanges", s.DestinationPortRanges) - populate(objectMap, "direction", s.Direction) - populate(objectMap, "priority", s.Priority) - populate(objectMap, "protocol", s.Protocol) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "sourceAddressPrefix", s.SourceAddressPrefix) - populate(objectMap, "sourceAddressPrefixes", s.SourceAddressPrefixes) - populate(objectMap, "sourceApplicationSecurityGroups", s.SourceApplicationSecurityGroups) - populate(objectMap, "sourcePortRange", s.SourcePortRange) - populate(objectMap, "sourcePortRanges", s.SourcePortRanges) - return json.Marshal(objectMap) -} - // SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate // method. type SecurityRulesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete method. type SecurityRulesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SecurityRulesClientGetOptions contains the optional parameters for the SecurityRulesClient.Get method. @@ -14742,17 +11160,6 @@ type ServiceAssociationLinkPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinkPropertiesFormat. -func (s ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowDelete", s.AllowDelete) - populate(objectMap, "link", s.Link) - populate(objectMap, "linkedResourceType", s.LinkedResourceType) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "provisioningState", s.ProvisioningState) - return json.Marshal(objectMap) -} - // ServiceAssociationLinksClientListOptions contains the optional parameters for the ServiceAssociationLinksClient.List method. type ServiceAssociationLinksClientListOptions struct { // placeholder for future optional parameters @@ -14767,14 +11174,6 @@ type ServiceAssociationLinksListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinksListResult. -func (s ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // ServiceDelegationPropertiesFormat - Properties of a service delegation. type ServiceDelegationPropertiesFormat struct { // The name of the service to whom the subnet should be delegated (e.g. Microsoft.Sql/servers). @@ -14787,25 +11186,18 @@ type ServiceDelegationPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceDelegationPropertiesFormat. -func (s ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "actions", s.Actions) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "serviceName", s.ServiceName) - return json.Marshal(objectMap) -} - // ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate // method. type ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete // method. type ServiceEndpointPoliciesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ServiceEndpointPoliciesClientGetOptions contains the optional parameters for the ServiceEndpointPoliciesClient.Get method. @@ -14858,20 +11250,6 @@ type ServiceEndpointPolicy struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicy. -func (s ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", s.Etag) - populate(objectMap, "id", s.ID) - populate(objectMap, "kind", s.Kind) - populate(objectMap, "location", s.Location) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "tags", s.Tags) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - // ServiceEndpointPolicyDefinition - Service Endpoint policy definitions. type ServiceEndpointPolicyDefinition struct { // Resource ID. @@ -14900,14 +11278,6 @@ type ServiceEndpointPolicyDefinitionListResult struct { Value []*ServiceEndpointPolicyDefinition `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionListResult. -func (s ServiceEndpointPolicyDefinitionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // ServiceEndpointPolicyDefinitionPropertiesFormat - Service Endpoint policy definition resource. type ServiceEndpointPolicyDefinitionPropertiesFormat struct { // A description for this rule. Restricted to 140 chars. @@ -14923,26 +11293,18 @@ type ServiceEndpointPolicyDefinitionPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. -func (s ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "service", s.Service) - populate(objectMap, "serviceResources", s.ServiceResources) - return json.Marshal(objectMap) -} - // ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate // method. type ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete // method. type ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // ServiceEndpointPolicyDefinitionsClientGetOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.Get @@ -14966,14 +11328,6 @@ type ServiceEndpointPolicyListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyListResult. -func (s ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // ServiceEndpointPolicyPropertiesFormat - Service Endpoint Policy resource. type ServiceEndpointPolicyPropertiesFormat struct { // A collection of contextual service endpoint policy. @@ -14995,18 +11349,6 @@ type ServiceEndpointPolicyPropertiesFormat struct { Subnets []*Subnet `json:"subnets,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyPropertiesFormat. -func (s ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "contextualServiceEndpointPolicies", s.ContextualServiceEndpointPolicies) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "resourceGuid", s.ResourceGUID) - populate(objectMap, "serviceAlias", s.ServiceAlias) - populate(objectMap, "serviceEndpointPolicyDefinitions", s.ServiceEndpointPolicyDefinitions) - populate(objectMap, "subnets", s.Subnets) - return json.Marshal(objectMap) -} - // ServiceEndpointPropertiesFormat - The service endpoint properties. type ServiceEndpointPropertiesFormat struct { // A list of locations. @@ -15019,15 +11361,6 @@ type ServiceEndpointPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPropertiesFormat. -func (s ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "locations", s.Locations) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "service", s.Service) - return json.Marshal(objectMap) -} - // ServiceTagInformation - The service tag information. type ServiceTagInformation struct { // READ-ONLY; The ID of service tag. @@ -15061,14 +11394,6 @@ type ServiceTagInformationListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationListResult. -func (s ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // ServiceTagInformationPropertiesFormat - Properties of the service tag information. type ServiceTagInformationPropertiesFormat struct { // READ-ONLY; The list of IP address prefixes. @@ -15087,17 +11412,6 @@ type ServiceTagInformationPropertiesFormat struct { SystemService *string `json:"systemService,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationPropertiesFormat. -func (s ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "changeNumber", s.ChangeNumber) - populate(objectMap, "region", s.Region) - populate(objectMap, "state", s.State) - populate(objectMap, "systemService", s.SystemService) - return json.Marshal(objectMap) -} - // ServiceTagsClientListOptions contains the optional parameters for the ServiceTagsClient.List method. type ServiceTagsClientListOptions struct { // placeholder for future optional parameters @@ -15127,32 +11441,12 @@ type ServiceTagsListResult struct { Values []*ServiceTagInformation `json:"values,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type ServiceTagsListResult. -func (s ServiceTagsListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "changeNumber", s.ChangeNumber) - populate(objectMap, "cloud", s.Cloud) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "type", s.Type) - populate(objectMap, "values", s.Values) - return json.Marshal(objectMap) -} - // SessionIDs - List of session IDs. type SessionIDs struct { // List of session IDs. SessionIDs []*string `json:"sessionIds,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SessionIDs. -func (s SessionIDs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "sessionIds", s.SessionIDs) - return json.Marshal(objectMap) -} - // SignatureOverridesFilterValuesQuery - Describes the filter values possibles for a given column type SignatureOverridesFilterValuesQuery struct { // Describes the name of the column which values will be returned @@ -15165,13 +11459,6 @@ type SignatureOverridesFilterValuesResponse struct { FilterValues []*string `json:"filterValues,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesResponse. -func (s SignatureOverridesFilterValuesResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterValues", s.FilterValues) - return json.Marshal(objectMap) -} - // SignaturesOverrides - Contains all specific policy signatures overrides for the IDPS type SignaturesOverrides struct { // Will contain the resource id of the signature override resource @@ -15187,42 +11474,18 @@ type SignaturesOverrides struct { Type *string `json:"type,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverrides. -func (s SignaturesOverrides) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - // SignaturesOverridesList - Describes an object containing an array with a single item type SignaturesOverridesList struct { // Describes a list consisting exactly one item describing the policy's signature override status Value []*SignaturesOverrides `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesList. -func (s SignaturesOverridesList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // SignaturesOverridesProperties - Will contain the properties of the resource (the actual signature overrides) type SignaturesOverridesProperties struct { // Dictionary of Signatures map[string]*string `json:"signatures,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesProperties. -func (s SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "signatures", s.Signatures) - return json.Marshal(objectMap) -} - type SingleQueryResult struct { // Describes what is the signature enforces Description *string `json:"description,omitempty"` @@ -15258,23 +11521,6 @@ type SingleQueryResult struct { SourcePorts []*string `json:"sourcePorts,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SingleQueryResult. -func (s SingleQueryResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "description", s.Description) - populate(objectMap, "destinationPorts", s.DestinationPorts) - populate(objectMap, "direction", s.Direction) - populate(objectMap, "group", s.Group) - populate(objectMap, "inheritedFromParentPolicy", s.InheritedFromParentPolicy) - populate(objectMap, "lastUpdated", s.LastUpdated) - populate(objectMap, "mode", s.Mode) - populate(objectMap, "protocol", s.Protocol) - populate(objectMap, "severity", s.Severity) - populate(objectMap, "signatureId", s.SignatureID) - populate(objectMap, "sourcePorts", s.SourcePorts) - return json.Marshal(objectMap) -} - // StaticRoute - List of all Static Routes. type StaticRoute struct { // List of all address prefixes. @@ -15287,15 +11533,6 @@ type StaticRoute struct { NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type StaticRoute. -func (s StaticRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "name", s.Name) - populate(objectMap, "nextHopIpAddress", s.NextHopIPAddress) - return json.Marshal(objectMap) -} - // SubResource - Reference to another subresource. type SubResource struct { // Resource ID. @@ -15329,14 +11566,6 @@ type SubnetAssociation struct { ID *string `json:"id,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SubnetAssociation. -func (s SubnetAssociation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", s.ID) - populate(objectMap, "securityRules", s.SecurityRules) - return json.Marshal(objectMap) -} - // SubnetListResult - Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. type SubnetListResult struct { // The URL to get the next set of results. @@ -15346,14 +11575,6 @@ type SubnetListResult struct { Value []*Subnet `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type SubnetListResult. -func (s SubnetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - // SubnetPropertiesFormat - Properties of the subnet. type SubnetPropertiesFormat struct { // The address prefix for the subnet. @@ -15415,51 +11636,30 @@ type SubnetPropertiesFormat struct { ServiceAssociationLinks []*ServiceAssociationLink `json:"serviceAssociationLinks,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat. -func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", s.AddressPrefix) - populate(objectMap, "addressPrefixes", s.AddressPrefixes) - populate(objectMap, "applicationGatewayIpConfigurations", s.ApplicationGatewayIPConfigurations) - populate(objectMap, "delegations", s.Delegations) - populate(objectMap, "ipAllocations", s.IPAllocations) - populate(objectMap, "ipConfigurationProfiles", s.IPConfigurationProfiles) - populate(objectMap, "ipConfigurations", s.IPConfigurations) - populate(objectMap, "natGateway", s.NatGateway) - populate(objectMap, "networkSecurityGroup", s.NetworkSecurityGroup) - populate(objectMap, "privateEndpointNetworkPolicies", s.PrivateEndpointNetworkPolicies) - populate(objectMap, "privateEndpoints", s.PrivateEndpoints) - populate(objectMap, "privateLinkServiceNetworkPolicies", s.PrivateLinkServiceNetworkPolicies) - populate(objectMap, "provisioningState", s.ProvisioningState) - populate(objectMap, "purpose", s.Purpose) - populate(objectMap, "resourceNavigationLinks", s.ResourceNavigationLinks) - populate(objectMap, "routeTable", s.RouteTable) - populate(objectMap, "serviceAssociationLinks", s.ServiceAssociationLinks) - populate(objectMap, "serviceEndpointPolicies", s.ServiceEndpointPolicies) - populate(objectMap, "serviceEndpoints", s.ServiceEndpoints) - return json.Marshal(objectMap) -} - // SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate method. type SubnetsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. type SubnetsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies // method. type SubnetsClientBeginPrepareNetworkPoliciesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies // method. type SubnetsClientBeginUnprepareNetworkPoliciesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // SubnetsClientGetOptions contains the optional parameters for the SubnetsClient.Get method. @@ -15479,13 +11679,6 @@ type TagsObject struct { Tags map[string]*string `json:"tags,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type TagsObject. -func (t TagsObject) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "tags", t.Tags) - return json.Marshal(objectMap) -} - // Topology of the specified resource group. type Topology struct { // A list of topology resources. @@ -15501,45 +11694,6 @@ type Topology struct { LastModified *time.Time `json:"lastModified,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type Topology. -func (t Topology) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) - populate(objectMap, "id", t.ID) - populateTimeRFC3339(objectMap, "lastModified", t.LastModified) - populate(objectMap, "resources", t.Resources) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Topology. -func (t *Topology) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "createdDateTime": - err = unpopulateTimeRFC3339(val, &t.CreatedDateTime) - delete(rawMsg, key) - case "id": - err = unpopulate(val, &t.ID) - delete(rawMsg, key) - case "lastModified": - err = unpopulateTimeRFC3339(val, &t.LastModified) - delete(rawMsg, key) - case "resources": - err = unpopulate(val, &t.Resources) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // TopologyAssociation - Resources that have an association with the parent resource. type TopologyAssociation struct { // The association type of the child resource to the parent resource. @@ -15579,16 +11733,6 @@ type TopologyResource struct { Name *string `json:"name,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type TopologyResource. -func (t TopologyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "associations", t.Associations) - populate(objectMap, "id", t.ID) - populate(objectMap, "location", t.Location) - populate(objectMap, "name", t.Name) - return json.Marshal(objectMap) -} - // TrafficAnalyticsConfigurationProperties - Parameters that define the configuration of traffic analytics. type TrafficAnalyticsConfigurationProperties struct { // Flag to enable/disable traffic analytics. @@ -15622,14 +11766,6 @@ type TrafficSelectorPolicy struct { RemoteAddressRanges []*string `json:"remoteAddressRanges,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type TrafficSelectorPolicy. -func (t TrafficSelectorPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "localAddressRanges", t.LocalAddressRanges) - populate(objectMap, "remoteAddressRanges", t.RemoteAddressRanges) - return json.Marshal(objectMap) -} - // TroubleshootingDetails - Information gained from troubleshooting of specified resource. type TroubleshootingDetails struct { // Details on troubleshooting results. @@ -15648,17 +11784,6 @@ type TroubleshootingDetails struct { Summary *string `json:"summary,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingDetails. -func (t TroubleshootingDetails) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "detail", t.Detail) - populate(objectMap, "id", t.ID) - populate(objectMap, "reasonType", t.ReasonType) - populate(objectMap, "recommendedActions", t.RecommendedActions) - populate(objectMap, "summary", t.Summary) - return json.Marshal(objectMap) -} - // TroubleshootingParameters - Parameters that define the resource to troubleshoot. type TroubleshootingParameters struct { // REQUIRED; Properties of the troubleshooting resource. @@ -15707,45 +11832,6 @@ type TroubleshootingResult struct { StartTime *time.Time `json:"startTime,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type TroubleshootingResult. -func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "code", t.Code) - populateTimeRFC3339(objectMap, "endTime", t.EndTime) - populate(objectMap, "results", t.Results) - populateTimeRFC3339(objectMap, "startTime", t.StartTime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingResult. -func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return err - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, &t.Code) - delete(rawMsg, key) - case "endTime": - err = unpopulateTimeRFC3339(val, &t.EndTime) - delete(rawMsg, key) - case "results": - err = unpopulate(val, &t.Results) - delete(rawMsg, key) - case "startTime": - err = unpopulateTimeRFC3339(val, &t.StartTime) - delete(rawMsg, key) - } - if err != nil { - return err - } - } - return nil -} - // TunnelConnectionHealth - VirtualNetworkGatewayConnection properties. type TunnelConnectionHealth struct { // READ-ONLY; Virtual Network Gateway connection status. @@ -15811,14 +11897,6 @@ type UsagesListResult struct { Value []*Usage `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. -func (u UsagesListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", u.NextLink) - populate(objectMap, "value", u.Value) - return json.Marshal(objectMap) -} - // VM - Describes a Virtual Machine. type VM struct { // Resource ID. @@ -15837,17 +11915,6 @@ type VM struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VM. -func (v VM) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VPNClientConfiguration - VpnClientConfiguration for P2S client. type VPNClientConfiguration struct { // The AADAudience property of the VirtualNetworkGateway resource for vpn client connection used for AAD authentication. @@ -15887,24 +11954,6 @@ type VPNClientConfiguration struct { VPNClientRootCertificates []*VPNClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNClientConfiguration. -func (v VPNClientConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAudience", v.AADAudience) - populate(objectMap, "aadIssuer", v.AADIssuer) - populate(objectMap, "aadTenant", v.AADTenant) - populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) - populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) - populate(objectMap, "radiusServers", v.RadiusServers) - populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) - populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) - populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) - populate(objectMap, "vpnClientProtocols", v.VPNClientProtocols) - populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) - populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) - return json.Marshal(objectMap) -} - // VPNClientConnectionHealth - VpnClientConnectionHealth properties. type VPNClientConnectionHealth struct { // List of allocated ip addresses to the connected p2s vpn clients. @@ -15920,16 +11969,6 @@ type VPNClientConnectionHealth struct { TotalIngressBytesTransferred *int64 `json:"totalIngressBytesTransferred,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealth. -func (v VPNClientConnectionHealth) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allocatedIpAddresses", v.AllocatedIPAddresses) - populate(objectMap, "totalEgressBytesTransferred", v.TotalEgressBytesTransferred) - populate(objectMap, "totalIngressBytesTransferred", v.TotalIngressBytesTransferred) - populate(objectMap, "vpnClientConnectionsCount", v.VPNClientConnectionsCount) - return json.Marshal(objectMap) -} - // VPNClientConnectionHealthDetail - VPN client connection health detail. type VPNClientConnectionHealthDetail struct { // READ-ONLY; The egress bytes per second. @@ -15975,13 +12014,6 @@ type VPNClientConnectionHealthDetailListResult struct { Value []*VPNClientConnectionHealthDetail `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetailListResult. -func (v VPNClientConnectionHealthDetailListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VPNClientIPsecParameters - An IPSec parameters for a virtual network gateway P2S connection. type VPNClientIPsecParameters struct { // REQUIRED; The DH Group used in IKE Phase 1 for initial SA. @@ -16027,16 +12059,6 @@ type VPNClientParameters struct { RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNClientParameters. -func (v VPNClientParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authenticationMethod", v.AuthenticationMethod) - populate(objectMap, "clientRootCertificates", v.ClientRootCertificates) - populate(objectMap, "processorArchitecture", v.ProcessorArchitecture) - populate(objectMap, "radiusServerAuthCertificate", v.RadiusServerAuthCertificate) - return json.Marshal(objectMap) -} - // VPNClientRevokedCertificate - VPN client revoked certificate of virtual network gateway. type VPNClientRevokedCertificate struct { // Resource ID. @@ -16110,14 +12132,6 @@ type VPNConnectionPacketCaptureStartParameters struct { LinkConnectionNames []*string `json:"linkConnectionNames,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStartParameters. -func (v VPNConnectionPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "filterData", v.FilterData) - populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) - return json.Marshal(objectMap) -} - // VPNConnectionPacketCaptureStopParameters - Vpn Connection packet capture parameters supplied to stop packet capture on // gateway connection. type VPNConnectionPacketCaptureStopParameters struct { @@ -16128,14 +12142,6 @@ type VPNConnectionPacketCaptureStopParameters struct { SasURL *string `json:"sasUrl,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStopParameters. -func (v VPNConnectionPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) - populate(objectMap, "sasUrl", v.SasURL) - return json.Marshal(objectMap) -} - // VPNConnectionProperties - Parameters for VpnConnection. type VPNConnectionProperties struct { // Expected bandwidth in MBPS. @@ -16196,40 +12202,17 @@ type VPNConnectionProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNConnectionProperties. -func (v VPNConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableInternetSecurity", v.EnableInternetSecurity) - populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "remoteVpnSite", v.RemoteVPNSite) - populate(objectMap, "routingConfiguration", v.RoutingConfiguration) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) - populate(objectMap, "vpnLinkConnections", v.VPNLinkConnections) - return json.Marshal(objectMap) -} - // VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate // method. type VPNConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete method. type VPNConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture @@ -16237,6 +12220,8 @@ type VPNConnectionsClientBeginDeleteOptions struct { 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 @@ -16244,6 +12229,8 @@ type VPNConnectionsClientBeginStartPacketCaptureOptions struct { 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. @@ -16293,19 +12280,6 @@ type VPNGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNGateway. -func (v VPNGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VPNGatewayIPConfiguration - IP Configuration of a VPN Gateway Resource. type VPNGatewayIPConfiguration struct { // The identifier of the IP configuration for a VPN Gateway. @@ -16363,20 +12337,6 @@ type VPNGatewayNatRuleProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRuleProperties. -func (v VPNGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "egressVpnSiteLinkConnections", v.EgressVPNSiteLinkConnections) - populate(objectMap, "externalMappings", v.ExternalMappings) - populate(objectMap, "ipConfigurationId", v.IPConfigurationID) - populate(objectMap, "ingressVpnSiteLinkConnections", v.IngressVPNSiteLinkConnections) - populate(objectMap, "internalMappings", v.InternalMappings) - populate(objectMap, "mode", v.Mode) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VPNGatewayPacketCaptureStartParameters - Start packet capture parameters. type VPNGatewayPacketCaptureStartParameters struct { // Start Packet capture parameters on vpn gateway. @@ -16419,35 +12379,23 @@ type VPNGatewayProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNGatewayProperties. -func (v VPNGatewayProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpSettings", v.BgpSettings) - populate(objectMap, "connections", v.Connections) - populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "isRoutingPreferenceInternet", v.IsRoutingPreferenceInternet) - populate(objectMap, "natRules", v.NatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "vpnGatewayScaleUnit", v.VPNGatewayScaleUnit) - populate(objectMap, "virtualHub", v.VirtualHub) - return json.Marshal(objectMap) -} - // VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate // method. type VPNGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. type VPNGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. type VPNGatewaysClientBeginResetOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture @@ -16455,6 +12403,8 @@ type VPNGatewaysClientBeginResetOptions struct { 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 @@ -16462,11 +12412,14 @@ type VPNGatewaysClientBeginStartPacketCaptureOptions struct { 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNGatewaysClientGetOptions contains the optional parameters for the VPNGatewaysClient.Get method. @@ -16497,13 +12450,15 @@ type VPNLinkBgpSettings struct { // VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas // method. type VPNLinkConnectionsClientBeginGetIkeSasOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection // method. type VPNLinkConnectionsClientBeginResetConnectionOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection @@ -16608,19 +12563,6 @@ type VPNServerConfiguration struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfiguration. -func (v VPNServerConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VPNServerConfigurationProperties - Parameters for VpnServerConfiguration. type VPNServerConfigurationProperties struct { // The set of aad vpn authentication parameters. @@ -16670,43 +12612,25 @@ type VPNServerConfigurationProperties struct { ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationProperties. -func (v VPNServerConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "aadAuthenticationParameters", v.AADAuthenticationParameters) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "name", v.Name) - populate(objectMap, "p2SVpnGateways", v.P2SVPNGateways) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "radiusClientRootCertificates", v.RadiusClientRootCertificates) - populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) - populate(objectMap, "radiusServerRootCertificates", v.RadiusServerRootCertificates) - populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) - populate(objectMap, "radiusServers", v.RadiusServers) - populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) - populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) - populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) - populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) - populate(objectMap, "vpnProtocols", v.VPNProtocols) - return json.Marshal(objectMap) -} - // VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList // method. type VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate // method. type VPNServerConfigurationsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete // method. type VPNServerConfigurationsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNServerConfigurationsClientGetOptions contains the optional parameters for the VPNServerConfigurationsClient.Get method. @@ -16737,13 +12661,6 @@ type VPNServerConfigurationsResponse struct { VPNServerConfigurationResourceIDs []*string `json:"vpnServerConfigurationResourceIds,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationsResponse. -func (v VPNServerConfigurationsResponse) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "vpnServerConfigurationResourceIds", v.VPNServerConfigurationResourceIDs) - return json.Marshal(objectMap) -} - // VPNSite - VpnSite Resource. type VPNSite struct { // Resource ID. @@ -16768,19 +12685,6 @@ type VPNSite struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNSite. -func (v VPNSite) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VPNSiteID - VpnSite Resource. type VPNSiteID struct { // READ-ONLY; The resource-uri of the vpn-site for which config is to be fetched. @@ -16877,29 +12781,6 @@ type VPNSiteLinkConnectionProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnectionProperties. -func (v VPNSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "egressNatRules", v.EgressNatRules) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "ingressNatRules", v.IngressNatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) - populate(objectMap, "vpnLinkConnectionMode", v.VPNLinkConnectionMode) - populate(objectMap, "vpnSiteLink", v.VPNSiteLink) - return json.Marshal(objectMap) -} - // VPNSiteLinkConnectionsClientGetOptions contains the optional parameters for the VPNSiteLinkConnectionsClient.Get method. type VPNSiteLinkConnectionsClientGetOptions struct { // placeholder for future optional parameters @@ -16966,30 +12847,16 @@ type VPNSiteProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VPNSiteProperties. -func (v VPNSiteProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressSpace", v.AddressSpace) - populate(objectMap, "bgpProperties", v.BgpProperties) - populate(objectMap, "deviceProperties", v.DeviceProperties) - populate(objectMap, "ipAddress", v.IPAddress) - populate(objectMap, "isSecuritySite", v.IsSecuritySite) - populate(objectMap, "o365Policy", v.O365Policy) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "siteKey", v.SiteKey) - populate(objectMap, "vpnSiteLinks", v.VPNSiteLinks) - populate(objectMap, "virtualWan", v.VirtualWan) - return json.Marshal(objectMap) -} - // VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate method. type VPNSitesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. type VPNSitesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VPNSitesClientGetOptions contains the optional parameters for the VPNSitesClient.Get method. @@ -17015,7 +12882,8 @@ type VPNSitesClientUpdateTagsOptions struct { // VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload // method. type VPNSitesConfigurationClientBeginDownloadOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VerificationIPFlowParameters - Parameters that define the IP flow to be verified. @@ -17084,20 +12952,6 @@ type VirtualAppliance struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualAppliance. -func (v VirtualAppliance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "identity", v.Identity) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualApplianceListResult - Response for ListNetworkVirtualAppliances API service call. type VirtualApplianceListResult struct { // URL to get the next set of results. @@ -17107,14 +12961,6 @@ type VirtualApplianceListResult struct { Value []*VirtualAppliance `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceListResult. -func (v VirtualApplianceListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualApplianceNicProperties - Network Virtual Appliance NIC properties. type VirtualApplianceNicProperties struct { // READ-ONLY; NIC name. @@ -17166,24 +13012,6 @@ type VirtualAppliancePropertiesFormat struct { VirtualApplianceSites []*SubResource `json:"virtualApplianceSites,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormat. -func (v VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", v.AddressPrefix) - populate(objectMap, "bootStrapConfigurationBlobs", v.BootStrapConfigurationBlobs) - populate(objectMap, "cloudInitConfiguration", v.CloudInitConfiguration) - populate(objectMap, "cloudInitConfigurationBlobs", v.CloudInitConfigurationBlobs) - populate(objectMap, "inboundSecurityRules", v.InboundSecurityRules) - populate(objectMap, "nvaSku", v.NvaSKU) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "sshPublicKey", v.SSHPublicKey) - populate(objectMap, "virtualApplianceAsn", v.VirtualApplianceAsn) - populate(objectMap, "virtualApplianceNics", v.VirtualApplianceNics) - populate(objectMap, "virtualApplianceSites", v.VirtualApplianceSites) - populate(objectMap, "virtualHub", v.VirtualHub) - return json.Marshal(objectMap) -} - // VirtualApplianceSKU - Definition of the NetworkVirtualApplianceSkus resource. type VirtualApplianceSKU struct { // Resource ID. @@ -17208,19 +13036,6 @@ type VirtualApplianceSKU struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKU. -func (v VirtualApplianceSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualApplianceSKUInstances - List of available Sku and instances. type VirtualApplianceSKUInstances struct { // READ-ONLY; Instance Count. @@ -17239,14 +13054,6 @@ type VirtualApplianceSKUListResult struct { Value []*VirtualApplianceSKU `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUListResult. -func (v VirtualApplianceSKUListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualApplianceSKUProperties - Network Virtual Appliance Sku Properties. type VirtualApplianceSKUProperties struct { // Virtual Appliance Scale Unit. @@ -17271,15 +13078,6 @@ type VirtualApplianceSKUPropertiesFormat struct { Vendor *string `json:"vendor,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUPropertiesFormat. -func (v VirtualApplianceSKUPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "availableScaleUnits", v.AvailableScaleUnits) - populate(objectMap, "availableVersions", v.AvailableVersions) - populate(objectMap, "vendor", v.Vendor) - return json.Marshal(objectMap) -} - // VirtualApplianceSKUsClientGetOptions contains the optional parameters for the VirtualApplianceSKUsClient.Get method. type VirtualApplianceSKUsClientGetOptions struct { // placeholder for future optional parameters @@ -17317,14 +13115,6 @@ type VirtualApplianceSiteListResult struct { Value []*VirtualApplianceSite `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteListResult. -func (v VirtualApplianceSiteListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualApplianceSiteProperties - Properties of the rule group. type VirtualApplianceSiteProperties struct { // Address Prefix. @@ -17340,13 +13130,15 @@ type VirtualApplianceSiteProperties struct { // VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate // method. type VirtualApplianceSitesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete // method. type VirtualApplianceSitesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualApplianceSitesClientGetOptions contains the optional parameters for the VirtualApplianceSitesClient.Get method. @@ -17362,13 +13154,15 @@ type VirtualApplianceSitesClientListOptions struct { // VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate // method. type VirtualAppliancesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete // method. type VirtualAppliancesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualAppliancesClientGetOptions contains the optional parameters for the VirtualAppliancesClient.Get method. @@ -17420,30 +13214,18 @@ type VirtualHub struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHub. -func (v VirtualHub) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "kind", v.Kind) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate // method. type VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete // method. type VirtualHubBgpConnectionClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubBgpConnectionClientGetOptions contains the optional parameters for the VirtualHubBgpConnectionClient.Get method. @@ -17454,13 +13236,15 @@ type VirtualHubBgpConnectionClientGetOptions struct { // VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes // method. type VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes // method. type VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List @@ -17487,30 +13271,12 @@ type VirtualHubEffectiveRoute struct { RouteOrigin *string `json:"routeOrigin,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRoute. -func (v VirtualHubEffectiveRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", v.AddressPrefixes) - populate(objectMap, "asPath", v.AsPath) - populate(objectMap, "nextHopType", v.NextHopType) - populate(objectMap, "nextHops", v.NextHops) - populate(objectMap, "routeOrigin", v.RouteOrigin) - return json.Marshal(objectMap) -} - // VirtualHubEffectiveRouteList - EffectiveRoutes List. type VirtualHubEffectiveRouteList struct { // The list of effective routes configured on the virtual hub or the specified resource. Value []*VirtualHubEffectiveRoute `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRouteList. -func (v VirtualHubEffectiveRouteList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualHubID - Virtual Hub identifier. type VirtualHubID struct { // The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be deployed. The Virtual Hub resource and @@ -17521,13 +13287,15 @@ type VirtualHubID struct { // VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate // method. type VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete // method. type VirtualHubIPConfigurationClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubIPConfigurationClientGetOptions contains the optional parameters for the VirtualHubIPConfigurationClient.Get @@ -17602,31 +13370,6 @@ type VirtualHubProperties struct { RoutingState *RoutingState `json:"routingState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubProperties. -func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefix", v.AddressPrefix) - populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) - populate(objectMap, "azureFirewall", v.AzureFirewall) - populate(objectMap, "bgpConnections", v.BgpConnections) - populate(objectMap, "expressRouteGateway", v.ExpressRouteGateway) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "p2SVpnGateway", v.P2SVPNGateway) - populate(objectMap, "preferredRoutingGateway", v.PreferredRoutingGateway) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routeTable", v.RouteTable) - populate(objectMap, "routingState", v.RoutingState) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "securityPartnerProvider", v.SecurityPartnerProvider) - populate(objectMap, "securityProviderName", v.SecurityProviderName) - populate(objectMap, "vpnGateway", v.VPNGateway) - populate(objectMap, "virtualHubRouteTableV2s", v.VirtualHubRouteTableV2S) - populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) - populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) - populate(objectMap, "virtualWan", v.VirtualWan) - return json.Marshal(objectMap) -} - // VirtualHubRoute - VirtualHub route. type VirtualHubRoute struct { // List of all addressPrefixes. @@ -17636,27 +13379,12 @@ type VirtualHubRoute struct { NextHopIPAddress *string `json:"nextHopIpAddress,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRoute. -func (v VirtualHubRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressPrefixes", v.AddressPrefixes) - populate(objectMap, "nextHopIpAddress", v.NextHopIPAddress) - return json.Marshal(objectMap) -} - // VirtualHubRouteTable - VirtualHub route table. type VirtualHubRouteTable struct { // List of all routes. Routes []*VirtualHubRoute `json:"routes,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTable. -func (v VirtualHubRouteTable) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "routes", v.Routes) - return json.Marshal(objectMap) -} - // VirtualHubRouteTableV2 Resource. type VirtualHubRouteTableV2 struct { // Resource ID. @@ -17684,25 +13412,18 @@ type VirtualHubRouteTableV2Properties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2Properties. -func (v VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "attachedConnections", v.AttachedConnections) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "routes", v.Routes) - return json.Marshal(objectMap) -} - // VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate // method. type VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete // method. type VirtualHubRouteTableV2SClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubRouteTableV2SClientGetOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.Get method. @@ -17730,25 +13451,17 @@ type VirtualHubRouteV2 struct { NextHops []*string `json:"nextHops,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteV2. -func (v VirtualHubRouteV2) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationType", v.DestinationType) - populate(objectMap, "destinations", v.Destinations) - populate(objectMap, "nextHopType", v.NextHopType) - populate(objectMap, "nextHops", v.NextHops) - return json.Marshal(objectMap) -} - // VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate // method. type VirtualHubsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. type VirtualHubsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes @@ -17756,6 +13469,8 @@ type VirtualHubsClientBeginDeleteOptions struct { 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 } // VirtualHubsClientGetOptions contains the optional parameters for the VirtualHubsClient.Get method. @@ -17806,20 +13521,6 @@ type VirtualNetwork struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetwork. -func (v VirtualNetwork) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "extendedLocation", v.ExtendedLocation) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkBgpCommunities - Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this // VNET. type VirtualNetworkBgpCommunities struct { @@ -17873,20 +13574,6 @@ type VirtualNetworkGateway struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGateway. -func (v VirtualNetworkGateway) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "extendedLocation", v.ExtendedLocation) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnection - A common class for general resource information. type VirtualNetworkGatewayConnection struct { // REQUIRED; Properties of the virtual network gateway connection. @@ -17911,19 +13598,6 @@ type VirtualNetworkGatewayConnection struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnection. -func (v VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnectionListEntity - A common class for general resource information. type VirtualNetworkGatewayConnectionListEntity struct { // REQUIRED; Properties of the virtual network gateway connection. @@ -17948,19 +13622,6 @@ type VirtualNetworkGatewayConnectionListEntity struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntity. -func (v VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnectionListEntityPropertiesFormat - VirtualNetworkGatewayConnection properties. type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { // REQUIRED; Gateway connection type. @@ -18027,33 +13688,6 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { TunnelConnectionStatus []*TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. -func (v VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", v.AuthorizationKey) - populate(objectMap, "connectionMode", v.ConnectionMode) - populate(objectMap, "connectionProtocol", v.ConnectionProtocol) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "connectionType", v.ConnectionType) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) - populate(objectMap, "peer", v.Peer) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) - populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnectionListResult - Response for the ListVirtualNetworkGatewayConnections API service call. type VirtualNetworkGatewayConnectionListResult struct { // A list of VirtualNetworkGatewayConnection resources that exists in a resource group. @@ -18063,14 +13697,6 @@ type VirtualNetworkGatewayConnectionListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListResult. -func (v VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnectionPropertiesFormat - VirtualNetworkGatewayConnection properties. type VirtualNetworkGatewayConnectionPropertiesFormat struct { // REQUIRED; Gateway connection type. @@ -18149,71 +13775,46 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { TunnelConnectionStatus []*TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. -func (v VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "authorizationKey", v.AuthorizationKey) - populate(objectMap, "connectionMode", v.ConnectionMode) - populate(objectMap, "connectionProtocol", v.ConnectionProtocol) - populate(objectMap, "connectionStatus", v.ConnectionStatus) - populate(objectMap, "connectionType", v.ConnectionType) - populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) - populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) - populate(objectMap, "egressNatRules", v.EgressNatRules) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) - populate(objectMap, "ipsecPolicies", v.IPSecPolicies) - populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) - populate(objectMap, "ingressNatRules", v.IngressNatRules) - populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) - populate(objectMap, "peer", v.Peer) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "routingWeight", v.RoutingWeight) - populate(objectMap, "sharedKey", v.SharedKey) - populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) - populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) - populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) - populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) - populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) - populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate // method. type VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete // method. type VirtualNetworkGatewayConnectionsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas // method. type VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection // method. type VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey // method. type VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey // method. type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture @@ -18221,18 +13822,22 @@ type VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions struct { 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags // method. type VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayConnectionsClientGetOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.Get @@ -18295,14 +13900,6 @@ type VirtualNetworkGatewayListConnectionsResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListConnectionsResult. -func (v VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayListResult - Response for the ListVirtualNetworkGateways API service call. type VirtualNetworkGatewayListResult struct { // A list of VirtualNetworkGateway resources that exists in a resource group. @@ -18312,14 +13909,6 @@ type VirtualNetworkGatewayListResult struct { NextLink *string `json:"nextLink,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListResult. -func (v VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayNatRule Resource. type VirtualNetworkGatewayNatRule struct { // Resource ID. @@ -18359,28 +13948,18 @@ type VirtualNetworkGatewayNatRuleProperties struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRuleProperties. -func (v VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "externalMappings", v.ExternalMappings) - populate(objectMap, "ipConfigurationId", v.IPConfigurationID) - populate(objectMap, "internalMappings", v.InternalMappings) - populate(objectMap, "mode", v.Mode) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate // method. type VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete // method. type VirtualNetworkGatewayNatRulesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewayNatRulesClientGetOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.Get @@ -18460,32 +14039,6 @@ type VirtualNetworkGatewayPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPropertiesFormat. -func (v VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "activeActive", v.Active) - populate(objectMap, "bgpSettings", v.BgpSettings) - populate(objectMap, "customRoutes", v.CustomRoutes) - populate(objectMap, "disableIPSecReplayProtection", v.DisableIPSecReplayProtection) - populate(objectMap, "enableBgp", v.EnableBgp) - populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) - populate(objectMap, "enableDnsForwarding", v.EnableDNSForwarding) - populate(objectMap, "enablePrivateIpAddress", v.EnablePrivateIPAddress) - populate(objectMap, "gatewayDefaultSite", v.GatewayDefaultSite) - populate(objectMap, "gatewayType", v.GatewayType) - populate(objectMap, "ipConfigurations", v.IPConfigurations) - populate(objectMap, "inboundDnsForwardingEndpoint", v.InboundDNSForwardingEndpoint) - populate(objectMap, "natRules", v.NatRules) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "sku", v.SKU) - populate(objectMap, "vNetExtendedLocationResourceId", v.VNetExtendedLocationResourceID) - populate(objectMap, "vpnClientConfiguration", v.VPNClientConfiguration) - populate(objectMap, "vpnGatewayGeneration", v.VPNGatewayGeneration) - populate(objectMap, "vpnType", v.VPNType) - return json.Marshal(objectMap) -} - // VirtualNetworkGatewaySKU - VirtualNetworkGatewaySku details. type VirtualNetworkGatewaySKU struct { // Gateway SKU name. @@ -18501,37 +14054,43 @@ type VirtualNetworkGatewaySKU struct { // VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate // method. type VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete // method. type VirtualNetworkGatewaysClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters // for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. type VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile // method. type VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage // method. type VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes // method. type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus @@ -18539,30 +14098,36 @@ type VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions struct { 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL // method. type VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth // method. type VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters // method. type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset @@ -18570,18 +14135,22 @@ type VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions struct 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters // method. type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture @@ -18589,18 +14158,22 @@ type VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions struct 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 { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags // method. type VirtualNetworkGatewaysClientBeginUpdateTagsOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkGatewaysClientGetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.Get method. @@ -18640,14 +14213,6 @@ type VirtualNetworkListResult struct { Value []*VirtualNetwork `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResult. -func (v VirtualNetworkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkListUsageResult - Response for the virtual networks GetUsage API service call. type VirtualNetworkListUsageResult struct { // The URL to get the next set of results. @@ -18657,14 +14222,6 @@ type VirtualNetworkListUsageResult struct { Value []*VirtualNetworkUsage `json:"value,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListUsageResult. -func (v VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkPeering - Peerings in a virtual network resource. type VirtualNetworkPeering struct { // Resource ID. @@ -18693,14 +14250,6 @@ type VirtualNetworkPeeringListResult struct { Value []*VirtualNetworkPeering `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringListResult. -func (v VirtualNetworkPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkPeeringPropertiesFormat - Properties of the virtual network peering. type VirtualNetworkPeeringPropertiesFormat struct { // Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network. @@ -18754,6 +14303,8 @@ type VirtualNetworkPeeringPropertiesFormat struct { // 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 } @@ -18761,7 +14312,8 @@ type VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions struct { // VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete // method. type VirtualNetworkPeeringsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkPeeringsClientGetOptions contains the optional parameters for the VirtualNetworkPeeringsClient.Get method. @@ -18817,25 +14369,6 @@ type VirtualNetworkPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesFormat. -func (v VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "addressSpace", v.AddressSpace) - populate(objectMap, "bgpCommunities", v.BgpCommunities) - populate(objectMap, "ddosProtectionPlan", v.DdosProtectionPlan) - populate(objectMap, "dhcpOptions", v.DhcpOptions) - populate(objectMap, "enableDdosProtection", v.EnableDdosProtection) - populate(objectMap, "enableVmProtection", v.EnableVMProtection) - populate(objectMap, "encryption", v.Encryption) - populate(objectMap, "flowTimeoutInMinutes", v.FlowTimeoutInMinutes) - populate(objectMap, "ipAllocations", v.IPAllocations) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - populate(objectMap, "subnets", v.Subnets) - populate(objectMap, "virtualNetworkPeerings", v.VirtualNetworkPeerings) - return json.Marshal(objectMap) -} - // VirtualNetworkTap - Virtual Network Tap resource. type VirtualNetworkTap struct { // Resource ID. @@ -18860,19 +14393,6 @@ type VirtualNetworkTap struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTap. -func (v VirtualNetworkTap) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualNetworkTapListResult - Response for ListVirtualNetworkTap API service call. type VirtualNetworkTapListResult struct { // The URL to get the next set of results. @@ -18882,14 +14402,6 @@ type VirtualNetworkTapListResult struct { Value []*VirtualNetworkTap `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapListResult. -func (v VirtualNetworkTapListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualNetworkTapPropertiesFormat - Virtual Network Tap properties. type VirtualNetworkTapPropertiesFormat struct { // The reference to the private IP address on the internal Load Balancer that will receive the tap. @@ -18911,28 +14423,18 @@ type VirtualNetworkTapPropertiesFormat struct { ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapPropertiesFormat. -func (v VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "destinationLoadBalancerFrontEndIPConfiguration", v.DestinationLoadBalancerFrontEndIPConfiguration) - populate(objectMap, "destinationNetworkInterfaceIPConfiguration", v.DestinationNetworkInterfaceIPConfiguration) - populate(objectMap, "destinationPort", v.DestinationPort) - populate(objectMap, "networkInterfaceTapConfigurations", v.NetworkInterfaceTapConfigurations) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "resourceGuid", v.ResourceGUID) - return json.Marshal(objectMap) -} - // VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate // method. type VirtualNetworkTapsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete // method. type VirtualNetworkTapsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworkTapsClientGetOptions contains the optional parameters for the VirtualNetworkTapsClient.Get method. @@ -18987,12 +14489,14 @@ type VirtualNetworkUsageName struct { // VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate // method. type VirtualNetworksClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method. type VirtualNetworksClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualNetworksClientCheckIPAddressAvailabilityOptions contains the optional parameters for the VirtualNetworksClient.CheckIPAddressAvailability @@ -19051,19 +14555,6 @@ type VirtualRouter struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualRouter. -func (v VirtualRouter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualRouterListResult - Response for ListVirtualRouters API service call. type VirtualRouterListResult struct { // URL to get the next set of results. @@ -19073,14 +14564,6 @@ type VirtualRouterListResult struct { Value []*VirtualRouter `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterListResult. -func (v VirtualRouterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualRouterPeering - Virtual Router Peering resource. type VirtualRouterPeering struct { // Resource ID. @@ -19108,14 +14591,6 @@ type VirtualRouterPeeringListResult struct { Value []*VirtualRouterPeering `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringListResult. -func (v VirtualRouterPeeringListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", v.NextLink) - populate(objectMap, "value", v.Value) - return json.Marshal(objectMap) -} - // VirtualRouterPeeringProperties - Properties of the rule group. type VirtualRouterPeeringProperties struct { // Peer ASN. @@ -19131,13 +14606,15 @@ type VirtualRouterPeeringProperties struct { // VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate // method. type VirtualRouterPeeringsClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete // method. type VirtualRouterPeeringsClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualRouterPeeringsClientGetOptions contains the optional parameters for the VirtualRouterPeeringsClient.Get method. @@ -19171,27 +14648,17 @@ type VirtualRouterPropertiesFormat struct { ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPropertiesFormat. -func (v VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "hostedGateway", v.HostedGateway) - populate(objectMap, "hostedSubnet", v.HostedSubnet) - populate(objectMap, "peerings", v.Peerings) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) - populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) - return json.Marshal(objectMap) -} - // VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate // method. type VirtualRoutersClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete method. type VirtualRoutersClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualRoutersClientGetOptions contains the optional parameters for the VirtualRoutersClient.Get method. @@ -19235,19 +14702,6 @@ type VirtualWAN struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualWAN. -func (v VirtualWAN) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", v.Etag) - populate(objectMap, "id", v.ID) - populate(objectMap, "location", v.Location) - populate(objectMap, "name", v.Name) - populate(objectMap, "properties", v.Properties) - populate(objectMap, "tags", v.Tags) - populate(objectMap, "type", v.Type) - return json.Marshal(objectMap) -} - // VirtualWanProperties - Parameters for VirtualWAN. type VirtualWanProperties struct { // True if branch to branch traffic is allowed. @@ -19275,20 +14729,6 @@ type VirtualWanProperties struct { VirtualHubs []*SubResource `json:"virtualHubs,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualWanProperties. -func (v VirtualWanProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) - populate(objectMap, "allowVnetToVnetTraffic", v.AllowVnetToVnetTraffic) - populate(objectMap, "disableVpnEncryption", v.DisableVPNEncryption) - populate(objectMap, "office365LocalBreakoutCategory", v.Office365LocalBreakoutCategory) - populate(objectMap, "provisioningState", v.ProvisioningState) - populate(objectMap, "type", v.Type) - populate(objectMap, "vpnSites", v.VPNSites) - populate(objectMap, "virtualHubs", v.VirtualHubs) - return json.Marshal(objectMap) -} - // VirtualWanSecurityProvider - Collection of SecurityProviders. type VirtualWanSecurityProvider struct { // Name of the security provider. @@ -19307,13 +14747,6 @@ type VirtualWanSecurityProviders struct { SupportedProviders []*VirtualWanSecurityProvider `json:"supportedProviders,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProviders. -func (v VirtualWanSecurityProviders) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "supportedProviders", v.SupportedProviders) - return json.Marshal(objectMap) -} - // VirtualWanVPNProfileParameters - Virtual Wan Vpn profile parameters Vpn profile generation. type VirtualWanVPNProfileParameters struct { // VPN client authentication method. @@ -19326,12 +14759,14 @@ type VirtualWanVPNProfileParameters struct { // VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate // method. type VirtualWansClientBeginCreateOrUpdateOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. type VirtualWansClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // VirtualWansClientGetOptions contains the optional parameters for the VirtualWansClient.Get method. @@ -19364,14 +14799,6 @@ type VnetRoute struct { BgpConnections []*SubResource `json:"bgpConnections,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type VnetRoute. -func (v VnetRoute) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "bgpConnections", v.BgpConnections) - populate(objectMap, "staticRoutes", v.StaticRoutes) - return json.Marshal(objectMap) -} - // Watcher - Network watcher in a resource group. type Watcher struct { // Resource ID. @@ -19396,32 +14823,12 @@ type Watcher struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type Watcher. -func (w Watcher) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - // WatcherListResult - Response for ListNetworkWatchers API service call. type WatcherListResult struct { // List of network watcher resources. Value []*Watcher `json:"value,omitempty"` } -// MarshalJSON implements the json.Marshaller interface for type WatcherListResult. -func (w WatcherListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - // WatcherPropertiesFormat - The network watcher properties. type WatcherPropertiesFormat struct { // READ-ONLY; The provisioning state of the network watcher resource. @@ -19431,70 +14838,82 @@ type WatcherPropertiesFormat struct { // WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity // method. type WatchersClientBeginCheckConnectivityOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. type WatchersClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport // method. type WatchersClientBeginGetAzureReachabilityReportOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus // method. type WatchersClientBeginGetFlowLogStatusOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic // method. type WatchersClientBeginGetNetworkConfigurationDiagnosticOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop method. type WatchersClientBeginGetNextHopOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting // method. type WatchersClientBeginGetTroubleshootingOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult // method. type WatchersClientBeginGetTroubleshootingResultOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules // method. type WatchersClientBeginGetVMSecurityRulesOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders // method. type WatchersClientBeginListAvailableProvidersOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration // method. type WatchersClientBeginSetFlowLogConfigurationOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow method. type WatchersClientBeginVerifyIPFlowOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WatchersClientCreateOrUpdateOptions contains the optional parameters for the WatchersClient.CreateOrUpdate method. @@ -19548,22 +14967,11 @@ type WebApplicationFirewallCustomRule struct { Etag *string `json:"etag,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallCustomRule. -func (w WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "action", w.Action) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "matchConditions", w.MatchConditions) - populate(objectMap, "name", w.Name) - populate(objectMap, "priority", w.Priority) - populate(objectMap, "ruleType", w.RuleType) - return json.Marshal(objectMap) -} - // WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete // method. type WebApplicationFirewallPoliciesClientBeginDeleteOptions struct { - // placeholder for future optional parameters + // Resumes the LRO from the provided token. + ResumeToken string } // WebApplicationFirewallPoliciesClientCreateOrUpdateOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.CreateOrUpdate @@ -19614,19 +15022,6 @@ type WebApplicationFirewallPolicy struct { Type *string `json:"type,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. -func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "etag", w.Etag) - populate(objectMap, "id", w.ID) - populate(objectMap, "location", w.Location) - populate(objectMap, "name", w.Name) - populate(objectMap, "properties", w.Properties) - populate(objectMap, "tags", w.Tags) - populate(objectMap, "type", w.Type) - return json.Marshal(objectMap) -} - // WebApplicationFirewallPolicyListResult - 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. type WebApplicationFirewallPolicyListResult struct { @@ -19637,14 +15032,6 @@ type WebApplicationFirewallPolicyListResult struct { Value []*WebApplicationFirewallPolicy `json:"value,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyListResult. -func (w WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "nextLink", w.NextLink) - populate(objectMap, "value", w.Value) - return json.Marshal(objectMap) -} - // WebApplicationFirewallPolicyPropertiesFormat - Defines web application firewall policy properties. type WebApplicationFirewallPolicyPropertiesFormat struct { // REQUIRED; Describes the managedRules structure. @@ -19672,20 +15059,6 @@ type WebApplicationFirewallPolicyPropertiesFormat struct { ResourceState *WebApplicationFirewallPolicyResourceState `json:"resourceState,omitempty" azure:"ro"` } -// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. -func (w WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - populate(objectMap, "applicationGateways", w.ApplicationGateways) - populate(objectMap, "customRules", w.CustomRules) - populate(objectMap, "httpListeners", w.HTTPListeners) - populate(objectMap, "managedRules", w.ManagedRules) - populate(objectMap, "pathBasedRules", w.PathBasedRules) - populate(objectMap, "policySettings", w.PolicySettings) - populate(objectMap, "provisioningState", w.ProvisioningState) - populate(objectMap, "resourceState", w.ResourceState) - return json.Marshal(objectMap) -} - // WebCategoriesClientGetOptions contains the optional parameters for the WebCategoriesClient.Get method. type WebCategoriesClientGetOptions struct { // Expands resourceIds back referenced by the azureWebCategory resource. @@ -19697,20 +15070,3 @@ type WebCategoriesClientGetOptions struct { type WebCategoriesClientListBySubscriptionOptions struct { // placeholder for future optional parameters } - -func populate(m map[string]interface{}, k string, v interface{}) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else if !reflect.ValueOf(v).IsNil() { - m[k] = v - } -} - -func unpopulate(data json.RawMessage, v interface{}) error { - if data == nil { - return nil - } - return json.Unmarshal(data, v) -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go b/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go new file mode 100644 index 000000000000..0ef8e176ef3d --- /dev/null +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_models_serde.go @@ -0,0 +1,4895 @@ +//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. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armnetwork + +import ( + "encoding/json" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "reflect" +) + +// MarshalJSON implements the json.Marshaller interface for type AddressSpace. +func (a AddressSpace) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefixes", a.AddressPrefixes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGateway. +func (a ApplicationGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "identity", a.Identity) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptions. +func (a ApplicationGatewayAvailableSSLOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLOptionsPropertiesFormat. +func (a ApplicationGatewayAvailableSSLOptionsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availableCipherSuites", a.AvailableCipherSuites) + populate(objectMap, "availableProtocols", a.AvailableProtocols) + populate(objectMap, "defaultPolicy", a.DefaultPolicy) + populate(objectMap, "predefinedPolicies", a.PredefinedPolicies) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableSSLPredefinedPolicies. +func (a ApplicationGatewayAvailableSSLPredefinedPolicies) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayAvailableWafRuleSetsResult. +func (a ApplicationGatewayAvailableWafRuleSetsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendAddressPoolPropertiesFormat. +func (a ApplicationGatewayBackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddresses", a.BackendAddresses) + populate(objectMap, "backendIPConfigurations", a.BackendIPConfigurations) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHTTPSettingsPropertiesFormat. +func (a ApplicationGatewayBackendHTTPSettingsPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "affinityCookieName", a.AffinityCookieName) + populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) + populate(objectMap, "connectionDraining", a.ConnectionDraining) + populate(objectMap, "cookieBasedAffinity", a.CookieBasedAffinity) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "path", a.Path) + populate(objectMap, "pickHostNameFromBackendAddress", a.PickHostNameFromBackendAddress) + populate(objectMap, "port", a.Port) + populate(objectMap, "probe", a.Probe) + populate(objectMap, "probeEnabled", a.ProbeEnabled) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "requestTimeout", a.RequestTimeout) + populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealth. +func (a ApplicationGatewayBackendHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddressPools", a.BackendAddressPools) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthHTTPSettings. +func (a ApplicationGatewayBackendHealthHTTPSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "servers", a.Servers) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayBackendHealthPool. +func (a ApplicationGatewayBackendHealthPool) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallDisabledRuleGroup. +func (a ApplicationGatewayFirewallDisabledRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ruleGroupName", a.RuleGroupName) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleGroup. +func (a ApplicationGatewayFirewallRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "ruleGroupName", a.RuleGroupName) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSet. +func (a ApplicationGatewayFirewallRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayFirewallRuleSetPropertiesFormat. +func (a ApplicationGatewayFirewallRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "ruleGroups", a.RuleGroups) + populate(objectMap, "ruleSetType", a.RuleSetType) + populate(objectMap, "ruleSetVersion", a.RuleSetVersion) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayHTTPListenerPropertiesFormat. +func (a ApplicationGatewayHTTPListenerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "frontendIPConfiguration", a.FrontendIPConfiguration) + populate(objectMap, "frontendPort", a.FrontendPort) + populate(objectMap, "hostName", a.HostName) + populate(objectMap, "hostNames", a.HostNames) + populate(objectMap, "protocol", a.Protocol) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "requireServerNameIndication", a.RequireServerNameIndication) + populate(objectMap, "sslCertificate", a.SSLCertificate) + populate(objectMap, "sslProfile", a.SSLProfile) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayListResult. +func (a ApplicationGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayLoadDistributionPolicyPropertiesFormat. +func (a ApplicationGatewayLoadDistributionPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "loadDistributionAlgorithm", a.LoadDistributionAlgorithm) + populate(objectMap, "loadDistributionTargets", a.LoadDistributionTargets) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPathRulePropertiesFormat. +func (a ApplicationGatewayPathRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddressPool", a.BackendAddressPool) + populate(objectMap, "backendHttpSettings", a.BackendHTTPSettings) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "loadDistributionPolicy", a.LoadDistributionPolicy) + populate(objectMap, "paths", a.Paths) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "redirectConfiguration", a.RedirectConfiguration) + populate(objectMap, "rewriteRuleSet", a.RewriteRuleSet) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateEndpointConnectionListResult. +func (a ApplicationGatewayPrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkConfigurationProperties. +func (a ApplicationGatewayPrivateLinkConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipConfigurations", a.IPConfigurations) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceListResult. +func (a ApplicationGatewayPrivateLinkResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPrivateLinkResourceProperties. +func (a ApplicationGatewayPrivateLinkResourceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupId", a.GroupID) + populate(objectMap, "requiredMembers", a.RequiredMembers) + populate(objectMap, "requiredZoneNames", a.RequiredZoneNames) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayProbeHealthResponseMatch. +func (a ApplicationGatewayProbeHealthResponseMatch) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "body", a.Body) + populate(objectMap, "statusCodes", a.StatusCodes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayPropertiesFormat. +func (a ApplicationGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authenticationCertificates", a.AuthenticationCertificates) + populate(objectMap, "autoscaleConfiguration", a.AutoscaleConfiguration) + populate(objectMap, "backendAddressPools", a.BackendAddressPools) + populate(objectMap, "backendHttpSettingsCollection", a.BackendHTTPSettingsCollection) + populate(objectMap, "customErrorConfigurations", a.CustomErrorConfigurations) + populate(objectMap, "enableFips", a.EnableFips) + populate(objectMap, "enableHttp2", a.EnableHTTP2) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "forceFirewallPolicyAssociation", a.ForceFirewallPolicyAssociation) + populate(objectMap, "frontendIPConfigurations", a.FrontendIPConfigurations) + populate(objectMap, "frontendPorts", a.FrontendPorts) + populate(objectMap, "gatewayIPConfigurations", a.GatewayIPConfigurations) + populate(objectMap, "globalConfiguration", a.GlobalConfiguration) + populate(objectMap, "httpListeners", a.HTTPListeners) + populate(objectMap, "loadDistributionPolicies", a.LoadDistributionPolicies) + populate(objectMap, "operationalState", a.OperationalState) + populate(objectMap, "privateEndpointConnections", a.PrivateEndpointConnections) + populate(objectMap, "privateLinkConfigurations", a.PrivateLinkConfigurations) + populate(objectMap, "probes", a.Probes) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "redirectConfigurations", a.RedirectConfigurations) + populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) + populate(objectMap, "resourceGuid", a.ResourceGUID) + populate(objectMap, "rewriteRuleSets", a.RewriteRuleSets) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "sslCertificates", a.SSLCertificates) + populate(objectMap, "sslPolicy", a.SSLPolicy) + populate(objectMap, "sslProfiles", a.SSLProfiles) + populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) + populate(objectMap, "trustedRootCertificates", a.TrustedRootCertificates) + populate(objectMap, "urlPathMaps", a.URLPathMaps) + populate(objectMap, "webApplicationFirewallConfiguration", a.WebApplicationFirewallConfiguration) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRedirectConfigurationPropertiesFormat. +func (a ApplicationGatewayRedirectConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "includePath", a.IncludePath) + populate(objectMap, "includeQueryString", a.IncludeQueryString) + populate(objectMap, "pathRules", a.PathRules) + populate(objectMap, "redirectType", a.RedirectType) + populate(objectMap, "requestRoutingRules", a.RequestRoutingRules) + populate(objectMap, "targetListener", a.TargetListener) + populate(objectMap, "targetUrl", a.TargetURL) + populate(objectMap, "urlPathMaps", a.URLPathMaps) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRule. +func (a ApplicationGatewayRewriteRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actionSet", a.ActionSet) + populate(objectMap, "conditions", a.Conditions) + populate(objectMap, "name", a.Name) + populate(objectMap, "ruleSequence", a.RuleSequence) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleActionSet. +func (a ApplicationGatewayRewriteRuleActionSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "requestHeaderConfigurations", a.RequestHeaderConfigurations) + populate(objectMap, "responseHeaderConfigurations", a.ResponseHeaderConfigurations) + populate(objectMap, "urlConfiguration", a.URLConfiguration) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayRewriteRuleSetPropertiesFormat. +func (a ApplicationGatewayRewriteRuleSetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rewriteRules", a.RewriteRules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPolicy. +func (a ApplicationGatewaySSLPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cipherSuites", a.CipherSuites) + populate(objectMap, "disabledSslProtocols", a.DisabledSSLProtocols) + populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) + populate(objectMap, "policyName", a.PolicyName) + populate(objectMap, "policyType", a.PolicyType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLPredefinedPolicyPropertiesFormat. +func (a ApplicationGatewaySSLPredefinedPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cipherSuites", a.CipherSuites) + populate(objectMap, "minProtocolVersion", a.MinProtocolVersion) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewaySSLProfilePropertiesFormat. +func (a ApplicationGatewaySSLProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "clientAuthConfiguration", a.ClientAuthConfiguration) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sslPolicy", a.SSLPolicy) + populate(objectMap, "trustedClientCertificates", a.TrustedClientCertificates) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayURLPathMapPropertiesFormat. +func (a ApplicationGatewayURLPathMapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultBackendAddressPool", a.DefaultBackendAddressPool) + populate(objectMap, "defaultBackendHttpSettings", a.DefaultBackendHTTPSettings) + populate(objectMap, "defaultLoadDistributionPolicy", a.DefaultLoadDistributionPolicy) + populate(objectMap, "defaultRedirectConfiguration", a.DefaultRedirectConfiguration) + populate(objectMap, "defaultRewriteRuleSet", a.DefaultRewriteRuleSet) + populate(objectMap, "pathRules", a.PathRules) + populate(objectMap, "provisioningState", a.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationGatewayWebApplicationFirewallConfiguration. +func (a ApplicationGatewayWebApplicationFirewallConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "disabledRuleGroups", a.DisabledRuleGroups) + populate(objectMap, "enabled", a.Enabled) + populate(objectMap, "exclusions", a.Exclusions) + populate(objectMap, "fileUploadLimitInMb", a.FileUploadLimitInMb) + populate(objectMap, "firewallMode", a.FirewallMode) + populate(objectMap, "maxRequestBodySize", a.MaxRequestBodySize) + populate(objectMap, "maxRequestBodySizeInKb", a.MaxRequestBodySizeInKb) + populate(objectMap, "requestBodyCheck", a.RequestBodyCheck) + populate(objectMap, "ruleSetType", a.RuleSetType) + populate(objectMap, "ruleSetVersion", a.RuleSetVersion) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type ApplicationRule. +func (a *ApplicationRule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Name: a.Name, + Description: a.Description, + RuleType: a.RuleType, + } +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationRule. +func (a ApplicationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "fqdnTags", a.FqdnTags) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + objectMap["ruleType"] = FirewallPolicyRuleTypeApplicationRule + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "targetFqdns", a.TargetFqdns) + populate(objectMap, "targetUrls", a.TargetUrls) + populate(objectMap, "terminateTLS", a.TerminateTLS) + populate(objectMap, "webCategories", a.WebCategories) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ApplicationRule. +func (a *ApplicationRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, &a.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, &a.DestinationAddresses) + delete(rawMsg, key) + case "fqdnTags": + err = unpopulate(val, &a.FqdnTags) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &a.Name) + delete(rawMsg, key) + case "protocols": + err = unpopulate(val, &a.Protocols) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, &a.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, &a.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, &a.SourceIPGroups) + delete(rawMsg, key) + case "targetFqdns": + err = unpopulate(val, &a.TargetFqdns) + delete(rawMsg, key) + case "targetUrls": + err = unpopulate(val, &a.TargetUrls) + delete(rawMsg, key) + case "terminateTLS": + err = unpopulate(val, &a.TerminateTLS) + delete(rawMsg, key) + case "webCategories": + err = unpopulate(val, &a.WebCategories) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroup. +func (a ApplicationSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ApplicationSecurityGroupListResult. +func (a ApplicationSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AuthorizationListResult. +func (a AuthorizationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AutoApprovedPrivateLinkServicesResult. +func (a AutoApprovedPrivateLinkServicesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableDelegation. +func (a AvailableDelegation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actions", a.Actions) + populate(objectMap, "id", a.ID) + populate(objectMap, "name", a.Name) + populate(objectMap, "serviceName", a.ServiceName) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableDelegationsResult. +func (a AvailableDelegationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailablePrivateEndpointTypesResult. +func (a AvailablePrivateEndpointTypesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersList. +func (a AvailableProvidersList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "countries", a.Countries) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCity. +func (a AvailableProvidersListCity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cityName", a.CityName) + populate(objectMap, "providers", a.Providers) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListCountry. +func (a AvailableProvidersListCountry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "countryName", a.CountryName) + populate(objectMap, "providers", a.Providers) + populate(objectMap, "states", a.States) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListParameters. +func (a AvailableProvidersListParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureLocations", a.AzureLocations) + populate(objectMap, "city", a.City) + populate(objectMap, "country", a.Country) + populate(objectMap, "state", a.State) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableProvidersListState. +func (a AvailableProvidersListState) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "cities", a.Cities) + populate(objectMap, "providers", a.Providers) + populate(objectMap, "stateName", a.StateName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AvailableServiceAliasesResult. +func (a AvailableServiceAliasesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewall. +func (a AzureFirewall) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + populate(objectMap, "zones", a.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRule. +func (a AzureFirewallApplicationRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "fqdnTags", a.FqdnTags) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "targetFqdns", a.TargetFqdns) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallApplicationRuleCollectionPropertiesFormat. +func (a AzureFirewallApplicationRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTag. +func (a AzureFirewallFqdnTag) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", a.Etag) + populate(objectMap, "id", a.ID) + populate(objectMap, "location", a.Location) + populate(objectMap, "name", a.Name) + populate(objectMap, "properties", a.Properties) + populate(objectMap, "tags", a.Tags) + populate(objectMap, "type", a.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallFqdnTagListResult. +func (a AzureFirewallFqdnTagListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallListResult. +func (a AzureFirewallListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRule. +func (a AzureFirewallNatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "destinationPorts", a.DestinationPorts) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + populate(objectMap, "translatedAddress", a.TranslatedAddress) + populate(objectMap, "translatedFqdn", a.TranslatedFqdn) + populate(objectMap, "translatedPort", a.TranslatedPort) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNatRuleCollectionProperties. +func (a AzureFirewallNatRuleCollectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRule. +func (a AzureFirewallNetworkRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", a.Description) + populate(objectMap, "destinationAddresses", a.DestinationAddresses) + populate(objectMap, "destinationFqdns", a.DestinationFqdns) + populate(objectMap, "destinationIpGroups", a.DestinationIPGroups) + populate(objectMap, "destinationPorts", a.DestinationPorts) + populate(objectMap, "name", a.Name) + populate(objectMap, "protocols", a.Protocols) + populate(objectMap, "sourceAddresses", a.SourceAddresses) + populate(objectMap, "sourceIpGroups", a.SourceIPGroups) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallNetworkRuleCollectionPropertiesFormat. +func (a AzureFirewallNetworkRuleCollectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", a.Action) + populate(objectMap, "priority", a.Priority) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "rules", a.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureFirewallPropertiesFormat. +func (a AzureFirewallPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "additionalProperties", a.AdditionalProperties) + populate(objectMap, "applicationRuleCollections", a.ApplicationRuleCollections) + populate(objectMap, "firewallPolicy", a.FirewallPolicy) + populate(objectMap, "hubIPAddresses", a.HubIPAddresses) + populate(objectMap, "ipConfigurations", a.IPConfigurations) + populate(objectMap, "ipGroups", a.IPGroups) + populate(objectMap, "managementIpConfiguration", a.ManagementIPConfiguration) + populate(objectMap, "natRuleCollections", a.NatRuleCollections) + populate(objectMap, "networkRuleCollections", a.NetworkRuleCollections) + populate(objectMap, "provisioningState", a.ProvisioningState) + populate(objectMap, "sku", a.SKU) + populate(objectMap, "threatIntelMode", a.ThreatIntelMode) + populate(objectMap, "virtualHub", a.VirtualHub) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReport. +func (a AzureReachabilityReport) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aggregationLevel", a.AggregationLevel) + populate(objectMap, "providerLocation", a.ProviderLocation) + populate(objectMap, "reachabilityReport", a.ReachabilityReport) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportItem. +func (a AzureReachabilityReportItem) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureLocation", a.AzureLocation) + populate(objectMap, "latencies", a.Latencies) + populate(objectMap, "provider", a.Provider) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportLatencyInfo. +func (a AzureReachabilityReportLatencyInfo) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "score", a.Score) + populateTimeRFC3339(objectMap, "timeStamp", a.TimeStamp) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportLatencyInfo. +func (a *AzureReachabilityReportLatencyInfo) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "score": + err = unpopulate(val, &a.Score) + delete(rawMsg, key) + case "timeStamp": + err = unpopulateTimeRFC3339(val, &a.TimeStamp) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureReachabilityReportParameters. +func (a AzureReachabilityReportParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureLocations", a.AzureLocations) + populateTimeRFC3339(objectMap, "endTime", a.EndTime) + populate(objectMap, "providerLocation", a.ProviderLocation) + populate(objectMap, "providers", a.Providers) + populateTimeRFC3339(objectMap, "startTime", a.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AzureReachabilityReportParameters. +func (a *AzureReachabilityReportParameters) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "azureLocations": + err = unpopulate(val, &a.AzureLocations) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, &a.EndTime) + delete(rawMsg, key) + case "providerLocation": + err = unpopulate(val, &a.ProviderLocation) + delete(rawMsg, key) + case "providers": + err = unpopulate(val, &a.Providers) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, &a.StartTime) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AzureWebCategoryListResult. +func (a AzureWebCategoryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", a.NextLink) + populate(objectMap, "value", a.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BGPCommunity. +func (b BGPCommunity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "communityName", b.CommunityName) + populate(objectMap, "communityPrefixes", b.CommunityPrefixes) + populate(objectMap, "communityValue", b.CommunityValue) + populate(objectMap, "isAuthorizedToUse", b.IsAuthorizedToUse) + populate(objectMap, "serviceGroup", b.ServiceGroup) + populate(objectMap, "serviceSupportedRegion", b.ServiceSupportedRegion) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAddressInboundNatRulePortMappings. +func (b BackendAddressInboundNatRulePortMappings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "inboundNatRulePortMappings", b.InboundNatRulePortMappings) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BackendAddressPoolPropertiesFormat. +func (b BackendAddressPoolPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendIPConfigurations", b.BackendIPConfigurations) + populate(objectMap, "inboundNatRules", b.InboundNatRules) + populate(objectMap, "loadBalancerBackendAddresses", b.LoadBalancerBackendAddresses) + populate(objectMap, "loadBalancingRules", b.LoadBalancingRules) + populate(objectMap, "location", b.Location) + populate(objectMap, "outboundRule", b.OutboundRule) + populate(objectMap, "outboundRules", b.OutboundRules) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "tunnelInterfaces", b.TunnelInterfaces) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionActiveSessionListResult. +func (b BastionActiveSessionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHost. +func (b BastionHost) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", b.Etag) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "sku", b.SKU) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostListResult. +func (b BastionHostListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionHostPropertiesFormat. +func (b BastionHostPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsName", b.DNSName) + populate(objectMap, "disableCopyPaste", b.DisableCopyPaste) + populate(objectMap, "enableFileCopy", b.EnableFileCopy) + populate(objectMap, "enableIpConnect", b.EnableIPConnect) + populate(objectMap, "enableShareableLink", b.EnableShareableLink) + populate(objectMap, "enableTunneling", b.EnableTunneling) + populate(objectMap, "ipConfigurations", b.IPConfigurations) + populate(objectMap, "provisioningState", b.ProvisioningState) + populate(objectMap, "scaleUnits", b.ScaleUnits) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionSessionDeleteResult. +func (b BastionSessionDeleteResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListRequest. +func (b BastionShareableLinkListRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "vms", b.VMs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BastionShareableLinkListResult. +func (b BastionShareableLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BgpPeerStatusListResult. +func (b BgpPeerStatusListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunity. +func (b BgpServiceCommunity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", b.ID) + populate(objectMap, "location", b.Location) + populate(objectMap, "name", b.Name) + populate(objectMap, "properties", b.Properties) + populate(objectMap, "tags", b.Tags) + populate(objectMap, "type", b.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityListResult. +func (b BgpServiceCommunityListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", b.NextLink) + populate(objectMap, "value", b.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BgpServiceCommunityPropertiesFormat. +func (b BgpServiceCommunityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bgpCommunities", b.BgpCommunities) + populate(objectMap, "serviceName", b.ServiceName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type BgpSettings. +func (b BgpSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "asn", b.Asn) + populate(objectMap, "bgpPeeringAddress", b.BgpPeeringAddress) + populate(objectMap, "bgpPeeringAddresses", b.BgpPeeringAddresses) + populate(objectMap, "peerWeight", b.PeerWeight) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type CloudErrorBody. +func (c CloudErrorBody) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", c.Code) + populate(objectMap, "details", c.Details) + populate(objectMap, "message", c.Message) + populate(objectMap, "target", c.Target) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticParameters. +func (c ConfigurationDiagnosticParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "profiles", c.Profiles) + populate(objectMap, "targetResourceId", c.TargetResourceID) + populate(objectMap, "verbosityLevel", c.VerbosityLevel) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConfigurationDiagnosticResponse. +func (c ConfigurationDiagnosticResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "results", c.Results) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitor. +func (c ConnectionMonitor) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "location", c.Location) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointFilter. +func (c ConnectionMonitorEndpointFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "items", c.Items) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorEndpointScope. +func (c ConnectionMonitorEndpointScope) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "exclude", c.Exclude) + populate(objectMap, "include", c.Include) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorHTTPConfiguration. +func (c ConnectionMonitorHTTPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "method", c.Method) + populate(objectMap, "path", c.Path) + populate(objectMap, "port", c.Port) + populate(objectMap, "preferHTTPS", c.PreferHTTPS) + populate(objectMap, "requestHeaders", c.RequestHeaders) + populate(objectMap, "validStatusCodeRanges", c.ValidStatusCodeRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorListResult. +func (c ConnectionMonitorListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorParameters. +func (c ConnectionMonitorParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autoStart", c.AutoStart) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) + populate(objectMap, "notes", c.Notes) + populate(objectMap, "outputs", c.Outputs) + populate(objectMap, "source", c.Source) + populate(objectMap, "testConfigurations", c.TestConfigurations) + populate(objectMap, "testGroups", c.TestGroups) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorQueryResult. +func (c ConnectionMonitorQueryResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sourceStatus", c.SourceStatus) + populate(objectMap, "states", c.States) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResult. +func (c ConnectionMonitorResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorResultProperties. +func (c ConnectionMonitorResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autoStart", c.AutoStart) + populate(objectMap, "connectionMonitorType", c.ConnectionMonitorType) + populate(objectMap, "destination", c.Destination) + populate(objectMap, "endpoints", c.Endpoints) + populate(objectMap, "monitoringIntervalInSeconds", c.MonitoringIntervalInSeconds) + populate(objectMap, "monitoringStatus", c.MonitoringStatus) + populate(objectMap, "notes", c.Notes) + populate(objectMap, "outputs", c.Outputs) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "source", c.Source) + populateTimeRFC3339(objectMap, "startTime", c.StartTime) + populate(objectMap, "testConfigurations", c.TestConfigurations) + populate(objectMap, "testGroups", c.TestGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionMonitorResultProperties. +func (c *ConnectionMonitorResultProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "autoStart": + err = unpopulate(val, &c.AutoStart) + delete(rawMsg, key) + case "connectionMonitorType": + err = unpopulate(val, &c.ConnectionMonitorType) + delete(rawMsg, key) + case "destination": + err = unpopulate(val, &c.Destination) + delete(rawMsg, key) + case "endpoints": + err = unpopulate(val, &c.Endpoints) + delete(rawMsg, key) + case "monitoringIntervalInSeconds": + err = unpopulate(val, &c.MonitoringIntervalInSeconds) + delete(rawMsg, key) + case "monitoringStatus": + err = unpopulate(val, &c.MonitoringStatus) + delete(rawMsg, key) + case "notes": + err = unpopulate(val, &c.Notes) + delete(rawMsg, key) + case "outputs": + err = unpopulate(val, &c.Outputs) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, &c.ProvisioningState) + delete(rawMsg, key) + case "source": + err = unpopulate(val, &c.Source) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, &c.StartTime) + delete(rawMsg, key) + case "testConfigurations": + err = unpopulate(val, &c.TestConfigurations) + delete(rawMsg, key) + case "testGroups": + err = unpopulate(val, &c.TestGroups) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestGroup. +func (c ConnectionMonitorTestGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinations", c.Destinations) + populate(objectMap, "disable", c.Disable) + populate(objectMap, "name", c.Name) + populate(objectMap, "sources", c.Sources) + populate(objectMap, "testConfigurations", c.TestConfigurations) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectionStateSnapshot. +func (c ConnectionStateSnapshot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) + populate(objectMap, "connectionState", c.ConnectionState) + populateTimeRFC3339(objectMap, "endTime", c.EndTime) + populate(objectMap, "evaluationState", c.EvaluationState) + populate(objectMap, "hops", c.Hops) + populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) + populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) + populate(objectMap, "probesFailed", c.ProbesFailed) + populate(objectMap, "probesSent", c.ProbesSent) + populateTimeRFC3339(objectMap, "startTime", c.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionStateSnapshot. +func (c *ConnectionStateSnapshot) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "avgLatencyInMs": + err = unpopulate(val, &c.AvgLatencyInMs) + delete(rawMsg, key) + case "connectionState": + err = unpopulate(val, &c.ConnectionState) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, &c.EndTime) + delete(rawMsg, key) + case "evaluationState": + err = unpopulate(val, &c.EvaluationState) + delete(rawMsg, key) + case "hops": + err = unpopulate(val, &c.Hops) + delete(rawMsg, key) + case "maxLatencyInMs": + err = unpopulate(val, &c.MaxLatencyInMs) + delete(rawMsg, key) + case "minLatencyInMs": + err = unpopulate(val, &c.MinLatencyInMs) + delete(rawMsg, key) + case "probesFailed": + err = unpopulate(val, &c.ProbesFailed) + delete(rawMsg, key) + case "probesSent": + err = unpopulate(val, &c.ProbesSent) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, &c.StartTime) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityHop. +func (c ConnectivityHop) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address", c.Address) + populate(objectMap, "id", c.ID) + populate(objectMap, "issues", c.Issues) + populate(objectMap, "links", c.Links) + populate(objectMap, "nextHopIds", c.NextHopIDs) + populate(objectMap, "previousHopIds", c.PreviousHopIDs) + populate(objectMap, "previousLinks", c.PreviousLinks) + populate(objectMap, "resourceId", c.ResourceID) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityInformation. +func (c ConnectivityInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "avgLatencyInMs", c.AvgLatencyInMs) + populate(objectMap, "connectionStatus", c.ConnectionStatus) + populate(objectMap, "hops", c.Hops) + populate(objectMap, "maxLatencyInMs", c.MaxLatencyInMs) + populate(objectMap, "minLatencyInMs", c.MinLatencyInMs) + populate(objectMap, "probesFailed", c.ProbesFailed) + populate(objectMap, "probesSent", c.ProbesSent) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ConnectivityIssue. +func (c ConnectivityIssue) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "context", c.Context) + populate(objectMap, "origin", c.Origin) + populate(objectMap, "severity", c.Severity) + populate(objectMap, "type", c.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfaceConfigurationPropertiesFormat. +func (c ContainerNetworkInterfaceConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerNetworkInterfaces", c.ContainerNetworkInterfaces) + populate(objectMap, "ipConfigurations", c.IPConfigurations) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ContainerNetworkInterfacePropertiesFormat. +func (c ContainerNetworkInterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "container", c.Container) + populate(objectMap, "containerNetworkInterfaceConfiguration", c.ContainerNetworkInterfaceConfiguration) + populate(objectMap, "ipConfigurations", c.IPConfigurations) + populate(objectMap, "provisioningState", c.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type CustomDNSConfigPropertiesFormat. +func (c CustomDNSConfigPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fqdn", c.Fqdn) + populate(objectMap, "ipAddresses", c.IPAddresses) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefix. +func (c CustomIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", c.Etag) + populate(objectMap, "extendedLocation", c.ExtendedLocation) + populate(objectMap, "id", c.ID) + populate(objectMap, "location", c.Location) + populate(objectMap, "name", c.Name) + populate(objectMap, "properties", c.Properties) + populate(objectMap, "tags", c.Tags) + populate(objectMap, "type", c.Type) + populate(objectMap, "zones", c.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixListResult. +func (c CustomIPPrefixListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", c.NextLink) + populate(objectMap, "value", c.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type CustomIPPrefixPropertiesFormat. +func (c CustomIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorizationMessage", c.AuthorizationMessage) + populate(objectMap, "childCustomIpPrefixes", c.ChildCustomIPPrefixes) + populate(objectMap, "cidr", c.Cidr) + populate(objectMap, "commissionedState", c.CommissionedState) + populate(objectMap, "customIpPrefixParent", c.CustomIPPrefixParent) + populate(objectMap, "failedReason", c.FailedReason) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "publicIpPrefixes", c.PublicIPPrefixes) + populate(objectMap, "resourceGuid", c.ResourceGUID) + populate(objectMap, "signedMessage", c.SignedMessage) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DNSSettings. +func (d DNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "enableProxy", d.EnableProxy) + populate(objectMap, "requireProxyForNetworkRules", d.RequireProxyForNetworkRules) + populate(objectMap, "servers", d.Servers) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicy. +func (d DdosCustomPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DdosCustomPolicyPropertiesFormat. +func (d DdosCustomPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "protocolCustomSettings", d.ProtocolCustomSettings) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "publicIPAddresses", d.PublicIPAddresses) + populate(objectMap, "resourceGuid", d.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlan. +func (d DdosProtectionPlan) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanListResult. +func (d DdosProtectionPlanListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DdosProtectionPlanPropertiesFormat. +func (d DdosProtectionPlanPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "resourceGuid", d.ResourceGUID) + populate(objectMap, "virtualNetworks", d.VirtualNetworks) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DhcpOptions. +func (d DhcpOptions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsServers", d.DNSServers) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfiguration. +func (d DscpConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", d.Etag) + populate(objectMap, "id", d.ID) + populate(objectMap, "location", d.Location) + populate(objectMap, "name", d.Name) + populate(objectMap, "properties", d.Properties) + populate(objectMap, "tags", d.Tags) + populate(objectMap, "type", d.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationListResult. +func (d DscpConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", d.NextLink) + populate(objectMap, "value", d.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type DscpConfigurationPropertiesFormat. +func (d DscpConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "associatedNetworkInterfaces", d.AssociatedNetworkInterfaces) + populate(objectMap, "destinationIpRanges", d.DestinationIPRanges) + populate(objectMap, "destinationPortRanges", d.DestinationPortRanges) + populate(objectMap, "markings", d.Markings) + populate(objectMap, "protocol", d.Protocol) + populate(objectMap, "provisioningState", d.ProvisioningState) + populate(objectMap, "qosCollectionId", d.QosCollectionID) + populate(objectMap, "qosDefinitionCollection", d.QosDefinitionCollection) + populate(objectMap, "resourceGuid", d.ResourceGUID) + populate(objectMap, "sourceIpRanges", d.SourceIPRanges) + populate(objectMap, "sourcePortRanges", d.SourcePortRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroup. +func (e EffectiveNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "association", e.Association) + populate(objectMap, "effectiveSecurityRules", e.EffectiveSecurityRules) + populate(objectMap, "networkSecurityGroup", e.NetworkSecurityGroup) + populate(objectMap, "tagMap", e.TagMap) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityGroupListResult. +func (e EffectiveNetworkSecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveNetworkSecurityRule. +func (e EffectiveNetworkSecurityRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "access", e.Access) + populate(objectMap, "destinationAddressPrefix", e.DestinationAddressPrefix) + populate(objectMap, "destinationAddressPrefixes", e.DestinationAddressPrefixes) + populate(objectMap, "destinationPortRange", e.DestinationPortRange) + populate(objectMap, "destinationPortRanges", e.DestinationPortRanges) + populate(objectMap, "direction", e.Direction) + populate(objectMap, "expandedDestinationAddressPrefix", e.ExpandedDestinationAddressPrefix) + populate(objectMap, "expandedSourceAddressPrefix", e.ExpandedSourceAddressPrefix) + populate(objectMap, "name", e.Name) + populate(objectMap, "priority", e.Priority) + populate(objectMap, "protocol", e.Protocol) + populate(objectMap, "sourceAddressPrefix", e.SourceAddressPrefix) + populate(objectMap, "sourceAddressPrefixes", e.SourceAddressPrefixes) + populate(objectMap, "sourcePortRange", e.SourcePortRange) + populate(objectMap, "sourcePortRanges", e.SourcePortRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRoute. +func (e EffectiveRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefix", e.AddressPrefix) + populate(objectMap, "disableBgpRoutePropagation", e.DisableBgpRoutePropagation) + populate(objectMap, "name", e.Name) + populate(objectMap, "nextHopIpAddress", e.NextHopIPAddress) + populate(objectMap, "nextHopType", e.NextHopType) + populate(objectMap, "source", e.Source) + populate(objectMap, "state", e.State) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EffectiveRouteListResult. +func (e EffectiveRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EndpointServicesListResult. +func (e EndpointServicesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Error. +func (e Error) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", e.Code) + populate(objectMap, "details", e.Details) + populate(objectMap, "innerError", e.InnerError) + populate(objectMap, "message", e.Message) + populate(objectMap, "target", e.Target) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type EvaluatedNetworkSecurityGroup. +func (e EvaluatedNetworkSecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appliedTo", e.AppliedTo) + populate(objectMap, "matchedRule", e.MatchedRule) + populate(objectMap, "networkSecurityGroupId", e.NetworkSecurityGroupID) + populate(objectMap, "rulesEvaluationResult", e.RulesEvaluationResult) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleGroup. +func (e ExclusionManagedRuleGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ruleGroupName", e.RuleGroupName) + populate(objectMap, "rules", e.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExclusionManagedRuleSet. +func (e ExclusionManagedRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ruleGroups", e.RuleGroups) + populate(objectMap, "ruleSetType", e.RuleSetType) + populate(objectMap, "ruleSetVersion", e.RuleSetVersion) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuit. +func (e ExpressRouteCircuit) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "sku", e.SKU) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitConnectionListResult. +func (e ExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitListResult. +func (e ExpressRouteCircuitListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringConfig. +func (e ExpressRouteCircuitPeeringConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "advertisedCommunities", e.AdvertisedCommunities) + populate(objectMap, "advertisedPublicPrefixes", e.AdvertisedPublicPrefixes) + populate(objectMap, "advertisedPublicPrefixesState", e.AdvertisedPublicPrefixesState) + populate(objectMap, "customerASN", e.CustomerASN) + populate(objectMap, "legacyMode", e.LegacyMode) + populate(objectMap, "routingRegistryName", e.RoutingRegistryName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringListResult. +func (e ExpressRouteCircuitPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPeeringPropertiesFormat. +func (e ExpressRouteCircuitPeeringPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "azureASN", e.AzureASN) + populate(objectMap, "connections", e.Connections) + populate(objectMap, "expressRouteConnection", e.ExpressRouteConnection) + populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) + populate(objectMap, "ipv6PeeringConfig", e.IPv6PeeringConfig) + populate(objectMap, "lastModifiedBy", e.LastModifiedBy) + populate(objectMap, "microsoftPeeringConfig", e.MicrosoftPeeringConfig) + populate(objectMap, "peerASN", e.PeerASN) + populate(objectMap, "peeredConnections", e.PeeredConnections) + populate(objectMap, "peeringType", e.PeeringType) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "primaryPeerAddressPrefix", e.PrimaryPeerAddressPrefix) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "routeFilter", e.RouteFilter) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "secondaryPeerAddressPrefix", e.SecondaryPeerAddressPrefix) + populate(objectMap, "sharedKey", e.SharedKey) + populate(objectMap, "state", e.State) + populate(objectMap, "stats", e.Stats) + populate(objectMap, "vlanId", e.VlanID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitPropertiesFormat. +func (e ExpressRouteCircuitPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowClassicOperations", e.AllowClassicOperations) + populate(objectMap, "authorizations", e.Authorizations) + populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) + populate(objectMap, "circuitProvisioningState", e.CircuitProvisioningState) + populate(objectMap, "expressRoutePort", e.ExpressRoutePort) + populate(objectMap, "gatewayManagerEtag", e.GatewayManagerEtag) + populate(objectMap, "globalReachEnabled", e.GlobalReachEnabled) + populate(objectMap, "peerings", e.Peerings) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "serviceKey", e.ServiceKey) + populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) + populate(objectMap, "serviceProviderProperties", e.ServiceProviderProperties) + populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) + populate(objectMap, "stag", e.Stag) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsArpTableListResult. +func (e ExpressRouteCircuitsArpTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableListResult. +func (e ExpressRouteCircuitsRoutesTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCircuitsRoutesTableSummaryListResult. +func (e ExpressRouteCircuitsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteConnectionList. +func (e ExpressRouteConnectionList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnection. +func (e ExpressRouteCrossConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionListResult. +func (e ExpressRouteCrossConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionPeeringList. +func (e ExpressRouteCrossConnectionPeeringList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionProperties. +func (e ExpressRouteCrossConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bandwidthInMbps", e.BandwidthInMbps) + populate(objectMap, "expressRouteCircuit", e.ExpressRouteCircuit) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "peerings", e.Peerings) + populate(objectMap, "primaryAzurePort", e.PrimaryAzurePort) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "sTag", e.STag) + populate(objectMap, "secondaryAzurePort", e.SecondaryAzurePort) + populate(objectMap, "serviceProviderNotes", e.ServiceProviderNotes) + populate(objectMap, "serviceProviderProvisioningState", e.ServiceProviderProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteCrossConnectionsRoutesTableSummaryListResult. +func (e ExpressRouteCrossConnectionsRoutesTableSummaryListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGateway. +func (e ExpressRouteGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayList. +func (e ExpressRouteGatewayList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteGatewayProperties. +func (e ExpressRouteGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "autoScaleConfiguration", e.AutoScaleConfiguration) + populate(objectMap, "expressRouteConnections", e.ExpressRouteConnections) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "virtualHub", e.VirtualHub) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteLinkListResult. +func (e ExpressRouteLinkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePort. +func (e ExpressRoutePort) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", e.Etag) + populate(objectMap, "id", e.ID) + populate(objectMap, "identity", e.Identity) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortListResult. +func (e ExpressRoutePortListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortPropertiesFormat. +func (e ExpressRoutePortPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allocationDate", e.AllocationDate) + populate(objectMap, "bandwidthInGbps", e.BandwidthInGbps) + populate(objectMap, "circuits", e.Circuits) + populate(objectMap, "encapsulation", e.Encapsulation) + populate(objectMap, "etherType", e.EtherType) + populate(objectMap, "links", e.Links) + populate(objectMap, "mtu", e.Mtu) + populate(objectMap, "peeringLocation", e.PeeringLocation) + populate(objectMap, "provisionedBandwidthInGbps", e.ProvisionedBandwidthInGbps) + populate(objectMap, "provisioningState", e.ProvisioningState) + populate(objectMap, "resourceGuid", e.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocation. +func (e ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationListResult. +func (e ExpressRoutePortsLocationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRoutePortsLocationPropertiesFormat. +func (e ExpressRoutePortsLocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "address", e.Address) + populate(objectMap, "availableBandwidths", e.AvailableBandwidths) + populate(objectMap, "contact", e.Contact) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProvider. +func (e ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", e.ID) + populate(objectMap, "location", e.Location) + populate(objectMap, "name", e.Name) + populate(objectMap, "properties", e.Properties) + populate(objectMap, "tags", e.Tags) + populate(objectMap, "type", e.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderListResult. +func (e ExpressRouteServiceProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", e.NextLink) + populate(objectMap, "value", e.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ExpressRouteServiceProviderPropertiesFormat. +func (e ExpressRouteServiceProviderPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bandwidthsOffered", e.BandwidthsOffered) + populate(objectMap, "peeringLocations", e.PeeringLocations) + populate(objectMap, "provisioningState", e.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FilterItems. +func (f FilterItems) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "field", f.Field) + populate(objectMap, "values", f.Values) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicy. +func (f FirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "identity", f.Identity) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyFilterRuleCollection. +func (f *FirewallPolicyFilterRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return &FirewallPolicyRuleCollection{ + RuleCollectionType: f.RuleCollectionType, + Name: f.Name, + Priority: f.Priority, + } +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyFilterRuleCollection. +func (f FirewallPolicyFilterRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", f.Action) + populate(objectMap, "name", f.Name) + populate(objectMap, "priority", f.Priority) + objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyFilterRuleCollection + populate(objectMap, "rules", f.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyFilterRuleCollection. +func (f *FirewallPolicyFilterRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, &f.Action) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &f.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, &f.Priority) + delete(rawMsg, key) + case "ruleCollectionType": + err = unpopulate(val, &f.RuleCollectionType) + delete(rawMsg, key) + case "rules": + f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionBypassTrafficSpecifications. +func (f FirewallPolicyIntrusionDetectionBypassTrafficSpecifications) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", f.Description) + populate(objectMap, "destinationAddresses", f.DestinationAddresses) + populate(objectMap, "destinationIpGroups", f.DestinationIPGroups) + populate(objectMap, "destinationPorts", f.DestinationPorts) + populate(objectMap, "name", f.Name) + populate(objectMap, "protocol", f.Protocol) + populate(objectMap, "sourceAddresses", f.SourceAddresses) + populate(objectMap, "sourceIpGroups", f.SourceIPGroups) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyIntrusionDetectionConfiguration. +func (f FirewallPolicyIntrusionDetectionConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bypassTrafficSettings", f.BypassTrafficSettings) + populate(objectMap, "signatureOverrides", f.SignatureOverrides) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyListResult. +func (f FirewallPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyLogAnalyticsResources. +func (f FirewallPolicyLogAnalyticsResources) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultWorkspaceId", f.DefaultWorkspaceID) + populate(objectMap, "workspaces", f.Workspaces) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyNatRuleCollection. +func (f *FirewallPolicyNatRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return &FirewallPolicyRuleCollection{ + RuleCollectionType: f.RuleCollectionType, + Name: f.Name, + Priority: f.Priority, + } +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyNatRuleCollection. +func (f FirewallPolicyNatRuleCollection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", f.Action) + populate(objectMap, "name", f.Name) + populate(objectMap, "priority", f.Priority) + objectMap["ruleCollectionType"] = FirewallPolicyRuleCollectionTypeFirewallPolicyNatRuleCollection + populate(objectMap, "rules", f.Rules) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyNatRuleCollection. +func (f *FirewallPolicyNatRuleCollection) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "action": + err = unpopulate(val, &f.Action) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &f.Name) + delete(rawMsg, key) + case "priority": + err = unpopulate(val, &f.Priority) + delete(rawMsg, key) + case "ruleCollectionType": + err = unpopulate(val, &f.RuleCollectionType) + delete(rawMsg, key) + case "rules": + f.Rules, err = unmarshalFirewallPolicyRuleClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyPropertiesFormat. +func (f FirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "basePolicy", f.BasePolicy) + populate(objectMap, "childPolicies", f.ChildPolicies) + populate(objectMap, "dnsSettings", f.DNSSettings) + populate(objectMap, "explicitProxySettings", f.ExplicitProxySettings) + populate(objectMap, "firewalls", f.Firewalls) + populate(objectMap, "insights", f.Insights) + populate(objectMap, "intrusionDetection", f.IntrusionDetection) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "ruleCollectionGroups", f.RuleCollectionGroups) + populate(objectMap, "sku", f.SKU) + populate(objectMap, "sql", f.SQL) + populate(objectMap, "snat", f.Snat) + populate(objectMap, "threatIntelMode", f.ThreatIntelMode) + populate(objectMap, "threatIntelWhitelist", f.ThreatIntelWhitelist) + populate(objectMap, "transportSecurity", f.TransportSecurity) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type FirewallPolicyRule. +func (f *FirewallPolicyRule) GetFirewallPolicyRule() *FirewallPolicyRule { return f } + +// GetFirewallPolicyRuleCollection implements the FirewallPolicyRuleCollectionClassification interface for type FirewallPolicyRuleCollection. +func (f *FirewallPolicyRuleCollection) GetFirewallPolicyRuleCollection() *FirewallPolicyRuleCollection { + return f +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupListResult. +func (f FirewallPolicyRuleCollectionGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyRuleCollectionGroupProperties. +func (f FirewallPolicyRuleCollectionGroupProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "priority", f.Priority) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "ruleCollections", f.RuleCollections) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FirewallPolicyRuleCollectionGroupProperties. +func (f *FirewallPolicyRuleCollectionGroupProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "priority": + err = unpopulate(val, &f.Priority) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, &f.ProvisioningState) + delete(rawMsg, key) + case "ruleCollections": + f.RuleCollections, err = unmarshalFirewallPolicyRuleCollectionClassificationArray(val) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicySNAT. +func (f FirewallPolicySNAT) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateRanges", f.PrivateRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FirewallPolicyThreatIntelWhitelist. +func (f FirewallPolicyThreatIntelWhitelist) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fqdns", f.Fqdns) + populate(objectMap, "ipAddresses", f.IPAddresses) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLog. +func (f FlowLog) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "location", f.Location) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "tags", f.Tags) + populate(objectMap, "type", f.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FlowLogListResult. +func (f FlowLogListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", f.NextLink) + populate(objectMap, "value", f.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfiguration. +func (f FrontendIPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", f.Etag) + populate(objectMap, "id", f.ID) + populate(objectMap, "name", f.Name) + populate(objectMap, "properties", f.Properties) + populate(objectMap, "type", f.Type) + populate(objectMap, "zones", f.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type FrontendIPConfigurationPropertiesFormat. +func (f FrontendIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "gatewayLoadBalancer", f.GatewayLoadBalancer) + populate(objectMap, "inboundNatPools", f.InboundNatPools) + populate(objectMap, "inboundNatRules", f.InboundNatRules) + populate(objectMap, "loadBalancingRules", f.LoadBalancingRules) + populate(objectMap, "outboundRules", f.OutboundRules) + populate(objectMap, "privateIPAddress", f.PrivateIPAddress) + populate(objectMap, "privateIPAddressVersion", f.PrivateIPAddressVersion) + populate(objectMap, "privateIPAllocationMethod", f.PrivateIPAllocationMethod) + populate(objectMap, "provisioningState", f.ProvisioningState) + populate(objectMap, "publicIPAddress", f.PublicIPAddress) + populate(objectMap, "publicIPPrefix", f.PublicIPPrefix) + populate(objectMap, "subnet", f.Subnet) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type GatewayRouteListResult. +func (g GatewayRouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type GetVPNSitesConfigurationRequest. +func (g GetVPNSitesConfigurationRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "outputBlobSasUrl", g.OutputBlobSasURL) + populate(objectMap, "vpnSites", g.VPNSites) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type HTTPConfiguration. +func (h HTTPConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "headers", h.Headers) + populate(objectMap, "method", h.Method) + populate(objectMap, "validStatusCodes", h.ValidStatusCodes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type HopLink. +func (h HopLink) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "context", h.Context) + populate(objectMap, "issues", h.Issues) + populate(objectMap, "linkType", h.LinkType) + populate(objectMap, "nextHopId", h.NextHopID) + populate(objectMap, "properties", h.Properties) + populate(objectMap, "resourceId", h.ResourceID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type HubPublicIPAddresses. +func (h HubPublicIPAddresses) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addresses", h.Addresses) + populate(objectMap, "count", h.Count) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type HubRoute. +func (h HubRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinationType", h.DestinationType) + populate(objectMap, "destinations", h.Destinations) + populate(objectMap, "name", h.Name) + populate(objectMap, "nextHop", h.NextHop) + populate(objectMap, "nextHopType", h.NextHopType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type HubRouteTableProperties. +func (h HubRouteTableProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "associatedConnections", h.AssociatedConnections) + populate(objectMap, "labels", h.Labels) + populate(objectMap, "propagatingConnections", h.PropagatingConnections) + populate(objectMap, "provisioningState", h.ProvisioningState) + populate(objectMap, "routes", h.Routes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IDPSQueryObject. +func (i IDPSQueryObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "filters", i.Filters) + populate(objectMap, "orderBy", i.OrderBy) + populate(objectMap, "resultsPerPage", i.ResultsPerPage) + populate(objectMap, "search", i.Search) + populate(objectMap, "skip", i.Skip) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPAddressAvailabilityResult. +func (i IPAddressAvailabilityResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "available", i.Available) + populate(objectMap, "availableIPAddresses", i.AvailableIPAddresses) + populate(objectMap, "isPlatformReserved", i.IsPlatformReserved) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocation. +func (i IPAllocation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocationListResult. +func (i IPAllocationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPAllocationPropertiesFormat. +func (i IPAllocationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allocationTags", i.AllocationTags) + populate(objectMap, "ipamAllocationId", i.IpamAllocationID) + populate(objectMap, "prefix", i.Prefix) + populate(objectMap, "prefixLength", i.PrefixLength) + populate(objectMap, "prefixType", i.PrefixType) + populate(objectMap, "subnet", i.Subnet) + populate(objectMap, "type", i.Type) + populate(objectMap, "virtualNetwork", i.VirtualNetwork) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPConfigurationBgpPeeringAddress. +func (i IPConfigurationBgpPeeringAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customBgpIpAddresses", i.CustomBgpIPAddresses) + populate(objectMap, "defaultBgpIpAddresses", i.DefaultBgpIPAddresses) + populate(objectMap, "ipconfigurationId", i.IPConfigurationID) + populate(objectMap, "tunnelIpAddresses", i.TunnelIPAddresses) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroup. +func (i IPGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroupListResult. +func (i IPGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IPGroupPropertiesFormat. +func (i IPGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "firewallPolicies", i.FirewallPolicies) + populate(objectMap, "firewalls", i.Firewalls) + populate(objectMap, "ipAddresses", i.IPAddresses) + populate(objectMap, "provisioningState", i.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InboundNatRuleListResult. +func (i InboundNatRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InboundSecurityRuleProperties. +func (i InboundSecurityRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "rules", i.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type IntentPolicy. +func (i IntentPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Interface. +func (i Interface) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", i.Etag) + populate(objectMap, "extendedLocation", i.ExtendedLocation) + populate(objectMap, "id", i.ID) + populate(objectMap, "location", i.Location) + populate(objectMap, "name", i.Name) + populate(objectMap, "properties", i.Properties) + populate(objectMap, "tags", i.Tags) + populate(objectMap, "type", i.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceAssociation. +func (i InterfaceAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", i.ID) + populate(objectMap, "securityRules", i.SecurityRules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceDNSSettings. +func (i InterfaceDNSSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "appliedDnsServers", i.AppliedDNSServers) + populate(objectMap, "dnsServers", i.DNSServers) + populate(objectMap, "internalDnsNameLabel", i.InternalDNSNameLabel) + populate(objectMap, "internalDomainNameSuffix", i.InternalDomainNameSuffix) + populate(objectMap, "internalFqdn", i.InternalFqdn) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationListResult. +func (i InterfaceIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPrivateLinkConnectionProperties. +func (i InterfaceIPConfigurationPrivateLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fqdns", i.Fqdns) + populate(objectMap, "groupId", i.GroupID) + populate(objectMap, "requiredMemberName", i.RequiredMemberName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceIPConfigurationPropertiesFormat. +func (i InterfaceIPConfigurationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationGatewayBackendAddressPools", i.ApplicationGatewayBackendAddressPools) + populate(objectMap, "applicationSecurityGroups", i.ApplicationSecurityGroups) + populate(objectMap, "gatewayLoadBalancer", i.GatewayLoadBalancer) + populate(objectMap, "loadBalancerBackendAddressPools", i.LoadBalancerBackendAddressPools) + populate(objectMap, "loadBalancerInboundNatRules", i.LoadBalancerInboundNatRules) + populate(objectMap, "primary", i.Primary) + populate(objectMap, "privateIPAddress", i.PrivateIPAddress) + populate(objectMap, "privateIPAddressVersion", i.PrivateIPAddressVersion) + populate(objectMap, "privateIPAllocationMethod", i.PrivateIPAllocationMethod) + populate(objectMap, "privateLinkConnectionProperties", i.PrivateLinkConnectionProperties) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "publicIPAddress", i.PublicIPAddress) + populate(objectMap, "subnet", i.Subnet) + populate(objectMap, "virtualNetworkTaps", i.VirtualNetworkTaps) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceListResult. +func (i InterfaceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceLoadBalancerListResult. +func (i InterfaceLoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfacePropertiesFormat. +func (i InterfacePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsSettings", i.DNSSettings) + populate(objectMap, "dscpConfiguration", i.DscpConfiguration) + populate(objectMap, "enableAcceleratedNetworking", i.EnableAcceleratedNetworking) + populate(objectMap, "enableIPForwarding", i.EnableIPForwarding) + populate(objectMap, "hostedWorkloads", i.HostedWorkloads) + populate(objectMap, "ipConfigurations", i.IPConfigurations) + populate(objectMap, "macAddress", i.MacAddress) + populate(objectMap, "migrationPhase", i.MigrationPhase) + populate(objectMap, "networkSecurityGroup", i.NetworkSecurityGroup) + populate(objectMap, "nicType", i.NicType) + populate(objectMap, "primary", i.Primary) + populate(objectMap, "privateEndpoint", i.PrivateEndpoint) + populate(objectMap, "privateLinkService", i.PrivateLinkService) + populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "resourceGuid", i.ResourceGUID) + populate(objectMap, "tapConfigurations", i.TapConfigurations) + populate(objectMap, "virtualMachine", i.VirtualMachine) + populate(objectMap, "vnetEncryptionSupported", i.VnetEncryptionSupported) + populate(objectMap, "workloadType", i.WorkloadType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type InterfaceTapConfigurationListResult. +func (i InterfaceTapConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", i.NextLink) + populate(objectMap, "value", i.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListHubRouteTablesResult. +func (l ListHubRouteTablesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListHubVirtualNetworkConnectionsResult. +func (l ListHubVirtualNetworkConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListP2SVPNGatewaysResult. +func (l ListP2SVPNGatewaysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListRoutingIntentResult. +func (l ListRoutingIntentResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNConnectionsResult. +func (l ListVPNConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewayNatRulesResult. +func (l ListVPNGatewayNatRulesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNGatewaysResult. +func (l ListVPNGatewaysResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNServerConfigurationsResult. +func (l ListVPNServerConfigurationsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinkConnectionsResult. +func (l ListVPNSiteLinkConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSiteLinksResult. +func (l ListVPNSiteLinksResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVPNSitesResult. +func (l ListVPNSitesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubBgpConnectionResults. +func (l ListVirtualHubBgpConnectionResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubIPConfigurationResults. +func (l ListVirtualHubIPConfigurationResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubRouteTableV2SResult. +func (l ListVirtualHubRouteTableV2SResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualHubsResult. +func (l ListVirtualHubsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualNetworkGatewayNatRulesResult. +func (l ListVirtualNetworkGatewayNatRulesResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ListVirtualWANsResult. +func (l ListVirtualWANsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancer. +func (l LoadBalancer) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "extendedLocation", l.ExtendedLocation) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "sku", l.SKU) + populate(objectMap, "tags", l.Tags) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPoolListResult. +func (l LoadBalancerBackendAddressPoolListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerBackendAddressPropertiesFormat. +func (l LoadBalancerBackendAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipAddress", l.IPAddress) + populate(objectMap, "inboundNatRulesPortMapping", l.InboundNatRulesPortMapping) + populate(objectMap, "loadBalancerFrontendIPConfiguration", l.LoadBalancerFrontendIPConfiguration) + populate(objectMap, "networkInterfaceIPConfiguration", l.NetworkInterfaceIPConfiguration) + populate(objectMap, "subnet", l.Subnet) + populate(objectMap, "virtualNetwork", l.VirtualNetwork) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerFrontendIPConfigurationListResult. +func (l LoadBalancerFrontendIPConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. +func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerLoadBalancingRuleListResult. +func (l LoadBalancerLoadBalancingRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerOutboundRuleListResult. +func (l LoadBalancerOutboundRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerProbeListResult. +func (l LoadBalancerProbeListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerPropertiesFormat. +func (l LoadBalancerPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddressPools", l.BackendAddressPools) + populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) + populate(objectMap, "inboundNatPools", l.InboundNatPools) + populate(objectMap, "inboundNatRules", l.InboundNatRules) + populate(objectMap, "loadBalancingRules", l.LoadBalancingRules) + populate(objectMap, "outboundRules", l.OutboundRules) + populate(objectMap, "probes", l.Probes) + populate(objectMap, "provisioningState", l.ProvisioningState) + populate(objectMap, "resourceGuid", l.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancerVipSwapRequest. +func (l LoadBalancerVipSwapRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "frontendIPConfigurations", l.FrontendIPConfigurations) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LoadBalancingRulePropertiesFormat. +func (l LoadBalancingRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "backendAddressPool", l.BackendAddressPool) + populate(objectMap, "backendAddressPools", l.BackendAddressPools) + populate(objectMap, "backendPort", l.BackendPort) + populate(objectMap, "disableOutboundSnat", l.DisableOutboundSnat) + populate(objectMap, "enableFloatingIP", l.EnableFloatingIP) + populate(objectMap, "enableTcpReset", l.EnableTCPReset) + populate(objectMap, "frontendIPConfiguration", l.FrontendIPConfiguration) + populate(objectMap, "frontendPort", l.FrontendPort) + populate(objectMap, "idleTimeoutInMinutes", l.IdleTimeoutInMinutes) + populate(objectMap, "loadDistribution", l.LoadDistribution) + populate(objectMap, "probe", l.Probe) + populate(objectMap, "protocol", l.Protocol) + populate(objectMap, "provisioningState", l.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGateway. +func (l LocalNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", l.Etag) + populate(objectMap, "id", l.ID) + populate(objectMap, "location", l.Location) + populate(objectMap, "name", l.Name) + populate(objectMap, "properties", l.Properties) + populate(objectMap, "tags", l.Tags) + populate(objectMap, "type", l.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type LocalNetworkGatewayListResult. +func (l LocalNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", l.NextLink) + populate(objectMap, "value", l.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleGroupOverride. +func (m ManagedRuleGroupOverride) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ruleGroupName", m.RuleGroupName) + populate(objectMap, "rules", m.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRuleSet. +func (m ManagedRuleSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ruleGroupOverrides", m.RuleGroupOverrides) + populate(objectMap, "ruleSetType", m.RuleSetType) + populate(objectMap, "ruleSetVersion", m.RuleSetVersion) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedRulesDefinition. +func (m ManagedRulesDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "exclusions", m.Exclusions) + populate(objectMap, "managedRuleSets", m.ManagedRuleSets) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentity. +func (m ManagedServiceIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type MatchCondition. +func (m MatchCondition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "matchValues", m.MatchValues) + populate(objectMap, "matchVariables", m.MatchVariables) + populate(objectMap, "negationConditon", m.NegationConditon) + populate(objectMap, "operator", m.Operator) + populate(objectMap, "transforms", m.Transforms) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type MetricSpecification. +func (m MetricSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aggregationType", m.AggregationType) + populate(objectMap, "availabilities", m.Availabilities) + populate(objectMap, "dimensions", m.Dimensions) + populate(objectMap, "displayDescription", m.DisplayDescription) + populate(objectMap, "displayName", m.DisplayName) + populate(objectMap, "enableRegionalMdmAccount", m.EnableRegionalMdmAccount) + populate(objectMap, "fillGapWithZero", m.FillGapWithZero) + populate(objectMap, "isInternal", m.IsInternal) + populate(objectMap, "metricFilterPattern", m.MetricFilterPattern) + populate(objectMap, "name", m.Name) + populate(objectMap, "resourceIdDimensionNameOverride", m.ResourceIDDimensionNameOverride) + populate(objectMap, "sourceMdmAccount", m.SourceMdmAccount) + populate(objectMap, "sourceMdmNamespace", m.SourceMdmNamespace) + populate(objectMap, "unit", m.Unit) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type NatGateway. +func (n NatGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", n.Etag) + populate(objectMap, "id", n.ID) + populate(objectMap, "location", n.Location) + populate(objectMap, "name", n.Name) + populate(objectMap, "properties", n.Properties) + populate(objectMap, "sku", n.SKU) + populate(objectMap, "tags", n.Tags) + populate(objectMap, "type", n.Type) + populate(objectMap, "zones", n.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type NatGatewayListResult. +func (n NatGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", n.NextLink) + populate(objectMap, "value", n.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type NatGatewayPropertiesFormat. +func (n NatGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "idleTimeoutInMinutes", n.IdleTimeoutInMinutes) + populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "publicIpAddresses", n.PublicIPAddresses) + populate(objectMap, "publicIpPrefixes", n.PublicIPPrefixes) + populate(objectMap, "resourceGuid", n.ResourceGUID) + populate(objectMap, "subnets", n.Subnets) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type NatRule. +func (n *NatRule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Name: n.Name, + Description: n.Description, + RuleType: n.RuleType, + } +} + +// MarshalJSON implements the json.Marshaller interface for type NatRule. +func (n NatRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", n.Description) + populate(objectMap, "destinationAddresses", n.DestinationAddresses) + populate(objectMap, "destinationPorts", n.DestinationPorts) + populate(objectMap, "ipProtocols", n.IPProtocols) + populate(objectMap, "name", n.Name) + objectMap["ruleType"] = FirewallPolicyRuleTypeNatRule + populate(objectMap, "sourceAddresses", n.SourceAddresses) + populate(objectMap, "sourceIpGroups", n.SourceIPGroups) + populate(objectMap, "translatedAddress", n.TranslatedAddress) + populate(objectMap, "translatedFqdn", n.TranslatedFqdn) + populate(objectMap, "translatedPort", n.TranslatedPort) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type NatRule. +func (n *NatRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, &n.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, &n.DestinationAddresses) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, &n.DestinationPorts) + delete(rawMsg, key) + case "ipProtocols": + err = unpopulate(val, &n.IPProtocols) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &n.Name) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, &n.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, &n.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, &n.SourceIPGroups) + delete(rawMsg, key) + case "translatedAddress": + err = unpopulate(val, &n.TranslatedAddress) + delete(rawMsg, key) + case "translatedFqdn": + err = unpopulate(val, &n.TranslatedFqdn) + delete(rawMsg, key) + case "translatedPort": + err = unpopulate(val, &n.TranslatedPort) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", o.NextLink) + populate(objectMap, "value", o.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type OperationPropertiesFormatServiceSpecification. +func (o OperationPropertiesFormatServiceSpecification) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "logSpecifications", o.LogSpecifications) + populate(objectMap, "metricSpecifications", o.MetricSpecifications) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type OutboundRulePropertiesFormat. +func (o OutboundRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allocatedOutboundPorts", o.AllocatedOutboundPorts) + populate(objectMap, "backendAddressPool", o.BackendAddressPool) + populate(objectMap, "enableTcpReset", o.EnableTCPReset) + populate(objectMap, "frontendIPConfigurations", o.FrontendIPConfigurations) + populate(objectMap, "idleTimeoutInMinutes", o.IdleTimeoutInMinutes) + populate(objectMap, "protocol", o.Protocol) + populate(objectMap, "provisioningState", o.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type OwaspCrsExclusionEntry. +func (o OwaspCrsExclusionEntry) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "exclusionManagedRuleSets", o.ExclusionManagedRuleSets) + populate(objectMap, "matchVariable", o.MatchVariable) + populate(objectMap, "selector", o.Selector) + populate(objectMap, "selectorMatchOperator", o.SelectorMatchOperator) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionHealthRequest. +func (p P2SVPNConnectionHealthRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "outputBlobSasUrl", p.OutputBlobSasURL) + populate(objectMap, "vpnUserNamesFilter", p.VPNUserNamesFilter) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNConnectionRequest. +func (p P2SVPNConnectionRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "vpnConnectionIds", p.VPNConnectionIDs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNGateway. +func (p P2SVPNGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type P2SVPNGatewayProperties. +func (p P2SVPNGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customDnsServers", p.CustomDNSServers) + populate(objectMap, "isRoutingPreferenceInternet", p.IsRoutingPreferenceInternet) + populate(objectMap, "p2SConnectionConfigurations", p.P2SConnectionConfigurations) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "vpnClientConnectionHealth", p.VPNClientConnectionHealth) + populate(objectMap, "vpnGatewayScaleUnit", p.VPNGatewayScaleUnit) + populate(objectMap, "vpnServerConfiguration", p.VPNServerConfiguration) + populate(objectMap, "virtualHub", p.VirtualHub) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureListResult. +func (p PacketCaptureListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureParameters. +func (p PacketCaptureParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) + populate(objectMap, "filters", p.Filters) + populate(objectMap, "storageLocation", p.StorageLocation) + populate(objectMap, "target", p.Target) + populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) + populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureQueryStatusResult. +func (p PacketCaptureQueryStatusResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "captureStartTime", p.CaptureStartTime) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "packetCaptureError", p.PacketCaptureError) + populate(objectMap, "packetCaptureStatus", p.PacketCaptureStatus) + populate(objectMap, "stopReason", p.StopReason) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PacketCaptureQueryStatusResult. +func (p *PacketCaptureQueryStatusResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "captureStartTime": + err = unpopulateTimeRFC3339(val, &p.CaptureStartTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &p.Name) + delete(rawMsg, key) + case "packetCaptureError": + err = unpopulate(val, &p.PacketCaptureError) + delete(rawMsg, key) + case "packetCaptureStatus": + err = unpopulate(val, &p.PacketCaptureStatus) + delete(rawMsg, key) + case "stopReason": + err = unpopulate(val, &p.StopReason) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PacketCaptureResultProperties. +func (p PacketCaptureResultProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bytesToCapturePerPacket", p.BytesToCapturePerPacket) + populate(objectMap, "filters", p.Filters) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "storageLocation", p.StorageLocation) + populate(objectMap, "target", p.Target) + populate(objectMap, "timeLimitInSeconds", p.TimeLimitInSeconds) + populate(objectMap, "totalBytesPerSession", p.TotalBytesPerSession) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PatchRouteFilter. +func (p PatchRouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PeerExpressRouteCircuitConnectionListResult. +func (p PeerExpressRouteCircuitConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PeerRouteList. +func (p PeerRouteList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrepareNetworkPoliciesRequest. +func (p PrepareNetworkPoliciesRequest) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "networkIntentPolicyConfigurations", p.NetworkIntentPolicyConfigurations) + populate(objectMap, "serviceName", p.ServiceName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupListResult. +func (p PrivateDNSZoneGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZoneGroupPropertiesFormat. +func (p PrivateDNSZoneGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateDnsZoneConfigs", p.PrivateDNSZoneConfigs) + populate(objectMap, "provisioningState", p.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateDNSZonePropertiesFormat. +func (p PrivateDNSZonePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "privateDnsZoneId", p.PrivateDNSZoneID) + populate(objectMap, "recordSets", p.RecordSets) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpoint. +func (p PrivateEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult. +func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointListResult. +func (p PrivateEndpointListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperties. +func (p PrivateEndpointProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationSecurityGroups", p.ApplicationSecurityGroups) + populate(objectMap, "customDnsConfigs", p.CustomDNSConfigs) + populate(objectMap, "customNetworkInterfaceName", p.CustomNetworkInterfaceName) + populate(objectMap, "ipConfigurations", p.IPConfigurations) + populate(objectMap, "manualPrivateLinkServiceConnections", p.ManualPrivateLinkServiceConnections) + populate(objectMap, "networkInterfaces", p.NetworkInterfaces) + populate(objectMap, "privateLinkServiceConnections", p.PrivateLinkServiceConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "subnet", p.Subnet) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkService. +func (p PrivateLinkService) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionProperties. +func (p PrivateLinkServiceConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "groupIds", p.GroupIDs) + populate(objectMap, "privateLinkServiceConnectionState", p.PrivateLinkServiceConnectionState) + populate(objectMap, "privateLinkServiceId", p.PrivateLinkServiceID) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "requestMessage", p.RequestMessage) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceListResult. +func (p PrivateLinkServiceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceProperties. +func (p PrivateLinkServiceProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "alias", p.Alias) + populate(objectMap, "autoApproval", p.AutoApproval) + populate(objectMap, "enableProxyProtocol", p.EnableProxyProtocol) + populate(objectMap, "fqdns", p.Fqdns) + populate(objectMap, "ipConfigurations", p.IPConfigurations) + populate(objectMap, "loadBalancerFrontendIpConfigurations", p.LoadBalancerFrontendIPConfigurations) + populate(objectMap, "networkInterfaces", p.NetworkInterfaces) + populate(objectMap, "privateEndpointConnections", p.PrivateEndpointConnections) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "visibility", p.Visibility) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesAutoApproval. +func (p PrivateLinkServicePropertiesAutoApproval) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "subscriptions", p.Subscriptions) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PrivateLinkServicePropertiesVisibility. +func (p PrivateLinkServicePropertiesVisibility) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "subscriptions", p.Subscriptions) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ProbePropertiesFormat. +func (p ProbePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "intervalInSeconds", p.IntervalInSeconds) + populate(objectMap, "loadBalancingRules", p.LoadBalancingRules) + populate(objectMap, "numberOfProbes", p.NumberOfProbes) + populate(objectMap, "port", p.Port) + populate(objectMap, "protocol", p.Protocol) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "requestPath", p.RequestPath) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Profile. +func (p Profile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ProfileListResult. +func (p ProfileListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ProfilePropertiesFormat. +func (p ProfilePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "containerNetworkInterfaceConfigurations", p.ContainerNetworkInterfaceConfigurations) + populate(objectMap, "containerNetworkInterfaces", p.ContainerNetworkInterfaces) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "resourceGuid", p.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PropagatedRouteTable. +func (p PropagatedRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ids", p.IDs) + populate(objectMap, "labels", p.Labels) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddress. +func (p PublicIPAddress) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + populate(objectMap, "zones", p.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressListResult. +func (p PublicIPAddressListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPAddressPropertiesFormat. +func (p PublicIPAddressPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "dnsSettings", p.DNSSettings) + populate(objectMap, "ddosSettings", p.DdosSettings) + populate(objectMap, "deleteOption", p.DeleteOption) + populate(objectMap, "ipAddress", p.IPAddress) + populate(objectMap, "ipConfiguration", p.IPConfiguration) + populate(objectMap, "ipTags", p.IPTags) + populate(objectMap, "idleTimeoutInMinutes", p.IdleTimeoutInMinutes) + populate(objectMap, "linkedPublicIPAddress", p.LinkedPublicIPAddress) + populate(objectMap, "migrationPhase", p.MigrationPhase) + populate(objectMap, "natGateway", p.NatGateway) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) + populate(objectMap, "publicIPAllocationMethod", p.PublicIPAllocationMethod) + populate(objectMap, "publicIPPrefix", p.PublicIPPrefix) + populate(objectMap, "resourceGuid", p.ResourceGUID) + populate(objectMap, "servicePublicIPAddress", p.ServicePublicIPAddress) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefix. +func (p PublicIPPrefix) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", p.Etag) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "location", p.Location) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "sku", p.SKU) + populate(objectMap, "tags", p.Tags) + populate(objectMap, "type", p.Type) + populate(objectMap, "zones", p.Zones) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixListResult. +func (p PublicIPPrefixListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type PublicIPPrefixPropertiesFormat. +func (p PublicIPPrefixPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "customIPPrefix", p.CustomIPPrefix) + populate(objectMap, "ipPrefix", p.IPPrefix) + populate(objectMap, "ipTags", p.IPTags) + populate(objectMap, "loadBalancerFrontendIpConfiguration", p.LoadBalancerFrontendIPConfiguration) + populate(objectMap, "natGateway", p.NatGateway) + populate(objectMap, "prefixLength", p.PrefixLength) + populate(objectMap, "provisioningState", p.ProvisioningState) + populate(objectMap, "publicIPAddressVersion", p.PublicIPAddressVersion) + populate(objectMap, "publicIPAddresses", p.PublicIPAddresses) + populate(objectMap, "resourceGuid", p.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type QosDefinition. +func (q QosDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinationIpRanges", q.DestinationIPRanges) + populate(objectMap, "destinationPortRanges", q.DestinationPortRanges) + populate(objectMap, "markings", q.Markings) + populate(objectMap, "protocol", q.Protocol) + populate(objectMap, "sourceIpRanges", q.SourceIPRanges) + populate(objectMap, "sourcePortRanges", q.SourcePortRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type QueryResults. +func (q QueryResults) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "matchingRecordsCount", q.MatchingRecordsCount) + populate(objectMap, "signatures", q.Signatures) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RecordSet. +func (r RecordSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "fqdn", r.Fqdn) + populate(objectMap, "ipAddresses", r.IPAddresses) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "recordSetName", r.RecordSetName) + populate(objectMap, "recordType", r.RecordType) + populate(objectMap, "ttl", r.TTL) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceNavigationLinksListResult. +func (r ResourceNavigationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ResourceSet. +func (r ResourceSet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "subscriptions", r.Subscriptions) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilter. +func (r RouteFilter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterListResult. +func (r RouteFilterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterPropertiesFormat. +func (r RouteFilterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "ipv6Peerings", r.IPv6Peerings) + populate(objectMap, "peerings", r.Peerings) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "rules", r.Rules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterRuleListResult. +func (r RouteFilterRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteFilterRulePropertiesFormat. +func (r RouteFilterRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "access", r.Access) + populate(objectMap, "communities", r.Communities) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "routeFilterRuleType", r.RouteFilterRuleType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteListResult. +func (r RouteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTable. +func (r RouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", r.Etag) + populate(objectMap, "id", r.ID) + populate(objectMap, "location", r.Location) + populate(objectMap, "name", r.Name) + populate(objectMap, "properties", r.Properties) + populate(objectMap, "tags", r.Tags) + populate(objectMap, "type", r.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTableListResult. +func (r RouteTableListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", r.NextLink) + populate(objectMap, "value", r.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RouteTablePropertiesFormat. +func (r RouteTablePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "disableBgpRoutePropagation", r.DisableBgpRoutePropagation) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "resourceGuid", r.ResourceGUID) + populate(objectMap, "routes", r.Routes) + populate(objectMap, "subnets", r.Subnets) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingIntentProperties. +func (r RoutingIntentProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "provisioningState", r.ProvisioningState) + populate(objectMap, "routingPolicies", r.RoutingPolicies) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type RoutingPolicy. +func (r RoutingPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinations", r.Destinations) + populate(objectMap, "name", r.Name) + populate(objectMap, "nextHop", r.NextHop) + return json.Marshal(objectMap) +} + +// GetFirewallPolicyRule implements the FirewallPolicyRuleClassification interface for type Rule. +func (r *Rule) GetFirewallPolicyRule() *FirewallPolicyRule { + return &FirewallPolicyRule{ + Name: r.Name, + Description: r.Description, + RuleType: r.RuleType, + } +} + +// MarshalJSON implements the json.Marshaller interface for type Rule. +func (r Rule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", r.Description) + populate(objectMap, "destinationAddresses", r.DestinationAddresses) + populate(objectMap, "destinationFqdns", r.DestinationFqdns) + populate(objectMap, "destinationIpGroups", r.DestinationIPGroups) + populate(objectMap, "destinationPorts", r.DestinationPorts) + populate(objectMap, "ipProtocols", r.IPProtocols) + populate(objectMap, "name", r.Name) + objectMap["ruleType"] = FirewallPolicyRuleTypeNetworkRule + populate(objectMap, "sourceAddresses", r.SourceAddresses) + populate(objectMap, "sourceIpGroups", r.SourceIPGroups) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Rule. +func (r *Rule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "description": + err = unpopulate(val, &r.Description) + delete(rawMsg, key) + case "destinationAddresses": + err = unpopulate(val, &r.DestinationAddresses) + delete(rawMsg, key) + case "destinationFqdns": + err = unpopulate(val, &r.DestinationFqdns) + delete(rawMsg, key) + case "destinationIpGroups": + err = unpopulate(val, &r.DestinationIPGroups) + delete(rawMsg, key) + case "destinationPorts": + err = unpopulate(val, &r.DestinationPorts) + delete(rawMsg, key) + case "ipProtocols": + err = unpopulate(val, &r.IPProtocols) + delete(rawMsg, key) + case "name": + err = unpopulate(val, &r.Name) + delete(rawMsg, key) + case "ruleType": + err = unpopulate(val, &r.RuleType) + delete(rawMsg, key) + case "sourceAddresses": + err = unpopulate(val, &r.SourceAddresses) + delete(rawMsg, key) + case "sourceIpGroups": + err = unpopulate(val, &r.SourceIPGroups) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroup. +func (s SecurityGroup) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupListResult. +func (s SecurityGroupListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupPropertiesFormat. +func (s SecurityGroupPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) + populate(objectMap, "flowLogs", s.FlowLogs) + populate(objectMap, "networkInterfaces", s.NetworkInterfaces) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + populate(objectMap, "securityRules", s.SecurityRules) + populate(objectMap, "subnets", s.Subnets) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupResult. +func (s SecurityGroupResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "evaluatedNetworkSecurityGroups", s.EvaluatedNetworkSecurityGroups) + populate(objectMap, "securityRuleAccessResult", s.SecurityRuleAccessResult) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityGroupViewResult. +func (s SecurityGroupViewResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "networkInterfaces", s.NetworkInterfaces) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProvider. +func (s SecurityPartnerProvider) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityPartnerProviderListResult. +func (s SecurityPartnerProviderListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRuleAssociations. +func (s SecurityRuleAssociations) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "defaultSecurityRules", s.DefaultSecurityRules) + populate(objectMap, "effectiveSecurityRules", s.EffectiveSecurityRules) + populate(objectMap, "networkInterfaceAssociation", s.NetworkInterfaceAssociation) + populate(objectMap, "subnetAssociation", s.SubnetAssociation) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRuleListResult. +func (s SecurityRuleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SecurityRulePropertiesFormat. +func (s SecurityRulePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "access", s.Access) + populate(objectMap, "description", s.Description) + populate(objectMap, "destinationAddressPrefix", s.DestinationAddressPrefix) + populate(objectMap, "destinationAddressPrefixes", s.DestinationAddressPrefixes) + populate(objectMap, "destinationApplicationSecurityGroups", s.DestinationApplicationSecurityGroups) + populate(objectMap, "destinationPortRange", s.DestinationPortRange) + populate(objectMap, "destinationPortRanges", s.DestinationPortRanges) + populate(objectMap, "direction", s.Direction) + populate(objectMap, "priority", s.Priority) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "sourceAddressPrefix", s.SourceAddressPrefix) + populate(objectMap, "sourceAddressPrefixes", s.SourceAddressPrefixes) + populate(objectMap, "sourceApplicationSecurityGroups", s.SourceApplicationSecurityGroups) + populate(objectMap, "sourcePortRange", s.SourcePortRange) + populate(objectMap, "sourcePortRanges", s.SourcePortRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinkPropertiesFormat. +func (s ServiceAssociationLinkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowDelete", s.AllowDelete) + populate(objectMap, "link", s.Link) + populate(objectMap, "linkedResourceType", s.LinkedResourceType) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "provisioningState", s.ProvisioningState) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceAssociationLinksListResult. +func (s ServiceAssociationLinksListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceDelegationPropertiesFormat. +func (s ServiceDelegationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "actions", s.Actions) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "serviceName", s.ServiceName) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicy. +func (s ServiceEndpointPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", s.Etag) + populate(objectMap, "id", s.ID) + populate(objectMap, "kind", s.Kind) + populate(objectMap, "location", s.Location) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "tags", s.Tags) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionListResult. +func (s ServiceEndpointPolicyDefinitionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyDefinitionPropertiesFormat. +func (s ServiceEndpointPolicyDefinitionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", s.Description) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "service", s.Service) + populate(objectMap, "serviceResources", s.ServiceResources) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyListResult. +func (s ServiceEndpointPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPolicyPropertiesFormat. +func (s ServiceEndpointPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "contextualServiceEndpointPolicies", s.ContextualServiceEndpointPolicies) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "resourceGuid", s.ResourceGUID) + populate(objectMap, "serviceAlias", s.ServiceAlias) + populate(objectMap, "serviceEndpointPolicyDefinitions", s.ServiceEndpointPolicyDefinitions) + populate(objectMap, "subnets", s.Subnets) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceEndpointPropertiesFormat. +func (s ServiceEndpointPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "locations", s.Locations) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "service", s.Service) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationListResult. +func (s ServiceTagInformationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagInformationPropertiesFormat. +func (s ServiceTagInformationPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "changeNumber", s.ChangeNumber) + populate(objectMap, "region", s.Region) + populate(objectMap, "state", s.State) + populate(objectMap, "systemService", s.SystemService) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type ServiceTagsListResult. +func (s ServiceTagsListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "changeNumber", s.ChangeNumber) + populate(objectMap, "cloud", s.Cloud) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "type", s.Type) + populate(objectMap, "values", s.Values) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SessionIDs. +func (s SessionIDs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "sessionIds", s.SessionIDs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SignatureOverridesFilterValuesResponse. +func (s SignatureOverridesFilterValuesResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "filterValues", s.FilterValues) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverrides. +func (s SignaturesOverrides) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "name", s.Name) + populate(objectMap, "properties", s.Properties) + populate(objectMap, "type", s.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesList. +func (s SignaturesOverridesList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SignaturesOverridesProperties. +func (s SignaturesOverridesProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "signatures", s.Signatures) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SingleQueryResult. +func (s SingleQueryResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "description", s.Description) + populate(objectMap, "destinationPorts", s.DestinationPorts) + populate(objectMap, "direction", s.Direction) + populate(objectMap, "group", s.Group) + populate(objectMap, "inheritedFromParentPolicy", s.InheritedFromParentPolicy) + populate(objectMap, "lastUpdated", s.LastUpdated) + populate(objectMap, "mode", s.Mode) + populate(objectMap, "protocol", s.Protocol) + populate(objectMap, "severity", s.Severity) + populate(objectMap, "signatureId", s.SignatureID) + populate(objectMap, "sourcePorts", s.SourcePorts) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type StaticRoute. +func (s StaticRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "name", s.Name) + populate(objectMap, "nextHopIpAddress", s.NextHopIPAddress) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetAssociation. +func (s SubnetAssociation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", s.ID) + populate(objectMap, "securityRules", s.SecurityRules) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetListResult. +func (s SubnetListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", s.NextLink) + populate(objectMap, "value", s.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type SubnetPropertiesFormat. +func (s SubnetPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefix", s.AddressPrefix) + populate(objectMap, "addressPrefixes", s.AddressPrefixes) + populate(objectMap, "applicationGatewayIpConfigurations", s.ApplicationGatewayIPConfigurations) + populate(objectMap, "delegations", s.Delegations) + populate(objectMap, "ipAllocations", s.IPAllocations) + populate(objectMap, "ipConfigurationProfiles", s.IPConfigurationProfiles) + populate(objectMap, "ipConfigurations", s.IPConfigurations) + populate(objectMap, "natGateway", s.NatGateway) + populate(objectMap, "networkSecurityGroup", s.NetworkSecurityGroup) + populate(objectMap, "privateEndpointNetworkPolicies", s.PrivateEndpointNetworkPolicies) + populate(objectMap, "privateEndpoints", s.PrivateEndpoints) + populate(objectMap, "privateLinkServiceNetworkPolicies", s.PrivateLinkServiceNetworkPolicies) + populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "purpose", s.Purpose) + populate(objectMap, "resourceNavigationLinks", s.ResourceNavigationLinks) + populate(objectMap, "routeTable", s.RouteTable) + populate(objectMap, "serviceAssociationLinks", s.ServiceAssociationLinks) + populate(objectMap, "serviceEndpointPolicies", s.ServiceEndpointPolicies) + populate(objectMap, "serviceEndpoints", s.ServiceEndpoints) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type TagsObject. +func (t TagsObject) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "tags", t.Tags) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Topology. +func (t Topology) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populateTimeRFC3339(objectMap, "createdDateTime", t.CreatedDateTime) + populate(objectMap, "id", t.ID) + populateTimeRFC3339(objectMap, "lastModified", t.LastModified) + populate(objectMap, "resources", t.Resources) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type Topology. +func (t *Topology) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "createdDateTime": + err = unpopulateTimeRFC3339(val, &t.CreatedDateTime) + delete(rawMsg, key) + case "id": + err = unpopulate(val, &t.ID) + delete(rawMsg, key) + case "lastModified": + err = unpopulateTimeRFC3339(val, &t.LastModified) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, &t.Resources) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TopologyResource. +func (t TopologyResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "associations", t.Associations) + populate(objectMap, "id", t.ID) + populate(objectMap, "location", t.Location) + populate(objectMap, "name", t.Name) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type TrafficSelectorPolicy. +func (t TrafficSelectorPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "localAddressRanges", t.LocalAddressRanges) + populate(objectMap, "remoteAddressRanges", t.RemoteAddressRanges) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingDetails. +func (t TroubleshootingDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "detail", t.Detail) + populate(objectMap, "id", t.ID) + populate(objectMap, "reasonType", t.ReasonType) + populate(objectMap, "recommendedActions", t.RecommendedActions) + populate(objectMap, "summary", t.Summary) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type TroubleshootingResult. +func (t TroubleshootingResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "code", t.Code) + populateTimeRFC3339(objectMap, "endTime", t.EndTime) + populate(objectMap, "results", t.Results) + populateTimeRFC3339(objectMap, "startTime", t.StartTime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TroubleshootingResult. +func (t *TroubleshootingResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return err + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, &t.Code) + delete(rawMsg, key) + case "endTime": + err = unpopulateTimeRFC3339(val, &t.EndTime) + delete(rawMsg, key) + case "results": + err = unpopulate(val, &t.Results) + delete(rawMsg, key) + case "startTime": + err = unpopulateTimeRFC3339(val, &t.StartTime) + delete(rawMsg, key) + } + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UsagesListResult. +func (u UsagesListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VM. +func (v VM) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConfiguration. +func (v VPNClientConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aadAudience", v.AADAudience) + populate(objectMap, "aadIssuer", v.AADIssuer) + populate(objectMap, "aadTenant", v.AADTenant) + populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) + populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) + populate(objectMap, "radiusServers", v.RadiusServers) + populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) + populate(objectMap, "vpnClientAddressPool", v.VPNClientAddressPool) + populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) + populate(objectMap, "vpnClientProtocols", v.VPNClientProtocols) + populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) + populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealth. +func (v VPNClientConnectionHealth) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allocatedIpAddresses", v.AllocatedIPAddresses) + populate(objectMap, "totalEgressBytesTransferred", v.TotalEgressBytesTransferred) + populate(objectMap, "totalIngressBytesTransferred", v.TotalIngressBytesTransferred) + populate(objectMap, "vpnClientConnectionsCount", v.VPNClientConnectionsCount) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientConnectionHealthDetailListResult. +func (v VPNClientConnectionHealthDetailListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNClientParameters. +func (v VPNClientParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authenticationMethod", v.AuthenticationMethod) + populate(objectMap, "clientRootCertificates", v.ClientRootCertificates) + populate(objectMap, "processorArchitecture", v.ProcessorArchitecture) + populate(objectMap, "radiusServerAuthCertificate", v.RadiusServerAuthCertificate) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStartParameters. +func (v VPNConnectionPacketCaptureStartParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "filterData", v.FilterData) + populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionPacketCaptureStopParameters. +func (v VPNConnectionPacketCaptureStopParameters) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "linkConnectionNames", v.LinkConnectionNames) + populate(objectMap, "sasUrl", v.SasURL) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNConnectionProperties. +func (v VPNConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableInternetSecurity", v.EnableInternetSecurity) + populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "remoteVpnSite", v.RemoteVPNSite) + populate(objectMap, "routingConfiguration", v.RoutingConfiguration) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) + populate(objectMap, "vpnLinkConnections", v.VPNLinkConnections) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGateway. +func (v VPNGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayNatRuleProperties. +func (v VPNGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "egressVpnSiteLinkConnections", v.EgressVPNSiteLinkConnections) + populate(objectMap, "externalMappings", v.ExternalMappings) + populate(objectMap, "ipConfigurationId", v.IPConfigurationID) + populate(objectMap, "ingressVpnSiteLinkConnections", v.IngressVPNSiteLinkConnections) + populate(objectMap, "internalMappings", v.InternalMappings) + populate(objectMap, "mode", v.Mode) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNGatewayProperties. +func (v VPNGatewayProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bgpSettings", v.BgpSettings) + populate(objectMap, "connections", v.Connections) + populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "isRoutingPreferenceInternet", v.IsRoutingPreferenceInternet) + populate(objectMap, "natRules", v.NatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "vpnGatewayScaleUnit", v.VPNGatewayScaleUnit) + populate(objectMap, "virtualHub", v.VirtualHub) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfiguration. +func (v VPNServerConfiguration) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationProperties. +func (v VPNServerConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "aadAuthenticationParameters", v.AADAuthenticationParameters) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "name", v.Name) + populate(objectMap, "p2SVpnGateways", v.P2SVPNGateways) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "radiusClientRootCertificates", v.RadiusClientRootCertificates) + populate(objectMap, "radiusServerAddress", v.RadiusServerAddress) + populate(objectMap, "radiusServerRootCertificates", v.RadiusServerRootCertificates) + populate(objectMap, "radiusServerSecret", v.RadiusServerSecret) + populate(objectMap, "radiusServers", v.RadiusServers) + populate(objectMap, "vpnAuthenticationTypes", v.VPNAuthenticationTypes) + populate(objectMap, "vpnClientIpsecPolicies", v.VPNClientIPSecPolicies) + populate(objectMap, "vpnClientRevokedCertificates", v.VPNClientRevokedCertificates) + populate(objectMap, "vpnClientRootCertificates", v.VPNClientRootCertificates) + populate(objectMap, "vpnProtocols", v.VPNProtocols) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNServerConfigurationsResponse. +func (v VPNServerConfigurationsResponse) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "vpnServerConfigurationResourceIds", v.VPNServerConfigurationResourceIDs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSite. +func (v VPNSite) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteLinkConnectionProperties. +func (v VPNSiteLinkConnectionProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "connectionBandwidth", v.ConnectionBandwidth) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "egressNatRules", v.EgressNatRules) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableRateLimiting", v.EnableRateLimiting) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "ingressNatRules", v.IngressNatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "vpnConnectionProtocolType", v.VPNConnectionProtocolType) + populate(objectMap, "vpnLinkConnectionMode", v.VPNLinkConnectionMode) + populate(objectMap, "vpnSiteLink", v.VPNSiteLink) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VPNSiteProperties. +func (v VPNSiteProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressSpace", v.AddressSpace) + populate(objectMap, "bgpProperties", v.BgpProperties) + populate(objectMap, "deviceProperties", v.DeviceProperties) + populate(objectMap, "ipAddress", v.IPAddress) + populate(objectMap, "isSecuritySite", v.IsSecuritySite) + populate(objectMap, "o365Policy", v.O365Policy) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "siteKey", v.SiteKey) + populate(objectMap, "vpnSiteLinks", v.VPNSiteLinks) + populate(objectMap, "virtualWan", v.VirtualWan) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualAppliance. +func (v VirtualAppliance) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "identity", v.Identity) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceListResult. +func (v VirtualApplianceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualAppliancePropertiesFormat. +func (v VirtualAppliancePropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefix", v.AddressPrefix) + populate(objectMap, "bootStrapConfigurationBlobs", v.BootStrapConfigurationBlobs) + populate(objectMap, "cloudInitConfiguration", v.CloudInitConfiguration) + populate(objectMap, "cloudInitConfigurationBlobs", v.CloudInitConfigurationBlobs) + populate(objectMap, "inboundSecurityRules", v.InboundSecurityRules) + populate(objectMap, "nvaSku", v.NvaSKU) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "sshPublicKey", v.SSHPublicKey) + populate(objectMap, "virtualApplianceAsn", v.VirtualApplianceAsn) + populate(objectMap, "virtualApplianceNics", v.VirtualApplianceNics) + populate(objectMap, "virtualApplianceSites", v.VirtualApplianceSites) + populate(objectMap, "virtualHub", v.VirtualHub) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKU. +func (v VirtualApplianceSKU) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUListResult. +func (v VirtualApplianceSKUListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSKUPropertiesFormat. +func (v VirtualApplianceSKUPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "availableScaleUnits", v.AvailableScaleUnits) + populate(objectMap, "availableVersions", v.AvailableVersions) + populate(objectMap, "vendor", v.Vendor) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualApplianceSiteListResult. +func (v VirtualApplianceSiteListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHub. +func (v VirtualHub) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "kind", v.Kind) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRoute. +func (v VirtualHubEffectiveRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefixes", v.AddressPrefixes) + populate(objectMap, "asPath", v.AsPath) + populate(objectMap, "nextHopType", v.NextHopType) + populate(objectMap, "nextHops", v.NextHops) + populate(objectMap, "routeOrigin", v.RouteOrigin) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubEffectiveRouteList. +func (v VirtualHubEffectiveRouteList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubProperties. +func (v VirtualHubProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefix", v.AddressPrefix) + populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) + populate(objectMap, "azureFirewall", v.AzureFirewall) + populate(objectMap, "bgpConnections", v.BgpConnections) + populate(objectMap, "expressRouteGateway", v.ExpressRouteGateway) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "p2SVpnGateway", v.P2SVPNGateway) + populate(objectMap, "preferredRoutingGateway", v.PreferredRoutingGateway) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routeTable", v.RouteTable) + populate(objectMap, "routingState", v.RoutingState) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "securityPartnerProvider", v.SecurityPartnerProvider) + populate(objectMap, "securityProviderName", v.SecurityProviderName) + populate(objectMap, "vpnGateway", v.VPNGateway) + populate(objectMap, "virtualHubRouteTableV2s", v.VirtualHubRouteTableV2S) + populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) + populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) + populate(objectMap, "virtualWan", v.VirtualWan) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRoute. +func (v VirtualHubRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressPrefixes", v.AddressPrefixes) + populate(objectMap, "nextHopIpAddress", v.NextHopIPAddress) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTable. +func (v VirtualHubRouteTable) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "routes", v.Routes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteTableV2Properties. +func (v VirtualHubRouteTableV2Properties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "attachedConnections", v.AttachedConnections) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "routes", v.Routes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualHubRouteV2. +func (v VirtualHubRouteV2) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinationType", v.DestinationType) + populate(objectMap, "destinations", v.Destinations) + populate(objectMap, "nextHopType", v.NextHopType) + populate(objectMap, "nextHops", v.NextHops) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetwork. +func (v VirtualNetwork) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "extendedLocation", v.ExtendedLocation) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGateway. +func (v VirtualNetworkGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "extendedLocation", v.ExtendedLocation) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnection. +func (v VirtualNetworkGatewayConnection) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntity. +func (v VirtualNetworkGatewayConnectionListEntity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListEntityPropertiesFormat. +func (v VirtualNetworkGatewayConnectionListEntityPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorizationKey", v.AuthorizationKey) + populate(objectMap, "connectionMode", v.ConnectionMode) + populate(objectMap, "connectionProtocol", v.ConnectionProtocol) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "connectionType", v.ConnectionType) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) + populate(objectMap, "peer", v.Peer) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) + populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionListResult. +func (v VirtualNetworkGatewayConnectionListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayConnectionPropertiesFormat. +func (v VirtualNetworkGatewayConnectionPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "authorizationKey", v.AuthorizationKey) + populate(objectMap, "connectionMode", v.ConnectionMode) + populate(objectMap, "connectionProtocol", v.ConnectionProtocol) + populate(objectMap, "connectionStatus", v.ConnectionStatus) + populate(objectMap, "connectionType", v.ConnectionType) + populate(objectMap, "dpdTimeoutSeconds", v.DpdTimeoutSeconds) + populate(objectMap, "egressBytesTransferred", v.EgressBytesTransferred) + populate(objectMap, "egressNatRules", v.EgressNatRules) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "expressRouteGatewayBypass", v.ExpressRouteGatewayBypass) + populate(objectMap, "ipsecPolicies", v.IPSecPolicies) + populate(objectMap, "ingressBytesTransferred", v.IngressBytesTransferred) + populate(objectMap, "ingressNatRules", v.IngressNatRules) + populate(objectMap, "localNetworkGateway2", v.LocalNetworkGateway2) + populate(objectMap, "peer", v.Peer) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "routingWeight", v.RoutingWeight) + populate(objectMap, "sharedKey", v.SharedKey) + populate(objectMap, "trafficSelectorPolicies", v.TrafficSelectorPolicies) + populate(objectMap, "tunnelConnectionStatus", v.TunnelConnectionStatus) + populate(objectMap, "useLocalAzureIpAddress", v.UseLocalAzureIPAddress) + populate(objectMap, "usePolicyBasedTrafficSelectors", v.UsePolicyBasedTrafficSelectors) + populate(objectMap, "virtualNetworkGateway1", v.VirtualNetworkGateway1) + populate(objectMap, "virtualNetworkGateway2", v.VirtualNetworkGateway2) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListConnectionsResult. +func (v VirtualNetworkGatewayListConnectionsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayListResult. +func (v VirtualNetworkGatewayListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayNatRuleProperties. +func (v VirtualNetworkGatewayNatRuleProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "externalMappings", v.ExternalMappings) + populate(objectMap, "ipConfigurationId", v.IPConfigurationID) + populate(objectMap, "internalMappings", v.InternalMappings) + populate(objectMap, "mode", v.Mode) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkGatewayPropertiesFormat. +func (v VirtualNetworkGatewayPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "activeActive", v.Active) + populate(objectMap, "bgpSettings", v.BgpSettings) + populate(objectMap, "customRoutes", v.CustomRoutes) + populate(objectMap, "disableIPSecReplayProtection", v.DisableIPSecReplayProtection) + populate(objectMap, "enableBgp", v.EnableBgp) + populate(objectMap, "enableBgpRouteTranslationForNat", v.EnableBgpRouteTranslationForNat) + populate(objectMap, "enableDnsForwarding", v.EnableDNSForwarding) + populate(objectMap, "enablePrivateIpAddress", v.EnablePrivateIPAddress) + populate(objectMap, "gatewayDefaultSite", v.GatewayDefaultSite) + populate(objectMap, "gatewayType", v.GatewayType) + populate(objectMap, "ipConfigurations", v.IPConfigurations) + populate(objectMap, "inboundDnsForwardingEndpoint", v.InboundDNSForwardingEndpoint) + populate(objectMap, "natRules", v.NatRules) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "sku", v.SKU) + populate(objectMap, "vNetExtendedLocationResourceId", v.VNetExtendedLocationResourceID) + populate(objectMap, "vpnClientConfiguration", v.VPNClientConfiguration) + populate(objectMap, "vpnGatewayGeneration", v.VPNGatewayGeneration) + populate(objectMap, "vpnType", v.VPNType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListResult. +func (v VirtualNetworkListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkListUsageResult. +func (v VirtualNetworkListUsageResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPeeringListResult. +func (v VirtualNetworkPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesFormat. +func (v VirtualNetworkPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "addressSpace", v.AddressSpace) + populate(objectMap, "bgpCommunities", v.BgpCommunities) + populate(objectMap, "ddosProtectionPlan", v.DdosProtectionPlan) + populate(objectMap, "dhcpOptions", v.DhcpOptions) + populate(objectMap, "enableDdosProtection", v.EnableDdosProtection) + populate(objectMap, "enableVmProtection", v.EnableVMProtection) + populate(objectMap, "encryption", v.Encryption) + populate(objectMap, "flowTimeoutInMinutes", v.FlowTimeoutInMinutes) + populate(objectMap, "ipAllocations", v.IPAllocations) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + populate(objectMap, "subnets", v.Subnets) + populate(objectMap, "virtualNetworkPeerings", v.VirtualNetworkPeerings) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTap. +func (v VirtualNetworkTap) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapListResult. +func (v VirtualNetworkTapListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkTapPropertiesFormat. +func (v VirtualNetworkTapPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "destinationLoadBalancerFrontEndIPConfiguration", v.DestinationLoadBalancerFrontEndIPConfiguration) + populate(objectMap, "destinationNetworkInterfaceIPConfiguration", v.DestinationNetworkInterfaceIPConfiguration) + populate(objectMap, "destinationPort", v.DestinationPort) + populate(objectMap, "networkInterfaceTapConfigurations", v.NetworkInterfaceTapConfigurations) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "resourceGuid", v.ResourceGUID) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouter. +func (v VirtualRouter) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterListResult. +func (v VirtualRouterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPeeringListResult. +func (v VirtualRouterPeeringListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", v.NextLink) + populate(objectMap, "value", v.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualRouterPropertiesFormat. +func (v VirtualRouterPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "hostedGateway", v.HostedGateway) + populate(objectMap, "hostedSubnet", v.HostedSubnet) + populate(objectMap, "peerings", v.Peerings) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "virtualRouterAsn", v.VirtualRouterAsn) + populate(objectMap, "virtualRouterIps", v.VirtualRouterIPs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWAN. +func (v VirtualWAN) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", v.Etag) + populate(objectMap, "id", v.ID) + populate(objectMap, "location", v.Location) + populate(objectMap, "name", v.Name) + populate(objectMap, "properties", v.Properties) + populate(objectMap, "tags", v.Tags) + populate(objectMap, "type", v.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanProperties. +func (v VirtualWanProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "allowBranchToBranchTraffic", v.AllowBranchToBranchTraffic) + populate(objectMap, "allowVnetToVnetTraffic", v.AllowVnetToVnetTraffic) + populate(objectMap, "disableVpnEncryption", v.DisableVPNEncryption) + populate(objectMap, "office365LocalBreakoutCategory", v.Office365LocalBreakoutCategory) + populate(objectMap, "provisioningState", v.ProvisioningState) + populate(objectMap, "type", v.Type) + populate(objectMap, "vpnSites", v.VPNSites) + populate(objectMap, "virtualHubs", v.VirtualHubs) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VirtualWanSecurityProviders. +func (v VirtualWanSecurityProviders) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "supportedProviders", v.SupportedProviders) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type VnetRoute. +func (v VnetRoute) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "bgpConnections", v.BgpConnections) + populate(objectMap, "staticRoutes", v.StaticRoutes) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type Watcher. +func (w Watcher) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type WatcherListResult. +func (w WatcherListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallCustomRule. +func (w WebApplicationFirewallCustomRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "action", w.Action) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "matchConditions", w.MatchConditions) + populate(objectMap, "name", w.Name) + populate(objectMap, "priority", w.Priority) + populate(objectMap, "ruleType", w.RuleType) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicy. +func (w WebApplicationFirewallPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "etag", w.Etag) + populate(objectMap, "id", w.ID) + populate(objectMap, "location", w.Location) + populate(objectMap, "name", w.Name) + populate(objectMap, "properties", w.Properties) + populate(objectMap, "tags", w.Tags) + populate(objectMap, "type", w.Type) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyListResult. +func (w WebApplicationFirewallPolicyListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "nextLink", w.NextLink) + populate(objectMap, "value", w.Value) + return json.Marshal(objectMap) +} + +// MarshalJSON implements the json.Marshaller interface for type WebApplicationFirewallPolicyPropertiesFormat. +func (w WebApplicationFirewallPolicyPropertiesFormat) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + populate(objectMap, "applicationGateways", w.ApplicationGateways) + populate(objectMap, "customRules", w.CustomRules) + populate(objectMap, "httpListeners", w.HTTPListeners) + populate(objectMap, "managedRules", w.ManagedRules) + populate(objectMap, "pathBasedRules", w.PathBasedRules) + populate(objectMap, "policySettings", w.PolicySettings) + populate(objectMap, "provisioningState", w.ProvisioningState) + populate(objectMap, "resourceState", w.ResourceState) + return json.Marshal(objectMap) +} + +func populate(m map[string]interface{}, k string, v interface{}) { + if v == nil { + return + } else if azcore.IsNullValue(v) { + m[k] = nil + } else if !reflect.ValueOf(v).IsNil() { + m[k] = v + } +} + +func unpopulate(data json.RawMessage, v interface{}) error { + if data == nil { + return nil + } + return json.Unmarshal(data, v) +} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go index 9803b0129150..2ba39e63925e 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_natgateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type NatGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *NatGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &NatGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a nat gateway. @@ -57,22 +62,18 @@ func NewNatGatewaysClient(subscriptionID string, credential azcore.TokenCredenti // parameters - Parameters supplied to the create or update nat gateway operation. // options - NatGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the NatGatewaysClient.BeginCreateOrUpdate // method. -func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (NatGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, options) - if err != nil { - return NatGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := NatGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *NatGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, natGatewayName string, parameters NatGateway, options *NatGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[NatGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, natGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[NatGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[NatGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("NatGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return NatGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &NatGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a nat gateway. @@ -123,22 +124,18 @@ func (client *NatGatewaysClient) createOrUpdateCreateRequest(ctx context.Context // resourceGroupName - The name of the resource group. // natGatewayName - The name of the nat gateway. // options - NatGatewaysClientBeginDeleteOptions contains the optional parameters for the NatGatewaysClient.BeginDelete method. -func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (NatGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, natGatewayName, options) - if err != nil { - return NatGatewaysClientDeletePollerResponse{}, err - } - result := NatGatewaysClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("NatGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return NatGatewaysClientDeletePollerResponse{}, err +func (client *NatGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, natGatewayName string, options *NatGatewaysClientBeginDeleteOptions) (*armruntime.Poller[NatGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, natGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[NatGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[NatGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &NatGatewaysClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified nat gateway. @@ -235,7 +232,7 @@ func (client *NatGatewaysClient) getCreateRequest(ctx context.Context, resourceG // getHandleResponse handles the Get response. func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGatewaysClientGetResponse, error) { - result := NatGatewaysClientGetResponse{RawResponse: resp} + result := NatGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { return NatGatewaysClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *NatGatewaysClient) getHandleResponse(resp *http.Response) (NatGate // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - NatGatewaysClientListOptions contains the optional parameters for the NatGatewaysClient.List method. -func (client *NatGatewaysClient) List(resourceGroupName string, options *NatGatewaysClientListOptions) *NatGatewaysClientListPager { - return &NatGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *NatGatewaysClient) List(resourceGroupName string, options *NatGatewaysClientListOptions) *runtime.Pager[NatGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[NatGatewaysClientListResponse]{ + More: func(page NatGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp NatGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.NatGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *NatGatewaysClientListResponse) (NatGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return NatGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return NatGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return NatGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -282,7 +295,7 @@ func (client *NatGatewaysClient) listCreateRequest(ctx context.Context, resource // listHandleResponse handles the List response. func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGatewaysClientListResponse, error) { - result := NatGatewaysClientListResponse{RawResponse: resp} + result := NatGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { return NatGatewaysClientListResponse{}, err } @@ -292,16 +305,32 @@ func (client *NatGatewaysClient) listHandleResponse(resp *http.Response) (NatGat // ListAll - Gets all the Nat Gateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - NatGatewaysClientListAllOptions contains the optional parameters for the NatGatewaysClient.ListAll method. -func (client *NatGatewaysClient) ListAll(options *NatGatewaysClientListAllOptions) *NatGatewaysClientListAllPager { - return &NatGatewaysClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *NatGatewaysClient) ListAll(options *NatGatewaysClientListAllOptions) *runtime.Pager[NatGatewaysClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[NatGatewaysClientListAllResponse]{ + More: func(page NatGatewaysClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp NatGatewaysClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.NatGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *NatGatewaysClientListAllResponse) (NatGatewaysClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return NatGatewaysClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return NatGatewaysClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return NatGatewaysClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -324,7 +353,7 @@ func (client *NatGatewaysClient) listAllCreateRequest(ctx context.Context, optio // listAllHandleResponse handles the ListAll response. func (client *NatGatewaysClient) listAllHandleResponse(resp *http.Response) (NatGatewaysClientListAllResponse, error) { - result := NatGatewaysClientListAllResponse{RawResponse: resp} + result := NatGatewaysClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.NatGatewayListResult); err != nil { return NatGatewaysClientListAllResponse{}, err } @@ -380,7 +409,7 @@ func (client *NatGatewaysClient) updateTagsCreateRequest(ctx context.Context, re // updateTagsHandleResponse handles the UpdateTags response. func (client *NatGatewaysClient) updateTagsHandleResponse(resp *http.Response) (NatGatewaysClientUpdateTagsResponse, error) { - result := NatGatewaysClientUpdateTagsResponse{RawResponse: resp} + result := NatGatewaysClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.NatGateway); err != nil { return NatGatewaysClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go index 4d5bc7674c79..d7004d72fa62 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_natrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type NatRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *NatRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NatRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &NatRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. @@ -58,22 +63,18 @@ func NewNatRulesClient(subscriptionID string, credential azcore.TokenCredential, // natRuleParameters - Parameters supplied to create or Update a Nat Rule. // options - NatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the NatRulesClient.BeginCreateOrUpdate // method. -func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (NatRulesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return NatRulesClientCreateOrUpdatePollerResponse{}, err - } - result := NatRulesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("NatRulesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return NatRulesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &NatRulesClientCreateOrUpdatePoller{ - pt: pt, +func (client *NatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, natRuleParameters VPNGatewayNatRule, options *NatRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[NatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[NatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[NatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat rules. @@ -129,22 +130,18 @@ func (client *NatRulesClient) createOrUpdateCreateRequest(ctx context.Context, r // gatewayName - The name of the gateway. // natRuleName - The name of the nat rule. // options - NatRulesClientBeginDeleteOptions contains the optional parameters for the NatRulesClient.BeginDelete method. -func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (NatRulesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, natRuleName, options) - if err != nil { - return NatRulesClientDeletePollerResponse{}, err - } - result := NatRulesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("NatRulesClient.Delete", "location", resp, client.pl) - if err != nil { - return NatRulesClientDeletePollerResponse{}, err - } - result.Poller = &NatRulesClientDeletePoller{ - pt: pt, +func (client *NatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, natRuleName string, options *NatRulesClientBeginDeleteOptions) (*armruntime.Poller[NatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, natRuleName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[NatRulesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[NatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a nat rule. @@ -247,7 +244,7 @@ func (client *NatRulesClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesClientGetResponse, error) { - result := NatRulesClientGetResponse{RawResponse: resp} + result := NatRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNGatewayNatRule); err != nil { return NatRulesClientGetResponse{}, err } @@ -260,16 +257,32 @@ func (client *NatRulesClient) getHandleResponse(resp *http.Response) (NatRulesCl // gatewayName - The name of the gateway. // options - NatRulesClientListByVPNGatewayOptions contains the optional parameters for the NatRulesClient.ListByVPNGateway // method. -func (client *NatRulesClient) ListByVPNGateway(resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) *NatRulesClientListByVPNGatewayPager { - return &NatRulesClientListByVPNGatewayPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) +func (client *NatRulesClient) ListByVPNGateway(resourceGroupName string, gatewayName string, options *NatRulesClientListByVPNGatewayOptions) *runtime.Pager[NatRulesClientListByVPNGatewayResponse] { + return runtime.NewPager(runtime.PageProcessor[NatRulesClientListByVPNGatewayResponse]{ + More: func(page NatRulesClientListByVPNGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp NatRulesClientListByVPNGatewayResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNGatewayNatRulesResult.NextLink) + Fetcher: func(ctx context.Context, page *NatRulesClientListByVPNGatewayResponse) (NatRulesClientListByVPNGatewayResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return NatRulesClientListByVPNGatewayResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return NatRulesClientListByVPNGatewayResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return NatRulesClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) + } + return client.listByVPNGatewayHandleResponse(resp) }, - } + }) } // listByVPNGatewayCreateRequest creates the ListByVPNGateway request. @@ -300,7 +313,7 @@ func (client *NatRulesClient) listByVPNGatewayCreateRequest(ctx context.Context, // listByVPNGatewayHandleResponse handles the ListByVPNGateway response. func (client *NatRulesClient) listByVPNGatewayHandleResponse(resp *http.Response) (NatRulesClientListByVPNGatewayResponse, error) { - result := NatRulesClientListByVPNGatewayResponse{RawResponse: resp} + result := NatRulesClientListByVPNGatewayResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewayNatRulesResult); err != nil { return NatRulesClientListByVPNGatewayResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go index 48c0295acd64..f5adcef235bb 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_operations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -13,6 +13,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -28,34 +29,54 @@ type OperationsClient struct { // NewOperationsClient creates a new instance of OperationsClient with the specified values. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) *OperationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &OperationsClient{ - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Lists all of the available Network Rest API operations. // If the operation fails it returns an *azcore.ResponseError type. // options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method. -func (client *OperationsClient) List(options *OperationsClientListOptions) *OperationsClientListPager { - return &OperationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *OperationsClient) List(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[OperationsClientListResponse]{ + More: func(page OperationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp OperationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.OperationListResult.NextLink) + Fetcher: func(ctx context.Context, page *OperationsClientListResponse) (OperationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return OperationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return OperationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return OperationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -74,7 +95,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * // listHandleResponse handles the List response. func (client *OperationsClient) listHandleResponse(resp *http.Response) (OperationsClientListResponse, error) { - result := OperationsClientListResponse{RawResponse: resp} + result := OperationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.OperationListResult); err != nil { return OperationsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go index b06df08e622a..ee97a6343571 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_p2svpngateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type P2SVPNGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *P2SVPNGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*P2SVPNGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &P2SVPNGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. @@ -57,22 +62,18 @@ func NewP2SVPNGatewaysClient(subscriptionID string, credential azcore.TokenCrede // p2SVPNGatewayParameters - Parameters supplied to create or Update a virtual wan p2s vpn gateway. // options - P2SVPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginCreateOrUpdate // method. -func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (P2SVPNGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return P2SVPNGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := P2SVPNGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientCreateOrUpdatePollerResponse{}, err +func (client *P2SVPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters P2SVPNGateway, options *P2SVPNGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[P2SVPNGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &P2SVPNGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. @@ -124,22 +125,18 @@ func (client *P2SVPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Cont // gatewayName - The name of the gateway. // options - P2SVPNGatewaysClientBeginDeleteOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDelete // method. -func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (P2SVPNGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return P2SVPNGatewaysClientDeletePollerResponse{}, err - } - result := P2SVPNGatewaysClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientDeletePoller{ - pt: pt, +func (client *P2SVPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginDeleteOptions) (*armruntime.Poller[P2SVPNGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a virtual wan p2s vpn gateway. @@ -193,22 +190,18 @@ func (client *P2SVPNGatewaysClient) deleteCreateRequest(ctx context.Context, res // request - The parameters are supplied to disconnect p2s vpn connections. // options - P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginDisconnectP2SVPNConnections // method. -func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse, error) { - resp, err := client.disconnectP2SVPNConnections(ctx, resourceGroupName, p2SVPNGatewayName, request, options) - if err != nil { - return P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse{}, err +func (client *P2SVPNGatewaysClient) BeginDisconnectP2SVPNConnections(ctx context.Context, resourceGroupName string, p2SVPNGatewayName string, request P2SVPNConnectionRequest, options *P2SVPNGatewaysClientBeginDisconnectP2SVPNConnectionsOptions) (*armruntime.Poller[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disconnectP2SVPNConnections(ctx, resourceGroupName, p2SVPNGatewayName, request, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse](options.ResumeToken, client.pl, nil) } - result := P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.DisconnectP2SVPNConnections", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller{ - pt: pt, - } - return result, nil } // DisconnectP2SVPNConnections - Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource @@ -262,22 +255,18 @@ func (client *P2SVPNGatewaysClient) disconnectP2SVPNConnectionsCreateRequest(ctx // parameters - Parameters supplied to the generate P2SVpnGateway VPN client package operation. // options - P2SVPNGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGenerateVPNProfile // method. -func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (P2SVPNGatewaysClientGenerateVPNProfilePollerResponse, error) { - resp, err := client.generateVPNProfile(ctx, resourceGroupName, gatewayName, parameters, options) - if err != nil { - return P2SVPNGatewaysClientGenerateVPNProfilePollerResponse{}, err - } - result := P2SVPNGatewaysClientGenerateVPNProfilePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.GenerateVPNProfile", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientGenerateVPNProfilePollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientGenerateVPNProfilePoller{ - pt: pt, +func (client *P2SVPNGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVPNProfileParameters, options *P2SVPNGatewaysClientBeginGenerateVPNProfileOptions) (*armruntime.Poller[P2SVPNGatewaysClientGenerateVPNProfileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateVPNProfile(ctx, resourceGroupName, gatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientGenerateVPNProfileResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GenerateVPNProfile - Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. @@ -371,7 +360,7 @@ func (client *P2SVPNGatewaysClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *P2SVPNGatewaysClient) getHandleResponse(resp *http.Response) (P2SVPNGatewaysClientGetResponse, error) { - result := P2SVPNGatewaysClientGetResponse{RawResponse: resp} + result := P2SVPNGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.P2SVPNGateway); err != nil { return P2SVPNGatewaysClientGetResponse{}, err } @@ -385,22 +374,18 @@ func (client *P2SVPNGatewaysClient) getHandleResponse(resp *http.Response) (P2SV // gatewayName - The name of the P2SVpnGateway. // options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealth // method. -func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse, error) { - resp, err := client.getP2SVPNConnectionHealth(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse{}, err - } - result := P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.GetP2SVPNConnectionHealth", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse{}, err +func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealth(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthOptions) (*armruntime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getP2SVPNConnectionHealth(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller{ - pt: pt, - } - return result, nil } // GetP2SVPNConnectionHealth - Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified @@ -455,22 +440,18 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthCreateRequest(ctx c // request - Request parameters supplied to get p2s vpn connections detailed health. // options - P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginGetP2SVPNConnectionHealthDetailed // method. -func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse, error) { - resp, err := client.getP2SVPNConnectionHealthDetailed(ctx, resourceGroupName, gatewayName, request, options) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse{}, err +func (client *P2SVPNGatewaysClient) BeginGetP2SVPNConnectionHealthDetailed(ctx context.Context, resourceGroupName string, gatewayName string, request P2SVPNConnectionHealthRequest, options *P2SVPNGatewaysClientBeginGetP2SVPNConnectionHealthDetailedOptions) (*armruntime.Poller[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getP2SVPNConnectionHealthDetailed(ctx, resourceGroupName, gatewayName, request, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse](options.ResumeToken, client.pl, nil) } - result := P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller{ - pt: pt, - } - return result, nil } // GetP2SVPNConnectionHealthDetailed - Gets the sas url to get the connection health detail of P2S clients of the virtual @@ -520,16 +501,32 @@ func (client *P2SVPNGatewaysClient) getP2SVPNConnectionHealthDetailedCreateReque // List - Lists all the P2SVpnGateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - P2SVPNGatewaysClientListOptions contains the optional parameters for the P2SVPNGatewaysClient.List method. -func (client *P2SVPNGatewaysClient) List(options *P2SVPNGatewaysClientListOptions) *P2SVPNGatewaysClientListPager { - return &P2SVPNGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *P2SVPNGatewaysClient) List(options *P2SVPNGatewaysClientListOptions) *runtime.Pager[P2SVPNGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[P2SVPNGatewaysClientListResponse]{ + More: func(page P2SVPNGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp P2SVPNGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListP2SVPNGatewaysResult.NextLink) + Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListResponse) (P2SVPNGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return P2SVPNGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return P2SVPNGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return P2SVPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -552,7 +549,7 @@ func (client *P2SVPNGatewaysClient) listCreateRequest(ctx context.Context, optio // listHandleResponse handles the List response. func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListResponse, error) { - result := P2SVPNGatewaysClientListResponse{RawResponse: resp} + result := P2SVPNGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { return P2SVPNGatewaysClientListResponse{}, err } @@ -564,16 +561,32 @@ func (client *P2SVPNGatewaysClient) listHandleResponse(resp *http.Response) (P2S // resourceGroupName - The resource group name of the P2SVpnGateway. // options - P2SVPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the P2SVPNGatewaysClient.ListByResourceGroup // method. -func (client *P2SVPNGatewaysClient) ListByResourceGroup(resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) *P2SVPNGatewaysClientListByResourceGroupPager { - return &P2SVPNGatewaysClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *P2SVPNGatewaysClient) ListByResourceGroup(resourceGroupName string, options *P2SVPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[P2SVPNGatewaysClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[P2SVPNGatewaysClientListByResourceGroupResponse]{ + More: func(page P2SVPNGatewaysClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp P2SVPNGatewaysClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListP2SVPNGatewaysResult.NextLink) + Fetcher: func(ctx context.Context, page *P2SVPNGatewaysClientListByResourceGroupResponse) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return P2SVPNGatewaysClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return P2SVPNGatewaysClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return P2SVPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -600,7 +613,7 @@ func (client *P2SVPNGatewaysClient) listByResourceGroupCreateRequest(ctx context // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *P2SVPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (P2SVPNGatewaysClientListByResourceGroupResponse, error) { - result := P2SVPNGatewaysClientListByResourceGroupResponse{RawResponse: resp} + result := P2SVPNGatewaysClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListP2SVPNGatewaysResult); err != nil { return P2SVPNGatewaysClientListByResourceGroupResponse{}, err } @@ -613,22 +626,18 @@ func (client *P2SVPNGatewaysClient) listByResourceGroupHandleResponse(resp *http // gatewayName - The name of the gateway. // options - P2SVPNGatewaysClientBeginResetOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginReset // method. -func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (P2SVPNGatewaysClientResetPollerResponse, error) { - resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return P2SVPNGatewaysClientResetPollerResponse{}, err +func (client *P2SVPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *P2SVPNGatewaysClientBeginResetOptions) (*armruntime.Poller[P2SVPNGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientResetResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) } - result := P2SVPNGatewaysClientResetPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.Reset", "location", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientResetPollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientResetPoller{ - pt: pt, - } - return result, nil } // Reset - Resets the primary of the p2s vpn gateway in the specified resource group. @@ -681,22 +690,18 @@ func (client *P2SVPNGatewaysClient) resetCreateRequest(ctx context.Context, reso // p2SVPNGatewayParameters - Parameters supplied to update a virtual wan p2s vpn gateway tags. // options - P2SVPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the P2SVPNGatewaysClient.BeginUpdateTags // method. -func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (P2SVPNGatewaysClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) - if err != nil { - return P2SVPNGatewaysClientUpdateTagsPollerResponse{}, err - } - result := P2SVPNGatewaysClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("P2SVPNGatewaysClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return P2SVPNGatewaysClientUpdateTagsPollerResponse{}, err - } - result.Poller = &P2SVPNGatewaysClientUpdateTagsPoller{ - pt: pt, +func (client *P2SVPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVPNGatewayParameters TagsObject, options *P2SVPNGatewaysClientBeginUpdateTagsOptions) (*armruntime.Poller[P2SVPNGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, p2SVPNGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[P2SVPNGatewaysClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[P2SVPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // UpdateTags - Updates virtual wan p2s vpn gateway tags. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go index f46679e6171b..57e088202671 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_packetcaptures_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PacketCapturesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PacketCapturesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PacketCapturesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PacketCapturesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreate - Create and start a packet capture on the specified VM. @@ -58,22 +63,18 @@ func NewPacketCapturesClient(subscriptionID string, credential azcore.TokenCrede // parameters - Parameters that define the create packet capture operation. // options - PacketCapturesClientBeginCreateOptions contains the optional parameters for the PacketCapturesClient.BeginCreate // method. -func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (PacketCapturesClientCreatePollerResponse, error) { - resp, err := client.create(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) - if err != nil { - return PacketCapturesClientCreatePollerResponse{}, err - } - result := PacketCapturesClientCreatePollerResponse{ - RawResponse: resp, +func (client *PacketCapturesClient) BeginCreate(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, options *PacketCapturesClientBeginCreateOptions) (*armruntime.Poller[PacketCapturesClientCreateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.create(ctx, resourceGroupName, networkWatcherName, packetCaptureName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PacketCapturesClientCreateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[PacketCapturesClientCreateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PacketCapturesClient.Create", "azure-async-operation", resp, client.pl) - if err != nil { - return PacketCapturesClientCreatePollerResponse{}, err - } - result.Poller = &PacketCapturesClientCreatePoller{ - pt: pt, - } - return result, nil } // Create - Create and start a packet capture on the specified VM. @@ -130,22 +131,18 @@ func (client *PacketCapturesClient) createCreateRequest(ctx context.Context, res // packetCaptureName - The name of the packet capture session. // options - PacketCapturesClientBeginDeleteOptions contains the optional parameters for the PacketCapturesClient.BeginDelete // method. -func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (PacketCapturesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return PacketCapturesClientDeletePollerResponse{}, err - } - result := PacketCapturesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PacketCapturesClient.Delete", "location", resp, client.pl) - if err != nil { - return PacketCapturesClientDeletePollerResponse{}, err - } - result.Poller = &PacketCapturesClientDeletePoller{ - pt: pt, +func (client *PacketCapturesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginDeleteOptions) (*armruntime.Poller[PacketCapturesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PacketCapturesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PacketCapturesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified packet capture session. @@ -248,7 +245,7 @@ func (client *PacketCapturesClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (PacketCapturesClientGetResponse, error) { - result := PacketCapturesClientGetResponse{RawResponse: resp} + result := PacketCapturesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureResult); err != nil { return PacketCapturesClientGetResponse{}, err } @@ -262,22 +259,18 @@ func (client *PacketCapturesClient) getHandleResponse(resp *http.Response) (Pack // packetCaptureName - The name given to the packet capture session. // options - PacketCapturesClientBeginGetStatusOptions contains the optional parameters for the PacketCapturesClient.BeginGetStatus // method. -func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (PacketCapturesClientGetStatusPollerResponse, error) { - resp, err := client.getStatus(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return PacketCapturesClientGetStatusPollerResponse{}, err - } - result := PacketCapturesClientGetStatusPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PacketCapturesClient.GetStatus", "location", resp, client.pl) - if err != nil { - return PacketCapturesClientGetStatusPollerResponse{}, err - } - result.Poller = &PacketCapturesClientGetStatusPoller{ - pt: pt, +func (client *PacketCapturesClient) BeginGetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginGetStatusOptions) (*armruntime.Poller[PacketCapturesClientGetStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getStatus(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PacketCapturesClientGetStatusResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PacketCapturesClientGetStatusResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GetStatus - Query the status of a running packet capture session. @@ -332,19 +325,26 @@ func (client *PacketCapturesClient) getStatusCreateRequest(ctx context.Context, // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the Network Watcher resource. // options - PacketCapturesClientListOptions contains the optional parameters for the PacketCapturesClient.List method. -func (client *PacketCapturesClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) (PacketCapturesClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return PacketCapturesClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return PacketCapturesClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return PacketCapturesClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) +func (client *PacketCapturesClient) List(resourceGroupName string, networkWatcherName string, options *PacketCapturesClientListOptions) *runtime.Pager[PacketCapturesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PacketCapturesClientListResponse]{ + More: func(page PacketCapturesClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *PacketCapturesClientListResponse) (PacketCapturesClientListResponse, error) { + req, err := client.listCreateRequest(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return PacketCapturesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PacketCapturesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PacketCapturesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) } // listCreateRequest creates the List request. @@ -375,7 +375,7 @@ func (client *PacketCapturesClient) listCreateRequest(ctx context.Context, resou // listHandleResponse handles the List response. func (client *PacketCapturesClient) listHandleResponse(resp *http.Response) (PacketCapturesClientListResponse, error) { - result := PacketCapturesClientListResponse{RawResponse: resp} + result := PacketCapturesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PacketCaptureListResult); err != nil { return PacketCapturesClientListResponse{}, err } @@ -389,22 +389,18 @@ func (client *PacketCapturesClient) listHandleResponse(resp *http.Response) (Pac // packetCaptureName - The name of the packet capture session. // options - PacketCapturesClientBeginStopOptions contains the optional parameters for the PacketCapturesClient.BeginStop // method. -func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (PacketCapturesClientStopPollerResponse, error) { - resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) - if err != nil { - return PacketCapturesClientStopPollerResponse{}, err - } - result := PacketCapturesClientStopPollerResponse{ - RawResponse: resp, +func (client *PacketCapturesClient) BeginStop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, options *PacketCapturesClientBeginStopOptions) (*armruntime.Poller[PacketCapturesClientStopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stop(ctx, resourceGroupName, networkWatcherName, packetCaptureName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PacketCapturesClientStopResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PacketCapturesClientStopResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PacketCapturesClient.Stop", "location", resp, client.pl) - if err != nil { - return PacketCapturesClientStopPollerResponse{}, err - } - result.Poller = &PacketCapturesClientStopPoller{ - pt: pt, - } - return result, nil } // Stop - Stops a specified packet capture session. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_pagers.go b/sdk/resourcemanager/network/armnetwork/zz_generated_pagers.go deleted file mode 100644 index cf7eb4bbbe57..000000000000 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_pagers.go +++ /dev/null @@ -1,8275 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "reflect" -) - -// ApplicationGatewayPrivateEndpointConnectionsClientListPager provides operations for iterating over paged responses. -type ApplicationGatewayPrivateEndpointConnectionsClientListPager struct { - client *ApplicationGatewayPrivateEndpointConnectionsClient - current ApplicationGatewayPrivateEndpointConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationGatewayPrivateEndpointConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationGatewayPrivateEndpointConnectionListResult.NextLink == nil || len(*p.current.ApplicationGatewayPrivateEndpointConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationGatewayPrivateEndpointConnectionsClientListResponse page. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientListPager) PageResponse() ApplicationGatewayPrivateEndpointConnectionsClientListResponse { - return p.current -} - -// ApplicationGatewayPrivateLinkResourcesClientListPager provides operations for iterating over paged responses. -type ApplicationGatewayPrivateLinkResourcesClientListPager struct { - client *ApplicationGatewayPrivateLinkResourcesClient - current ApplicationGatewayPrivateLinkResourcesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationGatewayPrivateLinkResourcesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationGatewayPrivateLinkResourcesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationGatewayPrivateLinkResourcesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationGatewayPrivateLinkResourceListResult.NextLink == nil || len(*p.current.ApplicationGatewayPrivateLinkResourceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationGatewayPrivateLinkResourcesClientListResponse page. -func (p *ApplicationGatewayPrivateLinkResourcesClientListPager) PageResponse() ApplicationGatewayPrivateLinkResourcesClientListResponse { - return p.current -} - -// ApplicationGatewaysClientListAllPager provides operations for iterating over paged responses. -type ApplicationGatewaysClientListAllPager struct { - client *ApplicationGatewaysClient - current ApplicationGatewaysClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationGatewaysClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationGatewaysClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationGatewaysClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationGatewayListResult.NextLink == nil || len(*p.current.ApplicationGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationGatewaysClientListAllResponse page. -func (p *ApplicationGatewaysClientListAllPager) PageResponse() ApplicationGatewaysClientListAllResponse { - return p.current -} - -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager provides operations for iterating over paged responses. -type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager struct { - client *ApplicationGatewaysClient - current ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationGatewayAvailableSSLPredefinedPolicies.NextLink == nil || len(*p.current.ApplicationGatewayAvailableSSLPredefinedPolicies.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAvailableSSLPredefinedPoliciesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse page. -func (p *ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesPager) PageResponse() ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse { - return p.current -} - -// ApplicationGatewaysClientListPager provides operations for iterating over paged responses. -type ApplicationGatewaysClientListPager struct { - client *ApplicationGatewaysClient - current ApplicationGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationGatewayListResult.NextLink == nil || len(*p.current.ApplicationGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationGatewaysClientListResponse page. -func (p *ApplicationGatewaysClientListPager) PageResponse() ApplicationGatewaysClientListResponse { - return p.current -} - -// ApplicationSecurityGroupsClientListAllPager provides operations for iterating over paged responses. -type ApplicationSecurityGroupsClientListAllPager struct { - client *ApplicationSecurityGroupsClient - current ApplicationSecurityGroupsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationSecurityGroupsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationSecurityGroupsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationSecurityGroupsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationSecurityGroupListResult.NextLink == nil || len(*p.current.ApplicationSecurityGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationSecurityGroupsClientListAllResponse page. -func (p *ApplicationSecurityGroupsClientListAllPager) PageResponse() ApplicationSecurityGroupsClientListAllResponse { - return p.current -} - -// ApplicationSecurityGroupsClientListPager provides operations for iterating over paged responses. -type ApplicationSecurityGroupsClientListPager struct { - client *ApplicationSecurityGroupsClient - current ApplicationSecurityGroupsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ApplicationSecurityGroupsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ApplicationSecurityGroupsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ApplicationSecurityGroupsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ApplicationSecurityGroupListResult.NextLink == nil || len(*p.current.ApplicationSecurityGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ApplicationSecurityGroupsClientListResponse page. -func (p *ApplicationSecurityGroupsClientListPager) PageResponse() ApplicationSecurityGroupsClientListResponse { - return p.current -} - -// AvailableDelegationsClientListPager provides operations for iterating over paged responses. -type AvailableDelegationsClientListPager struct { - client *AvailableDelegationsClient - current AvailableDelegationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableDelegationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailableDelegationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailableDelegationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailableDelegationsResult.NextLink == nil || len(*p.current.AvailableDelegationsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailableDelegationsClientListResponse page. -func (p *AvailableDelegationsClientListPager) PageResponse() AvailableDelegationsClientListResponse { - return p.current -} - -// AvailableEndpointServicesClientListPager provides operations for iterating over paged responses. -type AvailableEndpointServicesClientListPager struct { - client *AvailableEndpointServicesClient - current AvailableEndpointServicesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableEndpointServicesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailableEndpointServicesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailableEndpointServicesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.EndpointServicesListResult.NextLink == nil || len(*p.current.EndpointServicesListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailableEndpointServicesClientListResponse page. -func (p *AvailableEndpointServicesClientListPager) PageResponse() AvailableEndpointServicesClientListResponse { - return p.current -} - -// AvailablePrivateEndpointTypesClientListByResourceGroupPager provides operations for iterating over paged responses. -type AvailablePrivateEndpointTypesClientListByResourceGroupPager struct { - client *AvailablePrivateEndpointTypesClient - current AvailablePrivateEndpointTypesClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailablePrivateEndpointTypesClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailablePrivateEndpointTypesClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailablePrivateEndpointTypesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailablePrivateEndpointTypesResult.NextLink == nil || len(*p.current.AvailablePrivateEndpointTypesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailablePrivateEndpointTypesClientListByResourceGroupResponse page. -func (p *AvailablePrivateEndpointTypesClientListByResourceGroupPager) PageResponse() AvailablePrivateEndpointTypesClientListByResourceGroupResponse { - return p.current -} - -// AvailablePrivateEndpointTypesClientListPager provides operations for iterating over paged responses. -type AvailablePrivateEndpointTypesClientListPager struct { - client *AvailablePrivateEndpointTypesClient - current AvailablePrivateEndpointTypesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailablePrivateEndpointTypesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailablePrivateEndpointTypesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailablePrivateEndpointTypesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailablePrivateEndpointTypesResult.NextLink == nil || len(*p.current.AvailablePrivateEndpointTypesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailablePrivateEndpointTypesClientListResponse page. -func (p *AvailablePrivateEndpointTypesClientListPager) PageResponse() AvailablePrivateEndpointTypesClientListResponse { - return p.current -} - -// AvailableResourceGroupDelegationsClientListPager provides operations for iterating over paged responses. -type AvailableResourceGroupDelegationsClientListPager struct { - client *AvailableResourceGroupDelegationsClient - current AvailableResourceGroupDelegationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableResourceGroupDelegationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailableResourceGroupDelegationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailableResourceGroupDelegationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailableDelegationsResult.NextLink == nil || len(*p.current.AvailableDelegationsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailableResourceGroupDelegationsClientListResponse page. -func (p *AvailableResourceGroupDelegationsClientListPager) PageResponse() AvailableResourceGroupDelegationsClientListResponse { - return p.current -} - -// AvailableServiceAliasesClientListByResourceGroupPager provides operations for iterating over paged responses. -type AvailableServiceAliasesClientListByResourceGroupPager struct { - client *AvailableServiceAliasesClient - current AvailableServiceAliasesClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableServiceAliasesClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailableServiceAliasesClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailableServiceAliasesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailableServiceAliasesResult.NextLink == nil || len(*p.current.AvailableServiceAliasesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailableServiceAliasesClientListByResourceGroupResponse page. -func (p *AvailableServiceAliasesClientListByResourceGroupPager) PageResponse() AvailableServiceAliasesClientListByResourceGroupResponse { - return p.current -} - -// AvailableServiceAliasesClientListPager provides operations for iterating over paged responses. -type AvailableServiceAliasesClientListPager struct { - client *AvailableServiceAliasesClient - current AvailableServiceAliasesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AvailableServiceAliasesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AvailableServiceAliasesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AvailableServiceAliasesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AvailableServiceAliasesResult.NextLink == nil || len(*p.current.AvailableServiceAliasesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AvailableServiceAliasesClientListResponse page. -func (p *AvailableServiceAliasesClientListPager) PageResponse() AvailableServiceAliasesClientListResponse { - return p.current -} - -// AzureFirewallFqdnTagsClientListAllPager provides operations for iterating over paged responses. -type AzureFirewallFqdnTagsClientListAllPager struct { - client *AzureFirewallFqdnTagsClient - current AzureFirewallFqdnTagsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AzureFirewallFqdnTagsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AzureFirewallFqdnTagsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AzureFirewallFqdnTagsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AzureFirewallFqdnTagListResult.NextLink == nil || len(*p.current.AzureFirewallFqdnTagListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AzureFirewallFqdnTagsClientListAllResponse page. -func (p *AzureFirewallFqdnTagsClientListAllPager) PageResponse() AzureFirewallFqdnTagsClientListAllResponse { - return p.current -} - -// AzureFirewallsClientListAllPager provides operations for iterating over paged responses. -type AzureFirewallsClientListAllPager struct { - client *AzureFirewallsClient - current AzureFirewallsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AzureFirewallsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AzureFirewallsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AzureFirewallsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AzureFirewallListResult.NextLink == nil || len(*p.current.AzureFirewallListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AzureFirewallsClientListAllResponse page. -func (p *AzureFirewallsClientListAllPager) PageResponse() AzureFirewallsClientListAllResponse { - return p.current -} - -// AzureFirewallsClientListPager provides operations for iterating over paged responses. -type AzureFirewallsClientListPager struct { - client *AzureFirewallsClient - current AzureFirewallsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, AzureFirewallsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *AzureFirewallsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *AzureFirewallsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AzureFirewallListResult.NextLink == nil || len(*p.current.AzureFirewallListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current AzureFirewallsClientListResponse page. -func (p *AzureFirewallsClientListPager) PageResponse() AzureFirewallsClientListResponse { - return p.current -} - -// BastionHostsClientListByResourceGroupPager provides operations for iterating over paged responses. -type BastionHostsClientListByResourceGroupPager struct { - client *BastionHostsClient - current BastionHostsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, BastionHostsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *BastionHostsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *BastionHostsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionHostListResult.NextLink == nil || len(*p.current.BastionHostListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current BastionHostsClientListByResourceGroupResponse page. -func (p *BastionHostsClientListByResourceGroupPager) PageResponse() BastionHostsClientListByResourceGroupResponse { - return p.current -} - -// BastionHostsClientListPager provides operations for iterating over paged responses. -type BastionHostsClientListPager struct { - client *BastionHostsClient - current BastionHostsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, BastionHostsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *BastionHostsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *BastionHostsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionHostListResult.NextLink == nil || len(*p.current.BastionHostListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current BastionHostsClientListResponse page. -func (p *BastionHostsClientListPager) PageResponse() BastionHostsClientListResponse { - return p.current -} - -// BgpServiceCommunitiesClientListPager provides operations for iterating over paged responses. -type BgpServiceCommunitiesClientListPager struct { - client *BgpServiceCommunitiesClient - current BgpServiceCommunitiesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, BgpServiceCommunitiesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *BgpServiceCommunitiesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *BgpServiceCommunitiesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.BgpServiceCommunityListResult.NextLink == nil || len(*p.current.BgpServiceCommunityListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current BgpServiceCommunitiesClientListResponse page. -func (p *BgpServiceCommunitiesClientListPager) PageResponse() BgpServiceCommunitiesClientListResponse { - return p.current -} - -// CustomIPPrefixesClientListAllPager provides operations for iterating over paged responses. -type CustomIPPrefixesClientListAllPager struct { - client *CustomIPPrefixesClient - current CustomIPPrefixesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, CustomIPPrefixesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *CustomIPPrefixesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *CustomIPPrefixesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.CustomIPPrefixListResult.NextLink == nil || len(*p.current.CustomIPPrefixListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current CustomIPPrefixesClientListAllResponse page. -func (p *CustomIPPrefixesClientListAllPager) PageResponse() CustomIPPrefixesClientListAllResponse { - return p.current -} - -// CustomIPPrefixesClientListPager provides operations for iterating over paged responses. -type CustomIPPrefixesClientListPager struct { - client *CustomIPPrefixesClient - current CustomIPPrefixesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, CustomIPPrefixesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *CustomIPPrefixesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *CustomIPPrefixesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.CustomIPPrefixListResult.NextLink == nil || len(*p.current.CustomIPPrefixListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current CustomIPPrefixesClientListResponse page. -func (p *CustomIPPrefixesClientListPager) PageResponse() CustomIPPrefixesClientListResponse { - return p.current -} - -// DdosProtectionPlansClientListByResourceGroupPager provides operations for iterating over paged responses. -type DdosProtectionPlansClientListByResourceGroupPager struct { - client *DdosProtectionPlansClient - current DdosProtectionPlansClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DdosProtectionPlansClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *DdosProtectionPlansClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *DdosProtectionPlansClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.DdosProtectionPlanListResult.NextLink == nil || len(*p.current.DdosProtectionPlanListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current DdosProtectionPlansClientListByResourceGroupResponse page. -func (p *DdosProtectionPlansClientListByResourceGroupPager) PageResponse() DdosProtectionPlansClientListByResourceGroupResponse { - return p.current -} - -// DdosProtectionPlansClientListPager provides operations for iterating over paged responses. -type DdosProtectionPlansClientListPager struct { - client *DdosProtectionPlansClient - current DdosProtectionPlansClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DdosProtectionPlansClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *DdosProtectionPlansClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *DdosProtectionPlansClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.DdosProtectionPlanListResult.NextLink == nil || len(*p.current.DdosProtectionPlanListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current DdosProtectionPlansClientListResponse page. -func (p *DdosProtectionPlansClientListPager) PageResponse() DdosProtectionPlansClientListResponse { - return p.current -} - -// DefaultSecurityRulesClientListPager provides operations for iterating over paged responses. -type DefaultSecurityRulesClientListPager struct { - client *DefaultSecurityRulesClient - current DefaultSecurityRulesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DefaultSecurityRulesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *DefaultSecurityRulesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *DefaultSecurityRulesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityRuleListResult.NextLink == nil || len(*p.current.SecurityRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current DefaultSecurityRulesClientListResponse page. -func (p *DefaultSecurityRulesClientListPager) PageResponse() DefaultSecurityRulesClientListResponse { - return p.current -} - -// DscpConfigurationClientListAllPager provides operations for iterating over paged responses. -type DscpConfigurationClientListAllPager struct { - client *DscpConfigurationClient - current DscpConfigurationClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DscpConfigurationClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *DscpConfigurationClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *DscpConfigurationClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.DscpConfigurationListResult.NextLink == nil || len(*p.current.DscpConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current DscpConfigurationClientListAllResponse page. -func (p *DscpConfigurationClientListAllPager) PageResponse() DscpConfigurationClientListAllResponse { - return p.current -} - -// DscpConfigurationClientListPager provides operations for iterating over paged responses. -type DscpConfigurationClientListPager struct { - client *DscpConfigurationClient - current DscpConfigurationClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, DscpConfigurationClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *DscpConfigurationClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *DscpConfigurationClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.DscpConfigurationListResult.NextLink == nil || len(*p.current.DscpConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current DscpConfigurationClientListResponse page. -func (p *DscpConfigurationClientListPager) PageResponse() DscpConfigurationClientListResponse { - return p.current -} - -// ExpressRouteCircuitAuthorizationsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCircuitAuthorizationsClientListPager struct { - client *ExpressRouteCircuitAuthorizationsClient - current ExpressRouteCircuitAuthorizationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCircuitAuthorizationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCircuitAuthorizationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCircuitAuthorizationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AuthorizationListResult.NextLink == nil || len(*p.current.AuthorizationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCircuitAuthorizationsClientListResponse page. -func (p *ExpressRouteCircuitAuthorizationsClientListPager) PageResponse() ExpressRouteCircuitAuthorizationsClientListResponse { - return p.current -} - -// ExpressRouteCircuitConnectionsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCircuitConnectionsClientListPager struct { - client *ExpressRouteCircuitConnectionsClient - current ExpressRouteCircuitConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCircuitConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCircuitConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCircuitConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCircuitConnectionListResult.NextLink == nil || len(*p.current.ExpressRouteCircuitConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCircuitConnectionsClientListResponse page. -func (p *ExpressRouteCircuitConnectionsClientListPager) PageResponse() ExpressRouteCircuitConnectionsClientListResponse { - return p.current -} - -// ExpressRouteCircuitPeeringsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCircuitPeeringsClientListPager struct { - client *ExpressRouteCircuitPeeringsClient - current ExpressRouteCircuitPeeringsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCircuitPeeringsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCircuitPeeringsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCircuitPeeringsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCircuitPeeringListResult.NextLink == nil || len(*p.current.ExpressRouteCircuitPeeringListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCircuitPeeringsClientListResponse page. -func (p *ExpressRouteCircuitPeeringsClientListPager) PageResponse() ExpressRouteCircuitPeeringsClientListResponse { - return p.current -} - -// ExpressRouteCircuitsClientListAllPager provides operations for iterating over paged responses. -type ExpressRouteCircuitsClientListAllPager struct { - client *ExpressRouteCircuitsClient - current ExpressRouteCircuitsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCircuitsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCircuitsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCircuitsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCircuitListResult.NextLink == nil || len(*p.current.ExpressRouteCircuitListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCircuitsClientListAllResponse page. -func (p *ExpressRouteCircuitsClientListAllPager) PageResponse() ExpressRouteCircuitsClientListAllResponse { - return p.current -} - -// ExpressRouteCircuitsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCircuitsClientListPager struct { - client *ExpressRouteCircuitsClient - current ExpressRouteCircuitsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCircuitsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCircuitsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCircuitsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCircuitListResult.NextLink == nil || len(*p.current.ExpressRouteCircuitListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCircuitsClientListResponse page. -func (p *ExpressRouteCircuitsClientListPager) PageResponse() ExpressRouteCircuitsClientListResponse { - return p.current -} - -// ExpressRouteCrossConnectionPeeringsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCrossConnectionPeeringsClientListPager struct { - client *ExpressRouteCrossConnectionPeeringsClient - current ExpressRouteCrossConnectionPeeringsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCrossConnectionPeeringsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCrossConnectionPeeringsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCrossConnectionPeeringsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCrossConnectionPeeringList.NextLink == nil || len(*p.current.ExpressRouteCrossConnectionPeeringList.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCrossConnectionPeeringsClientListResponse page. -func (p *ExpressRouteCrossConnectionPeeringsClientListPager) PageResponse() ExpressRouteCrossConnectionPeeringsClientListResponse { - return p.current -} - -// ExpressRouteCrossConnectionsClientListByResourceGroupPager provides operations for iterating over paged responses. -type ExpressRouteCrossConnectionsClientListByResourceGroupPager struct { - client *ExpressRouteCrossConnectionsClient - current ExpressRouteCrossConnectionsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCrossConnectionsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCrossConnectionsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCrossConnectionsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCrossConnectionListResult.NextLink == nil || len(*p.current.ExpressRouteCrossConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCrossConnectionsClientListByResourceGroupResponse page. -func (p *ExpressRouteCrossConnectionsClientListByResourceGroupPager) PageResponse() ExpressRouteCrossConnectionsClientListByResourceGroupResponse { - return p.current -} - -// ExpressRouteCrossConnectionsClientListPager provides operations for iterating over paged responses. -type ExpressRouteCrossConnectionsClientListPager struct { - client *ExpressRouteCrossConnectionsClient - current ExpressRouteCrossConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteCrossConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteCrossConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteCrossConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteCrossConnectionListResult.NextLink == nil || len(*p.current.ExpressRouteCrossConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteCrossConnectionsClientListResponse page. -func (p *ExpressRouteCrossConnectionsClientListPager) PageResponse() ExpressRouteCrossConnectionsClientListResponse { - return p.current -} - -// ExpressRouteLinksClientListPager provides operations for iterating over paged responses. -type ExpressRouteLinksClientListPager struct { - client *ExpressRouteLinksClient - current ExpressRouteLinksClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteLinksClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteLinksClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteLinksClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteLinkListResult.NextLink == nil || len(*p.current.ExpressRouteLinkListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteLinksClientListResponse page. -func (p *ExpressRouteLinksClientListPager) PageResponse() ExpressRouteLinksClientListResponse { - return p.current -} - -// ExpressRoutePortsClientListByResourceGroupPager provides operations for iterating over paged responses. -type ExpressRoutePortsClientListByResourceGroupPager struct { - client *ExpressRoutePortsClient - current ExpressRoutePortsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRoutePortsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRoutePortsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRoutePortsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRoutePortListResult.NextLink == nil || len(*p.current.ExpressRoutePortListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRoutePortsClientListByResourceGroupResponse page. -func (p *ExpressRoutePortsClientListByResourceGroupPager) PageResponse() ExpressRoutePortsClientListByResourceGroupResponse { - return p.current -} - -// ExpressRoutePortsClientListPager provides operations for iterating over paged responses. -type ExpressRoutePortsClientListPager struct { - client *ExpressRoutePortsClient - current ExpressRoutePortsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRoutePortsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRoutePortsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRoutePortsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRoutePortListResult.NextLink == nil || len(*p.current.ExpressRoutePortListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRoutePortsClientListResponse page. -func (p *ExpressRoutePortsClientListPager) PageResponse() ExpressRoutePortsClientListResponse { - return p.current -} - -// ExpressRoutePortsLocationsClientListPager provides operations for iterating over paged responses. -type ExpressRoutePortsLocationsClientListPager struct { - client *ExpressRoutePortsLocationsClient - current ExpressRoutePortsLocationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRoutePortsLocationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRoutePortsLocationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRoutePortsLocationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRoutePortsLocationListResult.NextLink == nil || len(*p.current.ExpressRoutePortsLocationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRoutePortsLocationsClientListResponse page. -func (p *ExpressRoutePortsLocationsClientListPager) PageResponse() ExpressRoutePortsLocationsClientListResponse { - return p.current -} - -// ExpressRouteServiceProvidersClientListPager provides operations for iterating over paged responses. -type ExpressRouteServiceProvidersClientListPager struct { - client *ExpressRouteServiceProvidersClient - current ExpressRouteServiceProvidersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ExpressRouteServiceProvidersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ExpressRouteServiceProvidersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ExpressRouteServiceProvidersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ExpressRouteServiceProviderListResult.NextLink == nil || len(*p.current.ExpressRouteServiceProviderListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ExpressRouteServiceProvidersClientListResponse page. -func (p *ExpressRouteServiceProvidersClientListPager) PageResponse() ExpressRouteServiceProvidersClientListResponse { - return p.current -} - -// FirewallPoliciesClientListAllPager provides operations for iterating over paged responses. -type FirewallPoliciesClientListAllPager struct { - client *FirewallPoliciesClient - current FirewallPoliciesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, FirewallPoliciesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *FirewallPoliciesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *FirewallPoliciesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.FirewallPolicyListResult.NextLink == nil || len(*p.current.FirewallPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current FirewallPoliciesClientListAllResponse page. -func (p *FirewallPoliciesClientListAllPager) PageResponse() FirewallPoliciesClientListAllResponse { - return p.current -} - -// FirewallPoliciesClientListPager provides operations for iterating over paged responses. -type FirewallPoliciesClientListPager struct { - client *FirewallPoliciesClient - current FirewallPoliciesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, FirewallPoliciesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *FirewallPoliciesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *FirewallPoliciesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.FirewallPolicyListResult.NextLink == nil || len(*p.current.FirewallPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current FirewallPoliciesClientListResponse page. -func (p *FirewallPoliciesClientListPager) PageResponse() FirewallPoliciesClientListResponse { - return p.current -} - -// FirewallPolicyRuleCollectionGroupsClientListPager provides operations for iterating over paged responses. -type FirewallPolicyRuleCollectionGroupsClientListPager struct { - client *FirewallPolicyRuleCollectionGroupsClient - current FirewallPolicyRuleCollectionGroupsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, FirewallPolicyRuleCollectionGroupsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *FirewallPolicyRuleCollectionGroupsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *FirewallPolicyRuleCollectionGroupsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.FirewallPolicyRuleCollectionGroupListResult.NextLink == nil || len(*p.current.FirewallPolicyRuleCollectionGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current FirewallPolicyRuleCollectionGroupsClientListResponse page. -func (p *FirewallPolicyRuleCollectionGroupsClientListPager) PageResponse() FirewallPolicyRuleCollectionGroupsClientListResponse { - return p.current -} - -// FlowLogsClientListPager provides operations for iterating over paged responses. -type FlowLogsClientListPager struct { - client *FlowLogsClient - current FlowLogsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, FlowLogsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *FlowLogsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *FlowLogsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.FlowLogListResult.NextLink == nil || len(*p.current.FlowLogListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current FlowLogsClientListResponse page. -func (p *FlowLogsClientListPager) PageResponse() FlowLogsClientListResponse { - return p.current -} - -// HubRouteTablesClientListPager provides operations for iterating over paged responses. -type HubRouteTablesClientListPager struct { - client *HubRouteTablesClient - current HubRouteTablesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, HubRouteTablesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *HubRouteTablesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *HubRouteTablesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListHubRouteTablesResult.NextLink == nil || len(*p.current.ListHubRouteTablesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current HubRouteTablesClientListResponse page. -func (p *HubRouteTablesClientListPager) PageResponse() HubRouteTablesClientListResponse { - return p.current -} - -// HubVirtualNetworkConnectionsClientListPager provides operations for iterating over paged responses. -type HubVirtualNetworkConnectionsClientListPager struct { - client *HubVirtualNetworkConnectionsClient - current HubVirtualNetworkConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, HubVirtualNetworkConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *HubVirtualNetworkConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *HubVirtualNetworkConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListHubVirtualNetworkConnectionsResult.NextLink == nil || len(*p.current.ListHubVirtualNetworkConnectionsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current HubVirtualNetworkConnectionsClientListResponse page. -func (p *HubVirtualNetworkConnectionsClientListPager) PageResponse() HubVirtualNetworkConnectionsClientListResponse { - return p.current -} - -// IPAllocationsClientListByResourceGroupPager provides operations for iterating over paged responses. -type IPAllocationsClientListByResourceGroupPager struct { - client *IPAllocationsClient - current IPAllocationsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, IPAllocationsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *IPAllocationsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *IPAllocationsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.IPAllocationListResult.NextLink == nil || len(*p.current.IPAllocationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current IPAllocationsClientListByResourceGroupResponse page. -func (p *IPAllocationsClientListByResourceGroupPager) PageResponse() IPAllocationsClientListByResourceGroupResponse { - return p.current -} - -// IPAllocationsClientListPager provides operations for iterating over paged responses. -type IPAllocationsClientListPager struct { - client *IPAllocationsClient - current IPAllocationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, IPAllocationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *IPAllocationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *IPAllocationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.IPAllocationListResult.NextLink == nil || len(*p.current.IPAllocationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current IPAllocationsClientListResponse page. -func (p *IPAllocationsClientListPager) PageResponse() IPAllocationsClientListResponse { - return p.current -} - -// IPGroupsClientListByResourceGroupPager provides operations for iterating over paged responses. -type IPGroupsClientListByResourceGroupPager struct { - client *IPGroupsClient - current IPGroupsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, IPGroupsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *IPGroupsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *IPGroupsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.IPGroupListResult.NextLink == nil || len(*p.current.IPGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current IPGroupsClientListByResourceGroupResponse page. -func (p *IPGroupsClientListByResourceGroupPager) PageResponse() IPGroupsClientListByResourceGroupResponse { - return p.current -} - -// IPGroupsClientListPager provides operations for iterating over paged responses. -type IPGroupsClientListPager struct { - client *IPGroupsClient - current IPGroupsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, IPGroupsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *IPGroupsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *IPGroupsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.IPGroupListResult.NextLink == nil || len(*p.current.IPGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current IPGroupsClientListResponse page. -func (p *IPGroupsClientListPager) PageResponse() IPGroupsClientListResponse { - return p.current -} - -// InboundNatRulesClientListPager provides operations for iterating over paged responses. -type InboundNatRulesClientListPager struct { - client *InboundNatRulesClient - current InboundNatRulesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InboundNatRulesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InboundNatRulesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InboundNatRulesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InboundNatRuleListResult.NextLink == nil || len(*p.current.InboundNatRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InboundNatRulesClientListResponse page. -func (p *InboundNatRulesClientListPager) PageResponse() InboundNatRulesClientListResponse { - return p.current -} - -// InterfaceIPConfigurationsClientListPager provides operations for iterating over paged responses. -type InterfaceIPConfigurationsClientListPager struct { - client *InterfaceIPConfigurationsClient - current InterfaceIPConfigurationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfaceIPConfigurationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfaceIPConfigurationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfaceIPConfigurationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceIPConfigurationListResult.NextLink == nil || len(*p.current.InterfaceIPConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfaceIPConfigurationsClientListResponse page. -func (p *InterfaceIPConfigurationsClientListPager) PageResponse() InterfaceIPConfigurationsClientListResponse { - return p.current -} - -// InterfaceLoadBalancersClientListPager provides operations for iterating over paged responses. -type InterfaceLoadBalancersClientListPager struct { - client *InterfaceLoadBalancersClient - current InterfaceLoadBalancersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfaceLoadBalancersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfaceLoadBalancersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfaceLoadBalancersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceLoadBalancerListResult.NextLink == nil || len(*p.current.InterfaceLoadBalancerListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfaceLoadBalancersClientListResponse page. -func (p *InterfaceLoadBalancersClientListPager) PageResponse() InterfaceLoadBalancersClientListResponse { - return p.current -} - -// InterfaceTapConfigurationsClientListPager provides operations for iterating over paged responses. -type InterfaceTapConfigurationsClientListPager struct { - client *InterfaceTapConfigurationsClient - current InterfaceTapConfigurationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfaceTapConfigurationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfaceTapConfigurationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfaceTapConfigurationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceTapConfigurationListResult.NextLink == nil || len(*p.current.InterfaceTapConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfaceTapConfigurationsClientListResponse page. -func (p *InterfaceTapConfigurationsClientListPager) PageResponse() InterfaceTapConfigurationsClientListResponse { - return p.current -} - -// InterfacesClientListAllPager provides operations for iterating over paged responses. -type InterfacesClientListAllPager struct { - client *InterfacesClient - current InterfacesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListAllResponse page. -func (p *InterfacesClientListAllPager) PageResponse() InterfacesClientListAllResponse { - return p.current -} - -// InterfacesClientListCloudServiceNetworkInterfacesPager provides operations for iterating over paged responses. -type InterfacesClientListCloudServiceNetworkInterfacesPager struct { - client *InterfacesClient - current InterfacesClientListCloudServiceNetworkInterfacesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListCloudServiceNetworkInterfacesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListCloudServiceNetworkInterfacesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListCloudServiceNetworkInterfacesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listCloudServiceNetworkInterfacesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListCloudServiceNetworkInterfacesResponse page. -func (p *InterfacesClientListCloudServiceNetworkInterfacesPager) PageResponse() InterfacesClientListCloudServiceNetworkInterfacesResponse { - return p.current -} - -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager provides operations for iterating over paged responses. -type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager struct { - client *InterfacesClient - current InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listCloudServiceRoleInstanceNetworkInterfacesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse page. -func (p *InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesPager) PageResponse() InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse { - return p.current -} - -// InterfacesClientListPager provides operations for iterating over paged responses. -type InterfacesClientListPager struct { - client *InterfacesClient - current InterfacesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListResponse page. -func (p *InterfacesClientListPager) PageResponse() InterfacesClientListResponse { - return p.current -} - -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager provides operations for iterating over paged responses. -type InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager struct { - client *InterfacesClient - current InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceIPConfigurationListResult.NextLink == nil || len(*p.current.InterfaceIPConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listVirtualMachineScaleSetIPConfigurationsHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse page. -func (p *InterfacesClientListVirtualMachineScaleSetIPConfigurationsPager) PageResponse() InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse { - return p.current -} - -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager provides operations for iterating over paged responses. -type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager struct { - client *InterfacesClient - current InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listVirtualMachineScaleSetNetworkInterfacesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse page. -func (p *InterfacesClientListVirtualMachineScaleSetNetworkInterfacesPager) PageResponse() InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse { - return p.current -} - -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager provides operations for iterating over paged responses. -type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager struct { - client *InterfacesClient - current InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listVirtualMachineScaleSetVMNetworkInterfacesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse page. -func (p *InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesPager) PageResponse() InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse { - return p.current -} - -// LoadBalancerBackendAddressPoolsClientListPager provides operations for iterating over paged responses. -type LoadBalancerBackendAddressPoolsClientListPager struct { - client *LoadBalancerBackendAddressPoolsClient - current LoadBalancerBackendAddressPoolsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerBackendAddressPoolsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerBackendAddressPoolsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerBackendAddressPoolsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerBackendAddressPoolListResult.NextLink == nil || len(*p.current.LoadBalancerBackendAddressPoolListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerBackendAddressPoolsClientListResponse page. -func (p *LoadBalancerBackendAddressPoolsClientListPager) PageResponse() LoadBalancerBackendAddressPoolsClientListResponse { - return p.current -} - -// LoadBalancerFrontendIPConfigurationsClientListPager provides operations for iterating over paged responses. -type LoadBalancerFrontendIPConfigurationsClientListPager struct { - client *LoadBalancerFrontendIPConfigurationsClient - current LoadBalancerFrontendIPConfigurationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerFrontendIPConfigurationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerFrontendIPConfigurationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerFrontendIPConfigurationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerFrontendIPConfigurationListResult.NextLink == nil || len(*p.current.LoadBalancerFrontendIPConfigurationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerFrontendIPConfigurationsClientListResponse page. -func (p *LoadBalancerFrontendIPConfigurationsClientListPager) PageResponse() LoadBalancerFrontendIPConfigurationsClientListResponse { - return p.current -} - -// LoadBalancerLoadBalancingRulesClientListPager provides operations for iterating over paged responses. -type LoadBalancerLoadBalancingRulesClientListPager struct { - client *LoadBalancerLoadBalancingRulesClient - current LoadBalancerLoadBalancingRulesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerLoadBalancingRulesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerLoadBalancingRulesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerLoadBalancingRulesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerLoadBalancingRuleListResult.NextLink == nil || len(*p.current.LoadBalancerLoadBalancingRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerLoadBalancingRulesClientListResponse page. -func (p *LoadBalancerLoadBalancingRulesClientListPager) PageResponse() LoadBalancerLoadBalancingRulesClientListResponse { - return p.current -} - -// LoadBalancerNetworkInterfacesClientListPager provides operations for iterating over paged responses. -type LoadBalancerNetworkInterfacesClientListPager struct { - client *LoadBalancerNetworkInterfacesClient - current LoadBalancerNetworkInterfacesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerNetworkInterfacesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerNetworkInterfacesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerNetworkInterfacesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.InterfaceListResult.NextLink == nil || len(*p.current.InterfaceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerNetworkInterfacesClientListResponse page. -func (p *LoadBalancerNetworkInterfacesClientListPager) PageResponse() LoadBalancerNetworkInterfacesClientListResponse { - return p.current -} - -// LoadBalancerOutboundRulesClientListPager provides operations for iterating over paged responses. -type LoadBalancerOutboundRulesClientListPager struct { - client *LoadBalancerOutboundRulesClient - current LoadBalancerOutboundRulesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerOutboundRulesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerOutboundRulesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerOutboundRulesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerOutboundRuleListResult.NextLink == nil || len(*p.current.LoadBalancerOutboundRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerOutboundRulesClientListResponse page. -func (p *LoadBalancerOutboundRulesClientListPager) PageResponse() LoadBalancerOutboundRulesClientListResponse { - return p.current -} - -// LoadBalancerProbesClientListPager provides operations for iterating over paged responses. -type LoadBalancerProbesClientListPager struct { - client *LoadBalancerProbesClient - current LoadBalancerProbesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancerProbesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancerProbesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancerProbesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerProbeListResult.NextLink == nil || len(*p.current.LoadBalancerProbeListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancerProbesClientListResponse page. -func (p *LoadBalancerProbesClientListPager) PageResponse() LoadBalancerProbesClientListResponse { - return p.current -} - -// LoadBalancersClientListAllPager provides operations for iterating over paged responses. -type LoadBalancersClientListAllPager struct { - client *LoadBalancersClient - current LoadBalancersClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancersClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancersClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancersClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerListResult.NextLink == nil || len(*p.current.LoadBalancerListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancersClientListAllResponse page. -func (p *LoadBalancersClientListAllPager) PageResponse() LoadBalancersClientListAllResponse { - return p.current -} - -// LoadBalancersClientListPager provides operations for iterating over paged responses. -type LoadBalancersClientListPager struct { - client *LoadBalancersClient - current LoadBalancersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LoadBalancersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LoadBalancersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LoadBalancersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LoadBalancerListResult.NextLink == nil || len(*p.current.LoadBalancerListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LoadBalancersClientListResponse page. -func (p *LoadBalancersClientListPager) PageResponse() LoadBalancersClientListResponse { - return p.current -} - -// LocalNetworkGatewaysClientListPager provides operations for iterating over paged responses. -type LocalNetworkGatewaysClientListPager struct { - client *LocalNetworkGatewaysClient - current LocalNetworkGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, LocalNetworkGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *LocalNetworkGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *LocalNetworkGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.LocalNetworkGatewayListResult.NextLink == nil || len(*p.current.LocalNetworkGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current LocalNetworkGatewaysClientListResponse page. -func (p *LocalNetworkGatewaysClientListPager) PageResponse() LocalNetworkGatewaysClientListResponse { - return p.current -} - -// ManagementClientDisconnectActiveSessionsPager provides operations for iterating over paged responses. -type ManagementClientDisconnectActiveSessionsPager struct { - client *ManagementClient - current ManagementClientDisconnectActiveSessionsResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ManagementClientDisconnectActiveSessionsResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ManagementClientDisconnectActiveSessionsPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ManagementClientDisconnectActiveSessionsPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionSessionDeleteResult.NextLink == nil || len(*p.current.BastionSessionDeleteResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.disconnectActiveSessionsHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ManagementClientDisconnectActiveSessionsResponse page. -func (p *ManagementClientDisconnectActiveSessionsPager) PageResponse() ManagementClientDisconnectActiveSessionsResponse { - return p.current -} - -// ManagementClientGetActiveSessionsPager provides operations for iterating over paged responses. -type ManagementClientGetActiveSessionsPager struct { - client *ManagementClient - current ManagementClientGetActiveSessionsResponse - err error - second bool -} - -// Err returns the last error encountered while paging. -func (p *ManagementClientGetActiveSessionsPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ManagementClientGetActiveSessionsPager) NextPage(ctx context.Context) bool { - if !p.second { - p.second = true - return true - } else if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionActiveSessionListResult.NextLink == nil || len(*p.current.BastionActiveSessionListResult.NextLink) == 0 { - return false - } - } - req, err := runtime.NewRequest(ctx, http.MethodGet, *p.current.BastionActiveSessionListResult.NextLink) - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.getActiveSessionsHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ManagementClientGetActiveSessionsResponse page. -func (p *ManagementClientGetActiveSessionsPager) PageResponse() ManagementClientGetActiveSessionsResponse { - return p.current -} - -// ManagementClientGetBastionShareableLinkPager provides operations for iterating over paged responses. -type ManagementClientGetBastionShareableLinkPager struct { - client *ManagementClient - current ManagementClientGetBastionShareableLinkResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ManagementClientGetBastionShareableLinkResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ManagementClientGetBastionShareableLinkPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ManagementClientGetBastionShareableLinkPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionShareableLinkListResult.NextLink == nil || len(*p.current.BastionShareableLinkListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.getBastionShareableLinkHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ManagementClientGetBastionShareableLinkResponse page. -func (p *ManagementClientGetBastionShareableLinkPager) PageResponse() ManagementClientGetBastionShareableLinkResponse { - return p.current -} - -// ManagementClientPutBastionShareableLinkPager provides operations for iterating over paged responses. -type ManagementClientPutBastionShareableLinkPager struct { - client *ManagementClient - current ManagementClientPutBastionShareableLinkResponse - err error - second bool -} - -// Err returns the last error encountered while paging. -func (p *ManagementClientPutBastionShareableLinkPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ManagementClientPutBastionShareableLinkPager) NextPage(ctx context.Context) bool { - if !p.second { - p.second = true - return true - } else if !reflect.ValueOf(p.current).IsZero() { - if p.current.BastionShareableLinkListResult.NextLink == nil || len(*p.current.BastionShareableLinkListResult.NextLink) == 0 { - return false - } - } - req, err := runtime.NewRequest(ctx, http.MethodGet, *p.current.BastionShareableLinkListResult.NextLink) - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.putBastionShareableLinkHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ManagementClientPutBastionShareableLinkResponse page. -func (p *ManagementClientPutBastionShareableLinkPager) PageResponse() ManagementClientPutBastionShareableLinkResponse { - return p.current -} - -// NatGatewaysClientListAllPager provides operations for iterating over paged responses. -type NatGatewaysClientListAllPager struct { - client *NatGatewaysClient - current NatGatewaysClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, NatGatewaysClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *NatGatewaysClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *NatGatewaysClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.NatGatewayListResult.NextLink == nil || len(*p.current.NatGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current NatGatewaysClientListAllResponse page. -func (p *NatGatewaysClientListAllPager) PageResponse() NatGatewaysClientListAllResponse { - return p.current -} - -// NatGatewaysClientListPager provides operations for iterating over paged responses. -type NatGatewaysClientListPager struct { - client *NatGatewaysClient - current NatGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, NatGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *NatGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *NatGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.NatGatewayListResult.NextLink == nil || len(*p.current.NatGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current NatGatewaysClientListResponse page. -func (p *NatGatewaysClientListPager) PageResponse() NatGatewaysClientListResponse { - return p.current -} - -// NatRulesClientListByVPNGatewayPager provides operations for iterating over paged responses. -type NatRulesClientListByVPNGatewayPager struct { - client *NatRulesClient - current NatRulesClientListByVPNGatewayResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, NatRulesClientListByVPNGatewayResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *NatRulesClientListByVPNGatewayPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *NatRulesClientListByVPNGatewayPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNGatewayNatRulesResult.NextLink == nil || len(*p.current.ListVPNGatewayNatRulesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByVPNGatewayHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current NatRulesClientListByVPNGatewayResponse page. -func (p *NatRulesClientListByVPNGatewayPager) PageResponse() NatRulesClientListByVPNGatewayResponse { - return p.current -} - -// OperationsClientListPager provides operations for iterating over paged responses. -type OperationsClientListPager struct { - client *OperationsClient - current OperationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, OperationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *OperationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *OperationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.OperationListResult.NextLink == nil || len(*p.current.OperationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current OperationsClientListResponse page. -func (p *OperationsClientListPager) PageResponse() OperationsClientListResponse { - return p.current -} - -// P2SVPNGatewaysClientListByResourceGroupPager provides operations for iterating over paged responses. -type P2SVPNGatewaysClientListByResourceGroupPager struct { - client *P2SVPNGatewaysClient - current P2SVPNGatewaysClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, P2SVPNGatewaysClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *P2SVPNGatewaysClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *P2SVPNGatewaysClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListP2SVPNGatewaysResult.NextLink == nil || len(*p.current.ListP2SVPNGatewaysResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current P2SVPNGatewaysClientListByResourceGroupResponse page. -func (p *P2SVPNGatewaysClientListByResourceGroupPager) PageResponse() P2SVPNGatewaysClientListByResourceGroupResponse { - return p.current -} - -// P2SVPNGatewaysClientListPager provides operations for iterating over paged responses. -type P2SVPNGatewaysClientListPager struct { - client *P2SVPNGatewaysClient - current P2SVPNGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, P2SVPNGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *P2SVPNGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *P2SVPNGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListP2SVPNGatewaysResult.NextLink == nil || len(*p.current.ListP2SVPNGatewaysResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current P2SVPNGatewaysClientListResponse page. -func (p *P2SVPNGatewaysClientListPager) PageResponse() P2SVPNGatewaysClientListResponse { - return p.current -} - -// PeerExpressRouteCircuitConnectionsClientListPager provides operations for iterating over paged responses. -type PeerExpressRouteCircuitConnectionsClientListPager struct { - client *PeerExpressRouteCircuitConnectionsClient - current PeerExpressRouteCircuitConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PeerExpressRouteCircuitConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PeerExpressRouteCircuitConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PeerExpressRouteCircuitConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PeerExpressRouteCircuitConnectionListResult.NextLink == nil || len(*p.current.PeerExpressRouteCircuitConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PeerExpressRouteCircuitConnectionsClientListResponse page. -func (p *PeerExpressRouteCircuitConnectionsClientListPager) PageResponse() PeerExpressRouteCircuitConnectionsClientListResponse { - return p.current -} - -// PrivateDNSZoneGroupsClientListPager provides operations for iterating over paged responses. -type PrivateDNSZoneGroupsClientListPager struct { - client *PrivateDNSZoneGroupsClient - current PrivateDNSZoneGroupsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateDNSZoneGroupsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateDNSZoneGroupsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateDNSZoneGroupsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateDNSZoneGroupListResult.NextLink == nil || len(*p.current.PrivateDNSZoneGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateDNSZoneGroupsClientListResponse page. -func (p *PrivateDNSZoneGroupsClientListPager) PageResponse() PrivateDNSZoneGroupsClientListResponse { - return p.current -} - -// PrivateEndpointsClientListBySubscriptionPager provides operations for iterating over paged responses. -type PrivateEndpointsClientListBySubscriptionPager struct { - client *PrivateEndpointsClient - current PrivateEndpointsClientListBySubscriptionResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateEndpointsClientListBySubscriptionResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateEndpointsClientListBySubscriptionPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateEndpointsClientListBySubscriptionPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateEndpointListResult.NextLink == nil || len(*p.current.PrivateEndpointListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listBySubscriptionHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateEndpointsClientListBySubscriptionResponse page. -func (p *PrivateEndpointsClientListBySubscriptionPager) PageResponse() PrivateEndpointsClientListBySubscriptionResponse { - return p.current -} - -// PrivateEndpointsClientListPager provides operations for iterating over paged responses. -type PrivateEndpointsClientListPager struct { - client *PrivateEndpointsClient - current PrivateEndpointsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateEndpointsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateEndpointsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateEndpointsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateEndpointListResult.NextLink == nil || len(*p.current.PrivateEndpointListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateEndpointsClientListResponse page. -func (p *PrivateEndpointsClientListPager) PageResponse() PrivateEndpointsClientListResponse { - return p.current -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager provides operations for iterating over paged responses. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager struct { - client *PrivateLinkServicesClient - current PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AutoApprovedPrivateLinkServicesResult.NextLink == nil || len(*p.current.AutoApprovedPrivateLinkServicesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse page. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager) PageResponse() PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse { - return p.current -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager provides operations for iterating over paged responses. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager struct { - client *PrivateLinkServicesClient - current PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AutoApprovedPrivateLinkServicesResult.NextLink == nil || len(*p.current.AutoApprovedPrivateLinkServicesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAutoApprovedPrivateLinkServicesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse page. -func (p *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager) PageResponse() PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse { - return p.current -} - -// PrivateLinkServicesClientListBySubscriptionPager provides operations for iterating over paged responses. -type PrivateLinkServicesClientListBySubscriptionPager struct { - client *PrivateLinkServicesClient - current PrivateLinkServicesClientListBySubscriptionResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateLinkServicesClientListBySubscriptionResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateLinkServicesClientListBySubscriptionPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateLinkServicesClientListBySubscriptionPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateLinkServiceListResult.NextLink == nil || len(*p.current.PrivateLinkServiceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listBySubscriptionHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateLinkServicesClientListBySubscriptionResponse page. -func (p *PrivateLinkServicesClientListBySubscriptionPager) PageResponse() PrivateLinkServicesClientListBySubscriptionResponse { - return p.current -} - -// PrivateLinkServicesClientListPager provides operations for iterating over paged responses. -type PrivateLinkServicesClientListPager struct { - client *PrivateLinkServicesClient - current PrivateLinkServicesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateLinkServicesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateLinkServicesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateLinkServicesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateLinkServiceListResult.NextLink == nil || len(*p.current.PrivateLinkServiceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateLinkServicesClientListResponse page. -func (p *PrivateLinkServicesClientListPager) PageResponse() PrivateLinkServicesClientListResponse { - return p.current -} - -// PrivateLinkServicesClientListPrivateEndpointConnectionsPager provides operations for iterating over paged responses. -type PrivateLinkServicesClientListPrivateEndpointConnectionsPager struct { - client *PrivateLinkServicesClient - current PrivateLinkServicesClientListPrivateEndpointConnectionsResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PrivateLinkServicesClientListPrivateEndpointConnectionsPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PrivateLinkServicesClientListPrivateEndpointConnectionsPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PrivateEndpointConnectionListResult.NextLink == nil || len(*p.current.PrivateEndpointConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listPrivateEndpointConnectionsHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PrivateLinkServicesClientListPrivateEndpointConnectionsResponse page. -func (p *PrivateLinkServicesClientListPrivateEndpointConnectionsPager) PageResponse() PrivateLinkServicesClientListPrivateEndpointConnectionsResponse { - return p.current -} - -// ProfilesClientListAllPager provides operations for iterating over paged responses. -type ProfilesClientListAllPager struct { - client *ProfilesClient - current ProfilesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ProfilesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ProfilesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ProfilesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ProfileListResult.NextLink == nil || len(*p.current.ProfileListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ProfilesClientListAllResponse page. -func (p *ProfilesClientListAllPager) PageResponse() ProfilesClientListAllResponse { - return p.current -} - -// ProfilesClientListPager provides operations for iterating over paged responses. -type ProfilesClientListPager struct { - client *ProfilesClient - current ProfilesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ProfilesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ProfilesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ProfilesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ProfileListResult.NextLink == nil || len(*p.current.ProfileListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ProfilesClientListResponse page. -func (p *ProfilesClientListPager) PageResponse() ProfilesClientListResponse { - return p.current -} - -// PublicIPAddressesClientListAllPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListAllPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListAllResponse page. -func (p *PublicIPAddressesClientListAllPager) PageResponse() PublicIPAddressesClientListAllResponse { - return p.current -} - -// PublicIPAddressesClientListCloudServicePublicIPAddressesPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListCloudServicePublicIPAddressesPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListCloudServicePublicIPAddressesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListCloudServicePublicIPAddressesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListCloudServicePublicIPAddressesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listCloudServicePublicIPAddressesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListCloudServicePublicIPAddressesResponse page. -func (p *PublicIPAddressesClientListCloudServicePublicIPAddressesPager) PageResponse() PublicIPAddressesClientListCloudServicePublicIPAddressesResponse { - return p.current -} - -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse page. -func (p *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager) PageResponse() PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse { - return p.current -} - -// PublicIPAddressesClientListPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListResponse page. -func (p *PublicIPAddressesClientListPager) PageResponse() PublicIPAddressesClientListResponse { - return p.current -} - -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse page. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager) PageResponse() PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse { - return p.current -} - -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager provides operations for iterating over paged responses. -type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager struct { - client *PublicIPAddressesClient - current PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPAddressListResult.NextLink == nil || len(*p.current.PublicIPAddressListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse page. -func (p *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager) PageResponse() PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse { - return p.current -} - -// PublicIPPrefixesClientListAllPager provides operations for iterating over paged responses. -type PublicIPPrefixesClientListAllPager struct { - client *PublicIPPrefixesClient - current PublicIPPrefixesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPPrefixesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPPrefixesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPPrefixesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPPrefixListResult.NextLink == nil || len(*p.current.PublicIPPrefixListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPPrefixesClientListAllResponse page. -func (p *PublicIPPrefixesClientListAllPager) PageResponse() PublicIPPrefixesClientListAllResponse { - return p.current -} - -// PublicIPPrefixesClientListPager provides operations for iterating over paged responses. -type PublicIPPrefixesClientListPager struct { - client *PublicIPPrefixesClient - current PublicIPPrefixesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, PublicIPPrefixesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *PublicIPPrefixesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *PublicIPPrefixesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.PublicIPPrefixListResult.NextLink == nil || len(*p.current.PublicIPPrefixListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current PublicIPPrefixesClientListResponse page. -func (p *PublicIPPrefixesClientListPager) PageResponse() PublicIPPrefixesClientListResponse { - return p.current -} - -// RouteFilterRulesClientListByRouteFilterPager provides operations for iterating over paged responses. -type RouteFilterRulesClientListByRouteFilterPager struct { - client *RouteFilterRulesClient - current RouteFilterRulesClientListByRouteFilterResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RouteFilterRulesClientListByRouteFilterResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RouteFilterRulesClientListByRouteFilterPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RouteFilterRulesClientListByRouteFilterPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteFilterRuleListResult.NextLink == nil || len(*p.current.RouteFilterRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByRouteFilterHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RouteFilterRulesClientListByRouteFilterResponse page. -func (p *RouteFilterRulesClientListByRouteFilterPager) PageResponse() RouteFilterRulesClientListByRouteFilterResponse { - return p.current -} - -// RouteFiltersClientListByResourceGroupPager provides operations for iterating over paged responses. -type RouteFiltersClientListByResourceGroupPager struct { - client *RouteFiltersClient - current RouteFiltersClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RouteFiltersClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RouteFiltersClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RouteFiltersClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteFilterListResult.NextLink == nil || len(*p.current.RouteFilterListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RouteFiltersClientListByResourceGroupResponse page. -func (p *RouteFiltersClientListByResourceGroupPager) PageResponse() RouteFiltersClientListByResourceGroupResponse { - return p.current -} - -// RouteFiltersClientListPager provides operations for iterating over paged responses. -type RouteFiltersClientListPager struct { - client *RouteFiltersClient - current RouteFiltersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RouteFiltersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RouteFiltersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RouteFiltersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteFilterListResult.NextLink == nil || len(*p.current.RouteFilterListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RouteFiltersClientListResponse page. -func (p *RouteFiltersClientListPager) PageResponse() RouteFiltersClientListResponse { - return p.current -} - -// RouteTablesClientListAllPager provides operations for iterating over paged responses. -type RouteTablesClientListAllPager struct { - client *RouteTablesClient - current RouteTablesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RouteTablesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RouteTablesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RouteTablesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteTableListResult.NextLink == nil || len(*p.current.RouteTableListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RouteTablesClientListAllResponse page. -func (p *RouteTablesClientListAllPager) PageResponse() RouteTablesClientListAllResponse { - return p.current -} - -// RouteTablesClientListPager provides operations for iterating over paged responses. -type RouteTablesClientListPager struct { - client *RouteTablesClient - current RouteTablesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RouteTablesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RouteTablesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RouteTablesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteTableListResult.NextLink == nil || len(*p.current.RouteTableListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RouteTablesClientListResponse page. -func (p *RouteTablesClientListPager) PageResponse() RouteTablesClientListResponse { - return p.current -} - -// RoutesClientListPager provides operations for iterating over paged responses. -type RoutesClientListPager struct { - client *RoutesClient - current RoutesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RoutesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RoutesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RoutesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.RouteListResult.NextLink == nil || len(*p.current.RouteListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RoutesClientListResponse page. -func (p *RoutesClientListPager) PageResponse() RoutesClientListResponse { - return p.current -} - -// RoutingIntentClientListPager provides operations for iterating over paged responses. -type RoutingIntentClientListPager struct { - client *RoutingIntentClient - current RoutingIntentClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, RoutingIntentClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *RoutingIntentClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *RoutingIntentClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListRoutingIntentResult.NextLink == nil || len(*p.current.ListRoutingIntentResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current RoutingIntentClientListResponse page. -func (p *RoutingIntentClientListPager) PageResponse() RoutingIntentClientListResponse { - return p.current -} - -// SecurityGroupsClientListAllPager provides operations for iterating over paged responses. -type SecurityGroupsClientListAllPager struct { - client *SecurityGroupsClient - current SecurityGroupsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SecurityGroupsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SecurityGroupsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SecurityGroupsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityGroupListResult.NextLink == nil || len(*p.current.SecurityGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SecurityGroupsClientListAllResponse page. -func (p *SecurityGroupsClientListAllPager) PageResponse() SecurityGroupsClientListAllResponse { - return p.current -} - -// SecurityGroupsClientListPager provides operations for iterating over paged responses. -type SecurityGroupsClientListPager struct { - client *SecurityGroupsClient - current SecurityGroupsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SecurityGroupsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SecurityGroupsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SecurityGroupsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityGroupListResult.NextLink == nil || len(*p.current.SecurityGroupListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SecurityGroupsClientListResponse page. -func (p *SecurityGroupsClientListPager) PageResponse() SecurityGroupsClientListResponse { - return p.current -} - -// SecurityPartnerProvidersClientListByResourceGroupPager provides operations for iterating over paged responses. -type SecurityPartnerProvidersClientListByResourceGroupPager struct { - client *SecurityPartnerProvidersClient - current SecurityPartnerProvidersClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SecurityPartnerProvidersClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SecurityPartnerProvidersClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SecurityPartnerProvidersClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityPartnerProviderListResult.NextLink == nil || len(*p.current.SecurityPartnerProviderListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SecurityPartnerProvidersClientListByResourceGroupResponse page. -func (p *SecurityPartnerProvidersClientListByResourceGroupPager) PageResponse() SecurityPartnerProvidersClientListByResourceGroupResponse { - return p.current -} - -// SecurityPartnerProvidersClientListPager provides operations for iterating over paged responses. -type SecurityPartnerProvidersClientListPager struct { - client *SecurityPartnerProvidersClient - current SecurityPartnerProvidersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SecurityPartnerProvidersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SecurityPartnerProvidersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SecurityPartnerProvidersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityPartnerProviderListResult.NextLink == nil || len(*p.current.SecurityPartnerProviderListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SecurityPartnerProvidersClientListResponse page. -func (p *SecurityPartnerProvidersClientListPager) PageResponse() SecurityPartnerProvidersClientListResponse { - return p.current -} - -// SecurityRulesClientListPager provides operations for iterating over paged responses. -type SecurityRulesClientListPager struct { - client *SecurityRulesClient - current SecurityRulesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SecurityRulesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SecurityRulesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SecurityRulesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SecurityRuleListResult.NextLink == nil || len(*p.current.SecurityRuleListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SecurityRulesClientListResponse page. -func (p *SecurityRulesClientListPager) PageResponse() SecurityRulesClientListResponse { - return p.current -} - -// ServiceEndpointPoliciesClientListByResourceGroupPager provides operations for iterating over paged responses. -type ServiceEndpointPoliciesClientListByResourceGroupPager struct { - client *ServiceEndpointPoliciesClient - current ServiceEndpointPoliciesClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ServiceEndpointPoliciesClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ServiceEndpointPoliciesClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ServiceEndpointPoliciesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ServiceEndpointPolicyListResult.NextLink == nil || len(*p.current.ServiceEndpointPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ServiceEndpointPoliciesClientListByResourceGroupResponse page. -func (p *ServiceEndpointPoliciesClientListByResourceGroupPager) PageResponse() ServiceEndpointPoliciesClientListByResourceGroupResponse { - return p.current -} - -// ServiceEndpointPoliciesClientListPager provides operations for iterating over paged responses. -type ServiceEndpointPoliciesClientListPager struct { - client *ServiceEndpointPoliciesClient - current ServiceEndpointPoliciesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ServiceEndpointPoliciesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ServiceEndpointPoliciesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ServiceEndpointPoliciesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ServiceEndpointPolicyListResult.NextLink == nil || len(*p.current.ServiceEndpointPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ServiceEndpointPoliciesClientListResponse page. -func (p *ServiceEndpointPoliciesClientListPager) PageResponse() ServiceEndpointPoliciesClientListResponse { - return p.current -} - -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager provides operations for iterating over paged responses. -type ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager struct { - client *ServiceEndpointPolicyDefinitionsClient - current ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ServiceEndpointPolicyDefinitionListResult.NextLink == nil || len(*p.current.ServiceEndpointPolicyDefinitionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse page. -func (p *ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager) PageResponse() ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse { - return p.current -} - -// ServiceTagInformationClientListPager provides operations for iterating over paged responses. -type ServiceTagInformationClientListPager struct { - client *ServiceTagInformationClient - current ServiceTagInformationClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, ServiceTagInformationClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *ServiceTagInformationClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *ServiceTagInformationClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ServiceTagInformationListResult.NextLink == nil || len(*p.current.ServiceTagInformationListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current ServiceTagInformationClientListResponse page. -func (p *ServiceTagInformationClientListPager) PageResponse() ServiceTagInformationClientListResponse { - return p.current -} - -// SubnetsClientListPager provides operations for iterating over paged responses. -type SubnetsClientListPager struct { - client *SubnetsClient - current SubnetsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, SubnetsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *SubnetsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *SubnetsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.SubnetListResult.NextLink == nil || len(*p.current.SubnetListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current SubnetsClientListResponse page. -func (p *SubnetsClientListPager) PageResponse() SubnetsClientListResponse { - return p.current -} - -// UsagesClientListPager provides operations for iterating over paged responses. -type UsagesClientListPager struct { - client *UsagesClient - current UsagesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, UsagesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *UsagesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *UsagesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.UsagesListResult.NextLink == nil || len(*p.current.UsagesListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current UsagesClientListResponse page. -func (p *UsagesClientListPager) PageResponse() UsagesClientListResponse { - return p.current -} - -// VPNConnectionsClientListByVPNGatewayPager provides operations for iterating over paged responses. -type VPNConnectionsClientListByVPNGatewayPager struct { - client *VPNConnectionsClient - current VPNConnectionsClientListByVPNGatewayResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNConnectionsClientListByVPNGatewayResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNConnectionsClientListByVPNGatewayPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNConnectionsClientListByVPNGatewayPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNConnectionsResult.NextLink == nil || len(*p.current.ListVPNConnectionsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByVPNGatewayHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNConnectionsClientListByVPNGatewayResponse page. -func (p *VPNConnectionsClientListByVPNGatewayPager) PageResponse() VPNConnectionsClientListByVPNGatewayResponse { - return p.current -} - -// VPNGatewaysClientListByResourceGroupPager provides operations for iterating over paged responses. -type VPNGatewaysClientListByResourceGroupPager struct { - client *VPNGatewaysClient - current VPNGatewaysClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNGatewaysClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNGatewaysClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNGatewaysClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNGatewaysResult.NextLink == nil || len(*p.current.ListVPNGatewaysResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNGatewaysClientListByResourceGroupResponse page. -func (p *VPNGatewaysClientListByResourceGroupPager) PageResponse() VPNGatewaysClientListByResourceGroupResponse { - return p.current -} - -// VPNGatewaysClientListPager provides operations for iterating over paged responses. -type VPNGatewaysClientListPager struct { - client *VPNGatewaysClient - current VPNGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNGatewaysResult.NextLink == nil || len(*p.current.ListVPNGatewaysResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNGatewaysClientListResponse page. -func (p *VPNGatewaysClientListPager) PageResponse() VPNGatewaysClientListResponse { - return p.current -} - -// VPNLinkConnectionsClientListByVPNConnectionPager provides operations for iterating over paged responses. -type VPNLinkConnectionsClientListByVPNConnectionPager struct { - client *VPNLinkConnectionsClient - current VPNLinkConnectionsClientListByVPNConnectionResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNLinkConnectionsClientListByVPNConnectionResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNLinkConnectionsClientListByVPNConnectionPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNLinkConnectionsClientListByVPNConnectionPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNSiteLinkConnectionsResult.NextLink == nil || len(*p.current.ListVPNSiteLinkConnectionsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByVPNConnectionHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNLinkConnectionsClientListByVPNConnectionResponse page. -func (p *VPNLinkConnectionsClientListByVPNConnectionPager) PageResponse() VPNLinkConnectionsClientListByVPNConnectionResponse { - return p.current -} - -// VPNServerConfigurationsClientListByResourceGroupPager provides operations for iterating over paged responses. -type VPNServerConfigurationsClientListByResourceGroupPager struct { - client *VPNServerConfigurationsClient - current VPNServerConfigurationsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNServerConfigurationsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNServerConfigurationsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNServerConfigurationsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNServerConfigurationsResult.NextLink == nil || len(*p.current.ListVPNServerConfigurationsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNServerConfigurationsClientListByResourceGroupResponse page. -func (p *VPNServerConfigurationsClientListByResourceGroupPager) PageResponse() VPNServerConfigurationsClientListByResourceGroupResponse { - return p.current -} - -// VPNServerConfigurationsClientListPager provides operations for iterating over paged responses. -type VPNServerConfigurationsClientListPager struct { - client *VPNServerConfigurationsClient - current VPNServerConfigurationsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNServerConfigurationsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNServerConfigurationsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNServerConfigurationsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNServerConfigurationsResult.NextLink == nil || len(*p.current.ListVPNServerConfigurationsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNServerConfigurationsClientListResponse page. -func (p *VPNServerConfigurationsClientListPager) PageResponse() VPNServerConfigurationsClientListResponse { - return p.current -} - -// VPNSiteLinksClientListByVPNSitePager provides operations for iterating over paged responses. -type VPNSiteLinksClientListByVPNSitePager struct { - client *VPNSiteLinksClient - current VPNSiteLinksClientListByVPNSiteResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNSiteLinksClientListByVPNSiteResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNSiteLinksClientListByVPNSitePager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNSiteLinksClientListByVPNSitePager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNSiteLinksResult.NextLink == nil || len(*p.current.ListVPNSiteLinksResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByVPNSiteHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNSiteLinksClientListByVPNSiteResponse page. -func (p *VPNSiteLinksClientListByVPNSitePager) PageResponse() VPNSiteLinksClientListByVPNSiteResponse { - return p.current -} - -// VPNSitesClientListByResourceGroupPager provides operations for iterating over paged responses. -type VPNSitesClientListByResourceGroupPager struct { - client *VPNSitesClient - current VPNSitesClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNSitesClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNSitesClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNSitesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNSitesResult.NextLink == nil || len(*p.current.ListVPNSitesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNSitesClientListByResourceGroupResponse page. -func (p *VPNSitesClientListByResourceGroupPager) PageResponse() VPNSitesClientListByResourceGroupResponse { - return p.current -} - -// VPNSitesClientListPager provides operations for iterating over paged responses. -type VPNSitesClientListPager struct { - client *VPNSitesClient - current VPNSitesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VPNSitesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VPNSitesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VPNSitesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVPNSitesResult.NextLink == nil || len(*p.current.ListVPNSitesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VPNSitesClientListResponse page. -func (p *VPNSitesClientListPager) PageResponse() VPNSitesClientListResponse { - return p.current -} - -// VirtualApplianceSKUsClientListPager provides operations for iterating over paged responses. -type VirtualApplianceSKUsClientListPager struct { - client *VirtualApplianceSKUsClient - current VirtualApplianceSKUsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualApplianceSKUsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualApplianceSKUsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualApplianceSKUsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualApplianceSKUListResult.NextLink == nil || len(*p.current.VirtualApplianceSKUListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualApplianceSKUsClientListResponse page. -func (p *VirtualApplianceSKUsClientListPager) PageResponse() VirtualApplianceSKUsClientListResponse { - return p.current -} - -// VirtualApplianceSitesClientListPager provides operations for iterating over paged responses. -type VirtualApplianceSitesClientListPager struct { - client *VirtualApplianceSitesClient - current VirtualApplianceSitesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualApplianceSitesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualApplianceSitesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualApplianceSitesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualApplianceSiteListResult.NextLink == nil || len(*p.current.VirtualApplianceSiteListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualApplianceSitesClientListResponse page. -func (p *VirtualApplianceSitesClientListPager) PageResponse() VirtualApplianceSitesClientListResponse { - return p.current -} - -// VirtualAppliancesClientListByResourceGroupPager provides operations for iterating over paged responses. -type VirtualAppliancesClientListByResourceGroupPager struct { - client *VirtualAppliancesClient - current VirtualAppliancesClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualAppliancesClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualAppliancesClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualAppliancesClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualApplianceListResult.NextLink == nil || len(*p.current.VirtualApplianceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualAppliancesClientListByResourceGroupResponse page. -func (p *VirtualAppliancesClientListByResourceGroupPager) PageResponse() VirtualAppliancesClientListByResourceGroupResponse { - return p.current -} - -// VirtualAppliancesClientListPager provides operations for iterating over paged responses. -type VirtualAppliancesClientListPager struct { - client *VirtualAppliancesClient - current VirtualAppliancesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualAppliancesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualAppliancesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualAppliancesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualApplianceListResult.NextLink == nil || len(*p.current.VirtualApplianceListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualAppliancesClientListResponse page. -func (p *VirtualAppliancesClientListPager) PageResponse() VirtualAppliancesClientListResponse { - return p.current -} - -// VirtualHubBgpConnectionsClientListPager provides operations for iterating over paged responses. -type VirtualHubBgpConnectionsClientListPager struct { - client *VirtualHubBgpConnectionsClient - current VirtualHubBgpConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualHubBgpConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualHubBgpConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualHubBgpConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualHubBgpConnectionResults.NextLink == nil || len(*p.current.ListVirtualHubBgpConnectionResults.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualHubBgpConnectionsClientListResponse page. -func (p *VirtualHubBgpConnectionsClientListPager) PageResponse() VirtualHubBgpConnectionsClientListResponse { - return p.current -} - -// VirtualHubIPConfigurationClientListPager provides operations for iterating over paged responses. -type VirtualHubIPConfigurationClientListPager struct { - client *VirtualHubIPConfigurationClient - current VirtualHubIPConfigurationClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualHubIPConfigurationClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualHubIPConfigurationClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualHubIPConfigurationClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualHubIPConfigurationResults.NextLink == nil || len(*p.current.ListVirtualHubIPConfigurationResults.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualHubIPConfigurationClientListResponse page. -func (p *VirtualHubIPConfigurationClientListPager) PageResponse() VirtualHubIPConfigurationClientListResponse { - return p.current -} - -// VirtualHubRouteTableV2SClientListPager provides operations for iterating over paged responses. -type VirtualHubRouteTableV2SClientListPager struct { - client *VirtualHubRouteTableV2SClient - current VirtualHubRouteTableV2SClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualHubRouteTableV2SClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualHubRouteTableV2SClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualHubRouteTableV2SClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualHubRouteTableV2SResult.NextLink == nil || len(*p.current.ListVirtualHubRouteTableV2SResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualHubRouteTableV2SClientListResponse page. -func (p *VirtualHubRouteTableV2SClientListPager) PageResponse() VirtualHubRouteTableV2SClientListResponse { - return p.current -} - -// VirtualHubsClientListByResourceGroupPager provides operations for iterating over paged responses. -type VirtualHubsClientListByResourceGroupPager struct { - client *VirtualHubsClient - current VirtualHubsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualHubsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualHubsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualHubsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualHubsResult.NextLink == nil || len(*p.current.ListVirtualHubsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualHubsClientListByResourceGroupResponse page. -func (p *VirtualHubsClientListByResourceGroupPager) PageResponse() VirtualHubsClientListByResourceGroupResponse { - return p.current -} - -// VirtualHubsClientListPager provides operations for iterating over paged responses. -type VirtualHubsClientListPager struct { - client *VirtualHubsClient - current VirtualHubsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualHubsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualHubsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualHubsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualHubsResult.NextLink == nil || len(*p.current.ListVirtualHubsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualHubsClientListResponse page. -func (p *VirtualHubsClientListPager) PageResponse() VirtualHubsClientListResponse { - return p.current -} - -// VirtualNetworkGatewayConnectionsClientListPager provides operations for iterating over paged responses. -type VirtualNetworkGatewayConnectionsClientListPager struct { - client *VirtualNetworkGatewayConnectionsClient - current VirtualNetworkGatewayConnectionsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkGatewayConnectionsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkGatewayConnectionsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkGatewayConnectionsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkGatewayConnectionListResult.NextLink == nil || len(*p.current.VirtualNetworkGatewayConnectionListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkGatewayConnectionsClientListResponse page. -func (p *VirtualNetworkGatewayConnectionsClientListPager) PageResponse() VirtualNetworkGatewayConnectionsClientListResponse { - return p.current -} - -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager provides operations for iterating over paged responses. -type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager struct { - client *VirtualNetworkGatewayNatRulesClient - current VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualNetworkGatewayNatRulesResult.NextLink == nil || len(*p.current.ListVirtualNetworkGatewayNatRulesResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByVirtualNetworkGatewayHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse page. -func (p *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager) PageResponse() VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse { - return p.current -} - -// VirtualNetworkGatewaysClientListConnectionsPager provides operations for iterating over paged responses. -type VirtualNetworkGatewaysClientListConnectionsPager struct { - client *VirtualNetworkGatewaysClient - current VirtualNetworkGatewaysClientListConnectionsResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkGatewaysClientListConnectionsResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkGatewaysClientListConnectionsPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkGatewaysClientListConnectionsPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkGatewayListConnectionsResult.NextLink == nil || len(*p.current.VirtualNetworkGatewayListConnectionsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listConnectionsHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkGatewaysClientListConnectionsResponse page. -func (p *VirtualNetworkGatewaysClientListConnectionsPager) PageResponse() VirtualNetworkGatewaysClientListConnectionsResponse { - return p.current -} - -// VirtualNetworkGatewaysClientListPager provides operations for iterating over paged responses. -type VirtualNetworkGatewaysClientListPager struct { - client *VirtualNetworkGatewaysClient - current VirtualNetworkGatewaysClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkGatewaysClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkGatewaysClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkGatewaysClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkGatewayListResult.NextLink == nil || len(*p.current.VirtualNetworkGatewayListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkGatewaysClientListResponse page. -func (p *VirtualNetworkGatewaysClientListPager) PageResponse() VirtualNetworkGatewaysClientListResponse { - return p.current -} - -// VirtualNetworkPeeringsClientListPager provides operations for iterating over paged responses. -type VirtualNetworkPeeringsClientListPager struct { - client *VirtualNetworkPeeringsClient - current VirtualNetworkPeeringsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkPeeringsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkPeeringsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkPeeringsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkPeeringListResult.NextLink == nil || len(*p.current.VirtualNetworkPeeringListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkPeeringsClientListResponse page. -func (p *VirtualNetworkPeeringsClientListPager) PageResponse() VirtualNetworkPeeringsClientListResponse { - return p.current -} - -// VirtualNetworkTapsClientListAllPager provides operations for iterating over paged responses. -type VirtualNetworkTapsClientListAllPager struct { - client *VirtualNetworkTapsClient - current VirtualNetworkTapsClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkTapsClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkTapsClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkTapsClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkTapListResult.NextLink == nil || len(*p.current.VirtualNetworkTapListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkTapsClientListAllResponse page. -func (p *VirtualNetworkTapsClientListAllPager) PageResponse() VirtualNetworkTapsClientListAllResponse { - return p.current -} - -// VirtualNetworkTapsClientListByResourceGroupPager provides operations for iterating over paged responses. -type VirtualNetworkTapsClientListByResourceGroupPager struct { - client *VirtualNetworkTapsClient - current VirtualNetworkTapsClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworkTapsClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworkTapsClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworkTapsClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkTapListResult.NextLink == nil || len(*p.current.VirtualNetworkTapListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworkTapsClientListByResourceGroupResponse page. -func (p *VirtualNetworkTapsClientListByResourceGroupPager) PageResponse() VirtualNetworkTapsClientListByResourceGroupResponse { - return p.current -} - -// VirtualNetworksClientListAllPager provides operations for iterating over paged responses. -type VirtualNetworksClientListAllPager struct { - client *VirtualNetworksClient - current VirtualNetworksClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworksClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworksClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworksClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkListResult.NextLink == nil || len(*p.current.VirtualNetworkListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworksClientListAllResponse page. -func (p *VirtualNetworksClientListAllPager) PageResponse() VirtualNetworksClientListAllResponse { - return p.current -} - -// VirtualNetworksClientListPager provides operations for iterating over paged responses. -type VirtualNetworksClientListPager struct { - client *VirtualNetworksClient - current VirtualNetworksClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworksClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworksClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworksClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkListResult.NextLink == nil || len(*p.current.VirtualNetworkListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworksClientListResponse page. -func (p *VirtualNetworksClientListPager) PageResponse() VirtualNetworksClientListResponse { - return p.current -} - -// VirtualNetworksClientListUsagePager provides operations for iterating over paged responses. -type VirtualNetworksClientListUsagePager struct { - client *VirtualNetworksClient - current VirtualNetworksClientListUsageResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualNetworksClientListUsageResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualNetworksClientListUsagePager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualNetworksClientListUsagePager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualNetworkListUsageResult.NextLink == nil || len(*p.current.VirtualNetworkListUsageResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listUsageHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualNetworksClientListUsageResponse page. -func (p *VirtualNetworksClientListUsagePager) PageResponse() VirtualNetworksClientListUsageResponse { - return p.current -} - -// VirtualRouterPeeringsClientListPager provides operations for iterating over paged responses. -type VirtualRouterPeeringsClientListPager struct { - client *VirtualRouterPeeringsClient - current VirtualRouterPeeringsClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualRouterPeeringsClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualRouterPeeringsClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualRouterPeeringsClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualRouterPeeringListResult.NextLink == nil || len(*p.current.VirtualRouterPeeringListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualRouterPeeringsClientListResponse page. -func (p *VirtualRouterPeeringsClientListPager) PageResponse() VirtualRouterPeeringsClientListResponse { - return p.current -} - -// VirtualRoutersClientListByResourceGroupPager provides operations for iterating over paged responses. -type VirtualRoutersClientListByResourceGroupPager struct { - client *VirtualRoutersClient - current VirtualRoutersClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualRoutersClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualRoutersClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualRoutersClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualRouterListResult.NextLink == nil || len(*p.current.VirtualRouterListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualRoutersClientListByResourceGroupResponse page. -func (p *VirtualRoutersClientListByResourceGroupPager) PageResponse() VirtualRoutersClientListByResourceGroupResponse { - return p.current -} - -// VirtualRoutersClientListPager provides operations for iterating over paged responses. -type VirtualRoutersClientListPager struct { - client *VirtualRoutersClient - current VirtualRoutersClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualRoutersClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualRoutersClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualRoutersClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.VirtualRouterListResult.NextLink == nil || len(*p.current.VirtualRouterListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualRoutersClientListResponse page. -func (p *VirtualRoutersClientListPager) PageResponse() VirtualRoutersClientListResponse { - return p.current -} - -// VirtualWansClientListByResourceGroupPager provides operations for iterating over paged responses. -type VirtualWansClientListByResourceGroupPager struct { - client *VirtualWansClient - current VirtualWansClientListByResourceGroupResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualWansClientListByResourceGroupResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualWansClientListByResourceGroupPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualWansClientListByResourceGroupPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualWANsResult.NextLink == nil || len(*p.current.ListVirtualWANsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listByResourceGroupHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualWansClientListByResourceGroupResponse page. -func (p *VirtualWansClientListByResourceGroupPager) PageResponse() VirtualWansClientListByResourceGroupResponse { - return p.current -} - -// VirtualWansClientListPager provides operations for iterating over paged responses. -type VirtualWansClientListPager struct { - client *VirtualWansClient - current VirtualWansClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, VirtualWansClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *VirtualWansClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *VirtualWansClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.ListVirtualWANsResult.NextLink == nil || len(*p.current.ListVirtualWANsResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current VirtualWansClientListResponse page. -func (p *VirtualWansClientListPager) PageResponse() VirtualWansClientListResponse { - return p.current -} - -// WebApplicationFirewallPoliciesClientListAllPager provides operations for iterating over paged responses. -type WebApplicationFirewallPoliciesClientListAllPager struct { - client *WebApplicationFirewallPoliciesClient - current WebApplicationFirewallPoliciesClientListAllResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, WebApplicationFirewallPoliciesClientListAllResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *WebApplicationFirewallPoliciesClientListAllPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *WebApplicationFirewallPoliciesClientListAllPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.WebApplicationFirewallPolicyListResult.NextLink == nil || len(*p.current.WebApplicationFirewallPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listAllHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current WebApplicationFirewallPoliciesClientListAllResponse page. -func (p *WebApplicationFirewallPoliciesClientListAllPager) PageResponse() WebApplicationFirewallPoliciesClientListAllResponse { - return p.current -} - -// WebApplicationFirewallPoliciesClientListPager provides operations for iterating over paged responses. -type WebApplicationFirewallPoliciesClientListPager struct { - client *WebApplicationFirewallPoliciesClient - current WebApplicationFirewallPoliciesClientListResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, WebApplicationFirewallPoliciesClientListResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *WebApplicationFirewallPoliciesClientListPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *WebApplicationFirewallPoliciesClientListPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.WebApplicationFirewallPolicyListResult.NextLink == nil || len(*p.current.WebApplicationFirewallPolicyListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current WebApplicationFirewallPoliciesClientListResponse page. -func (p *WebApplicationFirewallPoliciesClientListPager) PageResponse() WebApplicationFirewallPoliciesClientListResponse { - return p.current -} - -// WebCategoriesClientListBySubscriptionPager provides operations for iterating over paged responses. -type WebCategoriesClientListBySubscriptionPager struct { - client *WebCategoriesClient - current WebCategoriesClientListBySubscriptionResponse - err error - requester func(context.Context) (*policy.Request, error) - advancer func(context.Context, WebCategoriesClientListBySubscriptionResponse) (*policy.Request, error) -} - -// Err returns the last error encountered while paging. -func (p *WebCategoriesClientListBySubscriptionPager) Err() error { - return p.err -} - -// NextPage returns true if the pager advanced to the next page. -// Returns false if there are no more pages or an error occurred. -func (p *WebCategoriesClientListBySubscriptionPager) NextPage(ctx context.Context) bool { - var req *policy.Request - var err error - if !reflect.ValueOf(p.current).IsZero() { - if p.current.AzureWebCategoryListResult.NextLink == nil || len(*p.current.AzureWebCategoryListResult.NextLink) == 0 { - return false - } - req, err = p.advancer(ctx, p.current) - } else { - req, err = p.requester(ctx) - } - if err != nil { - p.err = err - return false - } - resp, err := p.client.pl.Do(req) - if err != nil { - p.err = err - return false - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - p.err = runtime.NewResponseError(resp) - return false - } - result, err := p.client.listBySubscriptionHandleResponse(resp) - if err != nil { - p.err = err - return false - } - p.current = result - return true -} - -// PageResponse returns the current WebCategoriesClientListBySubscriptionResponse page. -func (p *WebCategoriesClientListBySubscriptionPager) PageResponse() WebCategoriesClientListBySubscriptionResponse { - return p.current -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go index 778cb39d8f0a..9833cf28d793 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_peerexpressroutecircuitconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PeerExpressRouteCircuitConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PeerExpressRouteCircuitConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPeerExpressRouteCircuitConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerExpressRouteCircuitConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PeerExpressRouteCircuitConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets the specified Peer Express Route Circuit Connection from the specified express route circuit. @@ -109,7 +114,7 @@ func (client *PeerExpressRouteCircuitConnectionsClient) getCreateRequest(ctx con // getHandleResponse handles the Get response. func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientGetResponse, error) { - result := PeerExpressRouteCircuitConnectionsClientGetResponse{RawResponse: resp} + result := PeerExpressRouteCircuitConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnection); err != nil { return PeerExpressRouteCircuitConnectionsClientGetResponse{}, err } @@ -123,16 +128,32 @@ func (client *PeerExpressRouteCircuitConnectionsClient) getHandleResponse(resp * // peeringName - The name of the peering. // options - PeerExpressRouteCircuitConnectionsClientListOptions contains the optional parameters for the PeerExpressRouteCircuitConnectionsClient.List // method. -func (client *PeerExpressRouteCircuitConnectionsClient) List(resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) *PeerExpressRouteCircuitConnectionsClientListPager { - return &PeerExpressRouteCircuitConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) +func (client *PeerExpressRouteCircuitConnectionsClient) List(resourceGroupName string, circuitName string, peeringName string, options *PeerExpressRouteCircuitConnectionsClientListOptions) *runtime.Pager[PeerExpressRouteCircuitConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PeerExpressRouteCircuitConnectionsClientListResponse]{ + More: func(page PeerExpressRouteCircuitConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PeerExpressRouteCircuitConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PeerExpressRouteCircuitConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *PeerExpressRouteCircuitConnectionsClientListResponse) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, circuitName, peeringName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PeerExpressRouteCircuitConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PeerExpressRouteCircuitConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PeerExpressRouteCircuitConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -167,7 +188,7 @@ func (client *PeerExpressRouteCircuitConnectionsClient) listCreateRequest(ctx co // listHandleResponse handles the List response. func (client *PeerExpressRouteCircuitConnectionsClient) listHandleResponse(resp *http.Response) (PeerExpressRouteCircuitConnectionsClientListResponse, error) { - result := PeerExpressRouteCircuitConnectionsClientListResponse{RawResponse: resp} + result := PeerExpressRouteCircuitConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PeerExpressRouteCircuitConnectionListResult); err != nil { return PeerExpressRouteCircuitConnectionsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_pollers.go b/sdk/resourcemanager/network/armnetwork/zz_generated_pollers.go deleted file mode 100644 index 2e98d3ad638b..000000000000 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_pollers.go +++ /dev/null @@ -1,9817 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -// 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. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armnetwork - -import ( - "context" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "net/http" -) - -// ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse will be returned. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse, error) { - respType := ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse will be returned. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller) FinalResponse(ctx context.Context) (ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse, error) { - respType := ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ApplicationGatewayPrivateEndpointConnection) - if err != nil { - return ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientBackendHealthOnDemandPoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientBackendHealthOnDemandPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientBackendHealthOnDemandPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientBackendHealthOnDemandPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientBackendHealthOnDemandResponse will be returned. -func (p *ApplicationGatewaysClientBackendHealthOnDemandPoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientBackendHealthOnDemandResponse, error) { - respType := ApplicationGatewaysClientBackendHealthOnDemandResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ApplicationGatewayBackendHealthOnDemand) - if err != nil { - return ApplicationGatewaysClientBackendHealthOnDemandResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientBackendHealthOnDemandPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientBackendHealthPoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientBackendHealthPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientBackendHealthPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientBackendHealthPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientBackendHealthResponse will be returned. -func (p *ApplicationGatewaysClientBackendHealthPoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientBackendHealthResponse, error) { - respType := ApplicationGatewaysClientBackendHealthResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ApplicationGatewayBackendHealth) - if err != nil { - return ApplicationGatewaysClientBackendHealthResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientBackendHealthPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientCreateOrUpdateResponse will be returned. -func (p *ApplicationGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientCreateOrUpdateResponse, error) { - respType := ApplicationGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ApplicationGateway) - if err != nil { - return ApplicationGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientDeleteResponse will be returned. -func (p *ApplicationGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientDeleteResponse, error) { - respType := ApplicationGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ApplicationGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientStartPoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientStartPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientStartPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientStartPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientStartResponse will be returned. -func (p *ApplicationGatewaysClientStartPoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientStartResponse, error) { - respType := ApplicationGatewaysClientStartResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ApplicationGatewaysClientStartResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientStartPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationGatewaysClientStopPoller provides polling facilities until the operation reaches a terminal state. -type ApplicationGatewaysClientStopPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationGatewaysClientStopPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationGatewaysClientStopPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationGatewaysClientStopResponse will be returned. -func (p *ApplicationGatewaysClientStopPoller) FinalResponse(ctx context.Context) (ApplicationGatewaysClientStopResponse, error) { - respType := ApplicationGatewaysClientStopResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ApplicationGatewaysClientStopResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationGatewaysClientStopPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationSecurityGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationSecurityGroupsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationSecurityGroupsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationSecurityGroupsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationSecurityGroupsClientCreateOrUpdateResponse will be returned. -func (p *ApplicationSecurityGroupsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ApplicationSecurityGroupsClientCreateOrUpdateResponse, error) { - respType := ApplicationSecurityGroupsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ApplicationSecurityGroup) - if err != nil { - return ApplicationSecurityGroupsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationSecurityGroupsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ApplicationSecurityGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ApplicationSecurityGroupsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ApplicationSecurityGroupsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ApplicationSecurityGroupsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ApplicationSecurityGroupsClientDeleteResponse will be returned. -func (p *ApplicationSecurityGroupsClientDeletePoller) FinalResponse(ctx context.Context) (ApplicationSecurityGroupsClientDeleteResponse, error) { - respType := ApplicationSecurityGroupsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ApplicationSecurityGroupsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ApplicationSecurityGroupsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// AzureFirewallsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type AzureFirewallsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *AzureFirewallsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *AzureFirewallsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final AzureFirewallsClientCreateOrUpdateResponse will be returned. -func (p *AzureFirewallsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (AzureFirewallsClientCreateOrUpdateResponse, error) { - respType := AzureFirewallsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.AzureFirewall) - if err != nil { - return AzureFirewallsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *AzureFirewallsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// AzureFirewallsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type AzureFirewallsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *AzureFirewallsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *AzureFirewallsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final AzureFirewallsClientDeleteResponse will be returned. -func (p *AzureFirewallsClientDeletePoller) FinalResponse(ctx context.Context) (AzureFirewallsClientDeleteResponse, error) { - respType := AzureFirewallsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return AzureFirewallsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *AzureFirewallsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// AzureFirewallsClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type AzureFirewallsClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *AzureFirewallsClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *AzureFirewallsClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final AzureFirewallsClientUpdateTagsResponse will be returned. -func (p *AzureFirewallsClientUpdateTagsPoller) FinalResponse(ctx context.Context) (AzureFirewallsClientUpdateTagsResponse, error) { - respType := AzureFirewallsClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.AzureFirewall) - if err != nil { - return AzureFirewallsClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *AzureFirewallsClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// BastionHostsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type BastionHostsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *BastionHostsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *BastionHostsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final BastionHostsClientCreateOrUpdateResponse will be returned. -func (p *BastionHostsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (BastionHostsClientCreateOrUpdateResponse, error) { - respType := BastionHostsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BastionHost) - if err != nil { - return BastionHostsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *BastionHostsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// BastionHostsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type BastionHostsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *BastionHostsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *BastionHostsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final BastionHostsClientDeleteResponse will be returned. -func (p *BastionHostsClientDeletePoller) FinalResponse(ctx context.Context) (BastionHostsClientDeleteResponse, error) { - respType := BastionHostsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return BastionHostsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *BastionHostsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// BastionHostsClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type BastionHostsClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *BastionHostsClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *BastionHostsClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final BastionHostsClientUpdateTagsResponse will be returned. -func (p *BastionHostsClientUpdateTagsPoller) FinalResponse(ctx context.Context) (BastionHostsClientUpdateTagsResponse, error) { - respType := BastionHostsClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BastionHost) - if err != nil { - return BastionHostsClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *BastionHostsClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ConnectionMonitorsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ConnectionMonitorsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ConnectionMonitorsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ConnectionMonitorsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ConnectionMonitorsClientCreateOrUpdateResponse will be returned. -func (p *ConnectionMonitorsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ConnectionMonitorsClientCreateOrUpdateResponse, error) { - respType := ConnectionMonitorsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConnectionMonitorResult) - if err != nil { - return ConnectionMonitorsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ConnectionMonitorsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ConnectionMonitorsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ConnectionMonitorsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ConnectionMonitorsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ConnectionMonitorsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ConnectionMonitorsClientDeleteResponse will be returned. -func (p *ConnectionMonitorsClientDeletePoller) FinalResponse(ctx context.Context) (ConnectionMonitorsClientDeleteResponse, error) { - respType := ConnectionMonitorsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ConnectionMonitorsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ConnectionMonitorsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ConnectionMonitorsClientQueryPoller provides polling facilities until the operation reaches a terminal state. -type ConnectionMonitorsClientQueryPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ConnectionMonitorsClientQueryPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ConnectionMonitorsClientQueryPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ConnectionMonitorsClientQueryResponse will be returned. -func (p *ConnectionMonitorsClientQueryPoller) FinalResponse(ctx context.Context) (ConnectionMonitorsClientQueryResponse, error) { - respType := ConnectionMonitorsClientQueryResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConnectionMonitorQueryResult) - if err != nil { - return ConnectionMonitorsClientQueryResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ConnectionMonitorsClientQueryPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ConnectionMonitorsClientStartPoller provides polling facilities until the operation reaches a terminal state. -type ConnectionMonitorsClientStartPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ConnectionMonitorsClientStartPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ConnectionMonitorsClientStartPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ConnectionMonitorsClientStartResponse will be returned. -func (p *ConnectionMonitorsClientStartPoller) FinalResponse(ctx context.Context) (ConnectionMonitorsClientStartResponse, error) { - respType := ConnectionMonitorsClientStartResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ConnectionMonitorsClientStartResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ConnectionMonitorsClientStartPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ConnectionMonitorsClientStopPoller provides polling facilities until the operation reaches a terminal state. -type ConnectionMonitorsClientStopPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ConnectionMonitorsClientStopPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ConnectionMonitorsClientStopPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ConnectionMonitorsClientStopResponse will be returned. -func (p *ConnectionMonitorsClientStopPoller) FinalResponse(ctx context.Context) (ConnectionMonitorsClientStopResponse, error) { - respType := ConnectionMonitorsClientStopResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ConnectionMonitorsClientStopResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ConnectionMonitorsClientStopPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// CustomIPPrefixesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type CustomIPPrefixesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *CustomIPPrefixesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *CustomIPPrefixesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final CustomIPPrefixesClientCreateOrUpdateResponse will be returned. -func (p *CustomIPPrefixesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (CustomIPPrefixesClientCreateOrUpdateResponse, error) { - respType := CustomIPPrefixesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.CustomIPPrefix) - if err != nil { - return CustomIPPrefixesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *CustomIPPrefixesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// CustomIPPrefixesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type CustomIPPrefixesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *CustomIPPrefixesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *CustomIPPrefixesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final CustomIPPrefixesClientDeleteResponse will be returned. -func (p *CustomIPPrefixesClientDeletePoller) FinalResponse(ctx context.Context) (CustomIPPrefixesClientDeleteResponse, error) { - respType := CustomIPPrefixesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return CustomIPPrefixesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *CustomIPPrefixesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DdosCustomPoliciesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type DdosCustomPoliciesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DdosCustomPoliciesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DdosCustomPoliciesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DdosCustomPoliciesClientCreateOrUpdateResponse will be returned. -func (p *DdosCustomPoliciesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (DdosCustomPoliciesClientCreateOrUpdateResponse, error) { - respType := DdosCustomPoliciesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.DdosCustomPolicy) - if err != nil { - return DdosCustomPoliciesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DdosCustomPoliciesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DdosCustomPoliciesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type DdosCustomPoliciesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DdosCustomPoliciesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DdosCustomPoliciesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DdosCustomPoliciesClientDeleteResponse will be returned. -func (p *DdosCustomPoliciesClientDeletePoller) FinalResponse(ctx context.Context) (DdosCustomPoliciesClientDeleteResponse, error) { - respType := DdosCustomPoliciesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return DdosCustomPoliciesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DdosCustomPoliciesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DdosProtectionPlansClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type DdosProtectionPlansClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DdosProtectionPlansClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DdosProtectionPlansClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DdosProtectionPlansClientCreateOrUpdateResponse will be returned. -func (p *DdosProtectionPlansClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (DdosProtectionPlansClientCreateOrUpdateResponse, error) { - respType := DdosProtectionPlansClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.DdosProtectionPlan) - if err != nil { - return DdosProtectionPlansClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DdosProtectionPlansClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DdosProtectionPlansClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type DdosProtectionPlansClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DdosProtectionPlansClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DdosProtectionPlansClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DdosProtectionPlansClientDeleteResponse will be returned. -func (p *DdosProtectionPlansClientDeletePoller) FinalResponse(ctx context.Context) (DdosProtectionPlansClientDeleteResponse, error) { - respType := DdosProtectionPlansClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return DdosProtectionPlansClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DdosProtectionPlansClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DscpConfigurationClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type DscpConfigurationClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DscpConfigurationClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DscpConfigurationClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DscpConfigurationClientCreateOrUpdateResponse will be returned. -func (p *DscpConfigurationClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (DscpConfigurationClientCreateOrUpdateResponse, error) { - respType := DscpConfigurationClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.DscpConfiguration) - if err != nil { - return DscpConfigurationClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DscpConfigurationClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// DscpConfigurationClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type DscpConfigurationClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *DscpConfigurationClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *DscpConfigurationClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final DscpConfigurationClientDeleteResponse will be returned. -func (p *DscpConfigurationClientDeletePoller) FinalResponse(ctx context.Context) (DscpConfigurationClientDeleteResponse, error) { - respType := DscpConfigurationClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return DscpConfigurationClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *DscpConfigurationClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitAuthorization) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitAuthorizationsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitAuthorizationsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitAuthorizationsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitAuthorizationsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitAuthorizationsClientDeleteResponse will be returned. -func (p *ExpressRouteCircuitAuthorizationsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitAuthorizationsClientDeleteResponse, error) { - respType := ExpressRouteCircuitAuthorizationsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteCircuitAuthorizationsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitAuthorizationsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitConnection) - if err != nil { - return ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitConnectionsClientDeleteResponse will be returned. -func (p *ExpressRouteCircuitConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitConnectionsClientDeleteResponse, error) { - respType := ExpressRouteCircuitConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteCircuitConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitPeering) - if err != nil { - return ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitPeeringsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitPeeringsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitPeeringsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitPeeringsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitPeeringsClientDeleteResponse will be returned. -func (p *ExpressRouteCircuitPeeringsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitPeeringsClientDeleteResponse, error) { - respType := ExpressRouteCircuitPeeringsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteCircuitPeeringsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitPeeringsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCircuitsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuit) - if err != nil { - return ExpressRouteCircuitsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitsClientDeleteResponse will be returned. -func (p *ExpressRouteCircuitsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsClientDeleteResponse, error) { - respType := ExpressRouteCircuitsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteCircuitsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitsClientListArpTablePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitsClientListArpTablePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitsClientListArpTablePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitsClientListArpTablePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitsClientListArpTableResponse will be returned. -func (p *ExpressRouteCircuitsClientListArpTablePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsClientListArpTableResponse, error) { - respType := ExpressRouteCircuitsClientListArpTableResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitsArpTableListResult) - if err != nil { - return ExpressRouteCircuitsClientListArpTableResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitsClientListArpTablePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitsClientListRoutesTablePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitsClientListRoutesTablePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitsClientListRoutesTablePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitsClientListRoutesTablePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitsClientListRoutesTableResponse will be returned. -func (p *ExpressRouteCircuitsClientListRoutesTablePoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsClientListRoutesTableResponse, error) { - respType := ExpressRouteCircuitsClientListRoutesTableResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitsRoutesTableListResult) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTableResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitsClientListRoutesTablePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCircuitsClientListRoutesTableSummaryPoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCircuitsClientListRoutesTableSummaryPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCircuitsClientListRoutesTableSummaryPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCircuitsClientListRoutesTableSummaryPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCircuitsClientListRoutesTableSummaryResponse will be returned. -func (p *ExpressRouteCircuitsClientListRoutesTableSummaryPoller) FinalResponse(ctx context.Context) (ExpressRouteCircuitsClientListRoutesTableSummaryResponse, error) { - respType := ExpressRouteCircuitsClientListRoutesTableSummaryResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitsRoutesTableSummaryListResult) - if err != nil { - return ExpressRouteCircuitsClientListRoutesTableSummaryResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCircuitsClientListRoutesTableSummaryPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteConnectionsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteConnection) - if err != nil { - return ExpressRouteConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteConnectionsClientDeleteResponse will be returned. -func (p *ExpressRouteConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteConnectionsClientDeleteResponse, error) { - respType := ExpressRouteConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCrossConnectionPeering) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionPeeringsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionPeeringsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionPeeringsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionPeeringsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionPeeringsClientDeleteResponse will be returned. -func (p *ExpressRouteCrossConnectionPeeringsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionPeeringsClientDeleteResponse, error) { - respType := ExpressRouteCrossConnectionPeeringsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteCrossConnectionPeeringsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionPeeringsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteCrossConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCrossConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCrossConnection) - if err != nil { - return ExpressRouteCrossConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionsClientListArpTablePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionsClientListArpTablePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionsClientListArpTablePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionsClientListArpTablePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionsClientListArpTableResponse will be returned. -func (p *ExpressRouteCrossConnectionsClientListArpTablePoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsClientListArpTableResponse, error) { - respType := ExpressRouteCrossConnectionsClientListArpTableResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitsArpTableListResult) - if err != nil { - return ExpressRouteCrossConnectionsClientListArpTableResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionsClientListArpTablePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionsClientListRoutesTablePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionsClientListRoutesTablePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionsClientListRoutesTablePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionsClientListRoutesTablePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionsClientListRoutesTableResponse will be returned. -func (p *ExpressRouteCrossConnectionsClientListRoutesTablePoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsClientListRoutesTableResponse, error) { - respType := ExpressRouteCrossConnectionsClientListRoutesTableResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCircuitsRoutesTableListResult) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTableResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionsClientListRoutesTablePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse will be returned. -func (p *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller) FinalResponse(ctx context.Context) (ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse, error) { - respType := ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteCrossConnectionsRoutesTableSummaryListResult) - if err != nil { - return ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteGatewaysClientCreateOrUpdateResponse will be returned. -func (p *ExpressRouteGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRouteGatewaysClientCreateOrUpdateResponse, error) { - respType := ExpressRouteGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteGateway) - if err != nil { - return ExpressRouteGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteGatewaysClientDeleteResponse will be returned. -func (p *ExpressRouteGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRouteGatewaysClientDeleteResponse, error) { - respType := ExpressRouteGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRouteGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRouteGatewaysClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type ExpressRouteGatewaysClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRouteGatewaysClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRouteGatewaysClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRouteGatewaysClientUpdateTagsResponse will be returned. -func (p *ExpressRouteGatewaysClientUpdateTagsPoller) FinalResponse(ctx context.Context) (ExpressRouteGatewaysClientUpdateTagsResponse, error) { - respType := ExpressRouteGatewaysClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRouteGateway) - if err != nil { - return ExpressRouteGatewaysClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRouteGatewaysClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRoutePortsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRoutePortsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRoutePortsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRoutePortsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRoutePortsClientCreateOrUpdateResponse will be returned. -func (p *ExpressRoutePortsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ExpressRoutePortsClientCreateOrUpdateResponse, error) { - respType := ExpressRoutePortsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ExpressRoutePort) - if err != nil { - return ExpressRoutePortsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRoutePortsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ExpressRoutePortsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ExpressRoutePortsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ExpressRoutePortsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ExpressRoutePortsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ExpressRoutePortsClientDeleteResponse will be returned. -func (p *ExpressRoutePortsClientDeletePoller) FinalResponse(ctx context.Context) (ExpressRoutePortsClientDeleteResponse, error) { - respType := ExpressRoutePortsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ExpressRoutePortsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ExpressRoutePortsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FirewallPoliciesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type FirewallPoliciesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FirewallPoliciesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FirewallPoliciesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FirewallPoliciesClientCreateOrUpdateResponse will be returned. -func (p *FirewallPoliciesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (FirewallPoliciesClientCreateOrUpdateResponse, error) { - respType := FirewallPoliciesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.FirewallPolicy) - if err != nil { - return FirewallPoliciesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FirewallPoliciesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FirewallPoliciesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type FirewallPoliciesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FirewallPoliciesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FirewallPoliciesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FirewallPoliciesClientDeleteResponse will be returned. -func (p *FirewallPoliciesClientDeletePoller) FinalResponse(ctx context.Context) (FirewallPoliciesClientDeleteResponse, error) { - respType := FirewallPoliciesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return FirewallPoliciesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FirewallPoliciesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse will be returned. -func (p *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse, error) { - respType := FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.FirewallPolicyRuleCollectionGroup) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FirewallPolicyRuleCollectionGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type FirewallPolicyRuleCollectionGroupsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FirewallPolicyRuleCollectionGroupsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FirewallPolicyRuleCollectionGroupsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FirewallPolicyRuleCollectionGroupsClientDeleteResponse will be returned. -func (p *FirewallPolicyRuleCollectionGroupsClientDeletePoller) FinalResponse(ctx context.Context) (FirewallPolicyRuleCollectionGroupsClientDeleteResponse, error) { - respType := FirewallPolicyRuleCollectionGroupsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return FirewallPolicyRuleCollectionGroupsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FirewallPolicyRuleCollectionGroupsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FlowLogsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type FlowLogsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FlowLogsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FlowLogsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FlowLogsClientCreateOrUpdateResponse will be returned. -func (p *FlowLogsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (FlowLogsClientCreateOrUpdateResponse, error) { - respType := FlowLogsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.FlowLog) - if err != nil { - return FlowLogsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FlowLogsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// FlowLogsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type FlowLogsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *FlowLogsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *FlowLogsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final FlowLogsClientDeleteResponse will be returned. -func (p *FlowLogsClientDeletePoller) FinalResponse(ctx context.Context) (FlowLogsClientDeleteResponse, error) { - respType := FlowLogsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return FlowLogsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *FlowLogsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// HubRouteTablesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type HubRouteTablesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *HubRouteTablesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *HubRouteTablesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final HubRouteTablesClientCreateOrUpdateResponse will be returned. -func (p *HubRouteTablesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (HubRouteTablesClientCreateOrUpdateResponse, error) { - respType := HubRouteTablesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.HubRouteTable) - if err != nil { - return HubRouteTablesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *HubRouteTablesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// HubRouteTablesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type HubRouteTablesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *HubRouteTablesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *HubRouteTablesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final HubRouteTablesClientDeleteResponse will be returned. -func (p *HubRouteTablesClientDeletePoller) FinalResponse(ctx context.Context) (HubRouteTablesClientDeleteResponse, error) { - respType := HubRouteTablesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return HubRouteTablesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *HubRouteTablesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// HubVirtualNetworkConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type HubVirtualNetworkConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *HubVirtualNetworkConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *HubVirtualNetworkConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final HubVirtualNetworkConnectionsClientCreateOrUpdateResponse will be returned. -func (p *HubVirtualNetworkConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (HubVirtualNetworkConnectionsClientCreateOrUpdateResponse, error) { - respType := HubVirtualNetworkConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.HubVirtualNetworkConnection) - if err != nil { - return HubVirtualNetworkConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *HubVirtualNetworkConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// HubVirtualNetworkConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type HubVirtualNetworkConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *HubVirtualNetworkConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *HubVirtualNetworkConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final HubVirtualNetworkConnectionsClientDeleteResponse will be returned. -func (p *HubVirtualNetworkConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (HubVirtualNetworkConnectionsClientDeleteResponse, error) { - respType := HubVirtualNetworkConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return HubVirtualNetworkConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *HubVirtualNetworkConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// IPAllocationsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type IPAllocationsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *IPAllocationsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *IPAllocationsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final IPAllocationsClientCreateOrUpdateResponse will be returned. -func (p *IPAllocationsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (IPAllocationsClientCreateOrUpdateResponse, error) { - respType := IPAllocationsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.IPAllocation) - if err != nil { - return IPAllocationsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *IPAllocationsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// IPAllocationsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type IPAllocationsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *IPAllocationsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *IPAllocationsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final IPAllocationsClientDeleteResponse will be returned. -func (p *IPAllocationsClientDeletePoller) FinalResponse(ctx context.Context) (IPAllocationsClientDeleteResponse, error) { - respType := IPAllocationsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return IPAllocationsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *IPAllocationsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// IPGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type IPGroupsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *IPGroupsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *IPGroupsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final IPGroupsClientCreateOrUpdateResponse will be returned. -func (p *IPGroupsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (IPGroupsClientCreateOrUpdateResponse, error) { - respType := IPGroupsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.IPGroup) - if err != nil { - return IPGroupsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *IPGroupsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// IPGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type IPGroupsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *IPGroupsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *IPGroupsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final IPGroupsClientDeleteResponse will be returned. -func (p *IPGroupsClientDeletePoller) FinalResponse(ctx context.Context) (IPGroupsClientDeleteResponse, error) { - respType := IPGroupsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return IPGroupsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *IPGroupsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InboundNatRulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type InboundNatRulesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InboundNatRulesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InboundNatRulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InboundNatRulesClientCreateOrUpdateResponse will be returned. -func (p *InboundNatRulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (InboundNatRulesClientCreateOrUpdateResponse, error) { - respType := InboundNatRulesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.InboundNatRule) - if err != nil { - return InboundNatRulesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InboundNatRulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InboundNatRulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type InboundNatRulesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InboundNatRulesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InboundNatRulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InboundNatRulesClientDeleteResponse will be returned. -func (p *InboundNatRulesClientDeletePoller) FinalResponse(ctx context.Context) (InboundNatRulesClientDeleteResponse, error) { - respType := InboundNatRulesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return InboundNatRulesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InboundNatRulesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InboundSecurityRuleClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type InboundSecurityRuleClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InboundSecurityRuleClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InboundSecurityRuleClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InboundSecurityRuleClientCreateOrUpdateResponse will be returned. -func (p *InboundSecurityRuleClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (InboundSecurityRuleClientCreateOrUpdateResponse, error) { - respType := InboundSecurityRuleClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.InboundSecurityRule) - if err != nil { - return InboundSecurityRuleClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InboundSecurityRuleClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfaceTapConfigurationsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type InterfaceTapConfigurationsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfaceTapConfigurationsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfaceTapConfigurationsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfaceTapConfigurationsClientCreateOrUpdateResponse will be returned. -func (p *InterfaceTapConfigurationsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (InterfaceTapConfigurationsClientCreateOrUpdateResponse, error) { - respType := InterfaceTapConfigurationsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.InterfaceTapConfiguration) - if err != nil { - return InterfaceTapConfigurationsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfaceTapConfigurationsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfaceTapConfigurationsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type InterfaceTapConfigurationsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfaceTapConfigurationsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfaceTapConfigurationsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfaceTapConfigurationsClientDeleteResponse will be returned. -func (p *InterfaceTapConfigurationsClientDeletePoller) FinalResponse(ctx context.Context) (InterfaceTapConfigurationsClientDeleteResponse, error) { - respType := InterfaceTapConfigurationsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return InterfaceTapConfigurationsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfaceTapConfigurationsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfacesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type InterfacesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfacesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfacesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfacesClientCreateOrUpdateResponse will be returned. -func (p *InterfacesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (InterfacesClientCreateOrUpdateResponse, error) { - respType := InterfacesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Interface) - if err != nil { - return InterfacesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfacesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfacesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type InterfacesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfacesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfacesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfacesClientDeleteResponse will be returned. -func (p *InterfacesClientDeletePoller) FinalResponse(ctx context.Context) (InterfacesClientDeleteResponse, error) { - respType := InterfacesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return InterfacesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfacesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfacesClientGetEffectiveRouteTablePoller provides polling facilities until the operation reaches a terminal state. -type InterfacesClientGetEffectiveRouteTablePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfacesClientGetEffectiveRouteTablePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfacesClientGetEffectiveRouteTablePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfacesClientGetEffectiveRouteTableResponse will be returned. -func (p *InterfacesClientGetEffectiveRouteTablePoller) FinalResponse(ctx context.Context) (InterfacesClientGetEffectiveRouteTableResponse, error) { - respType := InterfacesClientGetEffectiveRouteTableResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.EffectiveRouteListResult) - if err != nil { - return InterfacesClientGetEffectiveRouteTableResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfacesClientGetEffectiveRouteTablePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// InterfacesClientListEffectiveNetworkSecurityGroupsPoller provides polling facilities until the operation reaches a terminal state. -type InterfacesClientListEffectiveNetworkSecurityGroupsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *InterfacesClientListEffectiveNetworkSecurityGroupsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *InterfacesClientListEffectiveNetworkSecurityGroupsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final InterfacesClientListEffectiveNetworkSecurityGroupsResponse will be returned. -func (p *InterfacesClientListEffectiveNetworkSecurityGroupsPoller) FinalResponse(ctx context.Context) (InterfacesClientListEffectiveNetworkSecurityGroupsResponse, error) { - respType := InterfacesClientListEffectiveNetworkSecurityGroupsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.EffectiveNetworkSecurityGroupListResult) - if err != nil { - return InterfacesClientListEffectiveNetworkSecurityGroupsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *InterfacesClientListEffectiveNetworkSecurityGroupsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse will be returned. -func (p *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse, error) { - respType := LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BackendAddressPool) - if err != nil { - return LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancerBackendAddressPoolsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancerBackendAddressPoolsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancerBackendAddressPoolsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancerBackendAddressPoolsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancerBackendAddressPoolsClientDeleteResponse will be returned. -func (p *LoadBalancerBackendAddressPoolsClientDeletePoller) FinalResponse(ctx context.Context) (LoadBalancerBackendAddressPoolsClientDeleteResponse, error) { - respType := LoadBalancerBackendAddressPoolsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return LoadBalancerBackendAddressPoolsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancerBackendAddressPoolsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancersClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancersClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancersClientCreateOrUpdateResponse will be returned. -func (p *LoadBalancersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (LoadBalancersClientCreateOrUpdateResponse, error) { - respType := LoadBalancersClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.LoadBalancer) - if err != nil { - return LoadBalancersClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancersClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancersClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancersClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancersClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancersClientDeleteResponse will be returned. -func (p *LoadBalancersClientDeletePoller) FinalResponse(ctx context.Context) (LoadBalancersClientDeleteResponse, error) { - respType := LoadBalancersClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return LoadBalancersClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancersClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancersClientListInboundNatRulePortMappingsPoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancersClientListInboundNatRulePortMappingsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancersClientListInboundNatRulePortMappingsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancersClientListInboundNatRulePortMappingsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancersClientListInboundNatRulePortMappingsResponse will be returned. -func (p *LoadBalancersClientListInboundNatRulePortMappingsPoller) FinalResponse(ctx context.Context) (LoadBalancersClientListInboundNatRulePortMappingsResponse, error) { - respType := LoadBalancersClientListInboundNatRulePortMappingsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BackendAddressInboundNatRulePortMappings) - if err != nil { - return LoadBalancersClientListInboundNatRulePortMappingsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancersClientListInboundNatRulePortMappingsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LoadBalancersClientSwapPublicIPAddressesPoller provides polling facilities until the operation reaches a terminal state. -type LoadBalancersClientSwapPublicIPAddressesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LoadBalancersClientSwapPublicIPAddressesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LoadBalancersClientSwapPublicIPAddressesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LoadBalancersClientSwapPublicIPAddressesResponse will be returned. -func (p *LoadBalancersClientSwapPublicIPAddressesPoller) FinalResponse(ctx context.Context) (LoadBalancersClientSwapPublicIPAddressesResponse, error) { - respType := LoadBalancersClientSwapPublicIPAddressesResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return LoadBalancersClientSwapPublicIPAddressesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LoadBalancersClientSwapPublicIPAddressesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LocalNetworkGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type LocalNetworkGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LocalNetworkGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LocalNetworkGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LocalNetworkGatewaysClientCreateOrUpdateResponse will be returned. -func (p *LocalNetworkGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (LocalNetworkGatewaysClientCreateOrUpdateResponse, error) { - respType := LocalNetworkGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.LocalNetworkGateway) - if err != nil { - return LocalNetworkGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LocalNetworkGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// LocalNetworkGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type LocalNetworkGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *LocalNetworkGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *LocalNetworkGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final LocalNetworkGatewaysClientDeleteResponse will be returned. -func (p *LocalNetworkGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (LocalNetworkGatewaysClientDeleteResponse, error) { - respType := LocalNetworkGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return LocalNetworkGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *LocalNetworkGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ManagementClientDeleteBastionShareableLinkPoller provides polling facilities until the operation reaches a terminal state. -type ManagementClientDeleteBastionShareableLinkPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ManagementClientDeleteBastionShareableLinkPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ManagementClientDeleteBastionShareableLinkPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ManagementClientDeleteBastionShareableLinkResponse will be returned. -func (p *ManagementClientDeleteBastionShareableLinkPoller) FinalResponse(ctx context.Context) (ManagementClientDeleteBastionShareableLinkResponse, error) { - respType := ManagementClientDeleteBastionShareableLinkResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ManagementClientDeleteBastionShareableLinkResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ManagementClientDeleteBastionShareableLinkPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller provides polling facilities until the operation reaches a terminal state. -type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse will be returned. -func (p *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller) FinalResponse(ctx context.Context) (ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse, error) { - respType := ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNProfileResponse) - if err != nil { - return ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ManagementClientGetActiveSessionsPoller provides polling facilities until the operation reaches a terminal state. -type ManagementClientGetActiveSessionsPoller struct { - pt *azcore.Poller - client *ManagementClient -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ManagementClientGetActiveSessionsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ManagementClientGetActiveSessionsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final *ManagementClientGetActiveSessionsPager will be returned. -func (p *ManagementClientGetActiveSessionsPoller) FinalResponse(ctx context.Context) (*ManagementClientGetActiveSessionsPager, error) { - respType := &ManagementClientGetActiveSessionsPager{client: p.client} - if _, err := p.pt.FinalResponse(ctx, &respType.current.BastionActiveSessionListResult); err != nil { - return nil, err - } - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ManagementClientGetActiveSessionsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ManagementClientPutBastionShareableLinkPoller provides polling facilities until the operation reaches a terminal state. -type ManagementClientPutBastionShareableLinkPoller struct { - pt *azcore.Poller - client *ManagementClient -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ManagementClientPutBastionShareableLinkPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ManagementClientPutBastionShareableLinkPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final *ManagementClientPutBastionShareableLinkPager will be returned. -func (p *ManagementClientPutBastionShareableLinkPoller) FinalResponse(ctx context.Context) (*ManagementClientPutBastionShareableLinkPager, error) { - respType := &ManagementClientPutBastionShareableLinkPager{client: p.client} - if _, err := p.pt.FinalResponse(ctx, &respType.current.BastionShareableLinkListResult); err != nil { - return nil, err - } - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ManagementClientPutBastionShareableLinkPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// NatGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type NatGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *NatGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *NatGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final NatGatewaysClientCreateOrUpdateResponse will be returned. -func (p *NatGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (NatGatewaysClientCreateOrUpdateResponse, error) { - respType := NatGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.NatGateway) - if err != nil { - return NatGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *NatGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// NatGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type NatGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *NatGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *NatGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final NatGatewaysClientDeleteResponse will be returned. -func (p *NatGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (NatGatewaysClientDeleteResponse, error) { - respType := NatGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return NatGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *NatGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// NatRulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type NatRulesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *NatRulesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *NatRulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final NatRulesClientCreateOrUpdateResponse will be returned. -func (p *NatRulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (NatRulesClientCreateOrUpdateResponse, error) { - respType := NatRulesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNGatewayNatRule) - if err != nil { - return NatRulesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *NatRulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// NatRulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type NatRulesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *NatRulesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *NatRulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final NatRulesClientDeleteResponse will be returned. -func (p *NatRulesClientDeletePoller) FinalResponse(ctx context.Context) (NatRulesClientDeleteResponse, error) { - respType := NatRulesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return NatRulesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *NatRulesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientCreateOrUpdateResponse will be returned. -func (p *P2SVPNGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientCreateOrUpdateResponse, error) { - respType := P2SVPNGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.P2SVPNGateway) - if err != nil { - return P2SVPNGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientDeleteResponse will be returned. -func (p *P2SVPNGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientDeleteResponse, error) { - respType := P2SVPNGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return P2SVPNGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse will be returned. -func (p *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse, error) { - respType := P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientGenerateVPNProfilePoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientGenerateVPNProfilePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientGenerateVPNProfilePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientGenerateVPNProfilePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientGenerateVPNProfileResponse will be returned. -func (p *P2SVPNGatewaysClientGenerateVPNProfilePoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientGenerateVPNProfileResponse, error) { - respType := P2SVPNGatewaysClientGenerateVPNProfileResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNProfileResponse) - if err != nil { - return P2SVPNGatewaysClientGenerateVPNProfileResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientGenerateVPNProfilePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse will be returned. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse, error) { - respType := P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.P2SVPNConnectionHealth) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse will be returned. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse, error) { - respType := P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.P2SVPNGateway) - if err != nil { - return P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientResetPoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientResetPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientResetPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientResetPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientResetResponse will be returned. -func (p *P2SVPNGatewaysClientResetPoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientResetResponse, error) { - respType := P2SVPNGatewaysClientResetResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.P2SVPNGateway) - if err != nil { - return P2SVPNGatewaysClientResetResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientResetPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// P2SVPNGatewaysClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type P2SVPNGatewaysClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *P2SVPNGatewaysClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *P2SVPNGatewaysClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final P2SVPNGatewaysClientUpdateTagsResponse will be returned. -func (p *P2SVPNGatewaysClientUpdateTagsPoller) FinalResponse(ctx context.Context) (P2SVPNGatewaysClientUpdateTagsResponse, error) { - respType := P2SVPNGatewaysClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.P2SVPNGateway) - if err != nil { - return P2SVPNGatewaysClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *P2SVPNGatewaysClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PacketCapturesClientCreatePoller provides polling facilities until the operation reaches a terminal state. -type PacketCapturesClientCreatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PacketCapturesClientCreatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PacketCapturesClientCreatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PacketCapturesClientCreateResponse will be returned. -func (p *PacketCapturesClientCreatePoller) FinalResponse(ctx context.Context) (PacketCapturesClientCreateResponse, error) { - respType := PacketCapturesClientCreateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PacketCaptureResult) - if err != nil { - return PacketCapturesClientCreateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PacketCapturesClientCreatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PacketCapturesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PacketCapturesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PacketCapturesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PacketCapturesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PacketCapturesClientDeleteResponse will be returned. -func (p *PacketCapturesClientDeletePoller) FinalResponse(ctx context.Context) (PacketCapturesClientDeleteResponse, error) { - respType := PacketCapturesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PacketCapturesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PacketCapturesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PacketCapturesClientGetStatusPoller provides polling facilities until the operation reaches a terminal state. -type PacketCapturesClientGetStatusPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PacketCapturesClientGetStatusPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PacketCapturesClientGetStatusPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PacketCapturesClientGetStatusResponse will be returned. -func (p *PacketCapturesClientGetStatusPoller) FinalResponse(ctx context.Context) (PacketCapturesClientGetStatusResponse, error) { - respType := PacketCapturesClientGetStatusResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PacketCaptureQueryStatusResult) - if err != nil { - return PacketCapturesClientGetStatusResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PacketCapturesClientGetStatusPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PacketCapturesClientStopPoller provides polling facilities until the operation reaches a terminal state. -type PacketCapturesClientStopPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PacketCapturesClientStopPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PacketCapturesClientStopPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PacketCapturesClientStopResponse will be returned. -func (p *PacketCapturesClientStopPoller) FinalResponse(ctx context.Context) (PacketCapturesClientStopResponse, error) { - respType := PacketCapturesClientStopResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PacketCapturesClientStopResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PacketCapturesClientStopPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateDNSZoneGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type PrivateDNSZoneGroupsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateDNSZoneGroupsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateDNSZoneGroupsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateDNSZoneGroupsClientCreateOrUpdateResponse will be returned. -func (p *PrivateDNSZoneGroupsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (PrivateDNSZoneGroupsClientCreateOrUpdateResponse, error) { - respType := PrivateDNSZoneGroupsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PrivateDNSZoneGroup) - if err != nil { - return PrivateDNSZoneGroupsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateDNSZoneGroupsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateDNSZoneGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PrivateDNSZoneGroupsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateDNSZoneGroupsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateDNSZoneGroupsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateDNSZoneGroupsClientDeleteResponse will be returned. -func (p *PrivateDNSZoneGroupsClientDeletePoller) FinalResponse(ctx context.Context) (PrivateDNSZoneGroupsClientDeleteResponse, error) { - respType := PrivateDNSZoneGroupsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PrivateDNSZoneGroupsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateDNSZoneGroupsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateEndpointsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type PrivateEndpointsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateEndpointsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateEndpointsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateEndpointsClientCreateOrUpdateResponse will be returned. -func (p *PrivateEndpointsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (PrivateEndpointsClientCreateOrUpdateResponse, error) { - respType := PrivateEndpointsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PrivateEndpoint) - if err != nil { - return PrivateEndpointsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateEndpointsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateEndpointsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PrivateEndpointsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateEndpointsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateEndpointsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateEndpointsClientDeleteResponse will be returned. -func (p *PrivateEndpointsClientDeletePoller) FinalResponse(ctx context.Context) (PrivateEndpointsClientDeleteResponse, error) { - respType := PrivateEndpointsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PrivateEndpointsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateEndpointsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller provides polling facilities until the operation reaches a terminal state. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse will be returned. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller) FinalResponse(ctx context.Context) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse, error) { - respType := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PrivateLinkServiceVisibility) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller provides polling facilities until the operation reaches a terminal state. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse will be returned. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller) FinalResponse(ctx context.Context) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse, error) { - respType := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PrivateLinkServiceVisibility) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateLinkServicesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type PrivateLinkServicesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateLinkServicesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateLinkServicesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateLinkServicesClientCreateOrUpdateResponse will be returned. -func (p *PrivateLinkServicesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (PrivateLinkServicesClientCreateOrUpdateResponse, error) { - respType := PrivateLinkServicesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PrivateLinkService) - if err != nil { - return PrivateLinkServicesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateLinkServicesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateLinkServicesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PrivateLinkServicesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateLinkServicesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateLinkServicesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateLinkServicesClientDeleteResponse will be returned. -func (p *PrivateLinkServicesClientDeletePoller) FinalResponse(ctx context.Context) (PrivateLinkServicesClientDeleteResponse, error) { - respType := PrivateLinkServicesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PrivateLinkServicesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateLinkServicesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller provides polling facilities until the operation reaches a terminal state. -type PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse will be returned. -func (p *PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller) FinalResponse(ctx context.Context) (PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse, error) { - respType := PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ProfilesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ProfilesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ProfilesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ProfilesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ProfilesClientDeleteResponse will be returned. -func (p *ProfilesClientDeletePoller) FinalResponse(ctx context.Context) (ProfilesClientDeleteResponse, error) { - respType := ProfilesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ProfilesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ProfilesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PublicIPAddressesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type PublicIPAddressesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PublicIPAddressesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PublicIPAddressesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PublicIPAddressesClientCreateOrUpdateResponse will be returned. -func (p *PublicIPAddressesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (PublicIPAddressesClientCreateOrUpdateResponse, error) { - respType := PublicIPAddressesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PublicIPAddress) - if err != nil { - return PublicIPAddressesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PublicIPAddressesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PublicIPAddressesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PublicIPAddressesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PublicIPAddressesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PublicIPAddressesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PublicIPAddressesClientDeleteResponse will be returned. -func (p *PublicIPAddressesClientDeletePoller) FinalResponse(ctx context.Context) (PublicIPAddressesClientDeleteResponse, error) { - respType := PublicIPAddressesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PublicIPAddressesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PublicIPAddressesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PublicIPPrefixesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type PublicIPPrefixesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PublicIPPrefixesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PublicIPPrefixesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PublicIPPrefixesClientCreateOrUpdateResponse will be returned. -func (p *PublicIPPrefixesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (PublicIPPrefixesClientCreateOrUpdateResponse, error) { - respType := PublicIPPrefixesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PublicIPPrefix) - if err != nil { - return PublicIPPrefixesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PublicIPPrefixesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// PublicIPPrefixesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type PublicIPPrefixesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *PublicIPPrefixesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *PublicIPPrefixesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final PublicIPPrefixesClientDeleteResponse will be returned. -func (p *PublicIPPrefixesClientDeletePoller) FinalResponse(ctx context.Context) (PublicIPPrefixesClientDeleteResponse, error) { - respType := PublicIPPrefixesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return PublicIPPrefixesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *PublicIPPrefixesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteFilterRulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RouteFilterRulesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteFilterRulesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteFilterRulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteFilterRulesClientCreateOrUpdateResponse will be returned. -func (p *RouteFilterRulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RouteFilterRulesClientCreateOrUpdateResponse, error) { - respType := RouteFilterRulesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.RouteFilterRule) - if err != nil { - return RouteFilterRulesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteFilterRulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteFilterRulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type RouteFilterRulesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteFilterRulesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteFilterRulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteFilterRulesClientDeleteResponse will be returned. -func (p *RouteFilterRulesClientDeletePoller) FinalResponse(ctx context.Context) (RouteFilterRulesClientDeleteResponse, error) { - respType := RouteFilterRulesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return RouteFilterRulesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteFilterRulesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteFiltersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RouteFiltersClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteFiltersClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteFiltersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteFiltersClientCreateOrUpdateResponse will be returned. -func (p *RouteFiltersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RouteFiltersClientCreateOrUpdateResponse, error) { - respType := RouteFiltersClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.RouteFilter) - if err != nil { - return RouteFiltersClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteFiltersClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteFiltersClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type RouteFiltersClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteFiltersClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteFiltersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteFiltersClientDeleteResponse will be returned. -func (p *RouteFiltersClientDeletePoller) FinalResponse(ctx context.Context) (RouteFiltersClientDeleteResponse, error) { - respType := RouteFiltersClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return RouteFiltersClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteFiltersClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteTablesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RouteTablesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteTablesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteTablesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteTablesClientCreateOrUpdateResponse will be returned. -func (p *RouteTablesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RouteTablesClientCreateOrUpdateResponse, error) { - respType := RouteTablesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.RouteTable) - if err != nil { - return RouteTablesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteTablesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RouteTablesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type RouteTablesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RouteTablesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RouteTablesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RouteTablesClientDeleteResponse will be returned. -func (p *RouteTablesClientDeletePoller) FinalResponse(ctx context.Context) (RouteTablesClientDeleteResponse, error) { - respType := RouteTablesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return RouteTablesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RouteTablesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RoutesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RoutesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RoutesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RoutesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RoutesClientCreateOrUpdateResponse will be returned. -func (p *RoutesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RoutesClientCreateOrUpdateResponse, error) { - respType := RoutesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Route) - if err != nil { - return RoutesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RoutesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RoutesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type RoutesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RoutesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RoutesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RoutesClientDeleteResponse will be returned. -func (p *RoutesClientDeletePoller) FinalResponse(ctx context.Context) (RoutesClientDeleteResponse, error) { - respType := RoutesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return RoutesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RoutesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RoutingIntentClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type RoutingIntentClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RoutingIntentClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RoutingIntentClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RoutingIntentClientCreateOrUpdateResponse will be returned. -func (p *RoutingIntentClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (RoutingIntentClientCreateOrUpdateResponse, error) { - respType := RoutingIntentClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.RoutingIntent) - if err != nil { - return RoutingIntentClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RoutingIntentClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// RoutingIntentClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type RoutingIntentClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *RoutingIntentClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *RoutingIntentClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final RoutingIntentClientDeleteResponse will be returned. -func (p *RoutingIntentClientDeletePoller) FinalResponse(ctx context.Context) (RoutingIntentClientDeleteResponse, error) { - respType := RoutingIntentClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return RoutingIntentClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *RoutingIntentClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityGroupsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type SecurityGroupsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityGroupsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityGroupsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityGroupsClientCreateOrUpdateResponse will be returned. -func (p *SecurityGroupsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SecurityGroupsClientCreateOrUpdateResponse, error) { - respType := SecurityGroupsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.SecurityGroup) - if err != nil { - return SecurityGroupsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityGroupsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityGroupsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type SecurityGroupsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityGroupsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityGroupsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityGroupsClientDeleteResponse will be returned. -func (p *SecurityGroupsClientDeletePoller) FinalResponse(ctx context.Context) (SecurityGroupsClientDeleteResponse, error) { - respType := SecurityGroupsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SecurityGroupsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityGroupsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityPartnerProvidersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type SecurityPartnerProvidersClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityPartnerProvidersClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityPartnerProvidersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityPartnerProvidersClientCreateOrUpdateResponse will be returned. -func (p *SecurityPartnerProvidersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SecurityPartnerProvidersClientCreateOrUpdateResponse, error) { - respType := SecurityPartnerProvidersClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.SecurityPartnerProvider) - if err != nil { - return SecurityPartnerProvidersClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityPartnerProvidersClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityPartnerProvidersClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type SecurityPartnerProvidersClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityPartnerProvidersClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityPartnerProvidersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityPartnerProvidersClientDeleteResponse will be returned. -func (p *SecurityPartnerProvidersClientDeletePoller) FinalResponse(ctx context.Context) (SecurityPartnerProvidersClientDeleteResponse, error) { - respType := SecurityPartnerProvidersClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SecurityPartnerProvidersClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityPartnerProvidersClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityRulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type SecurityRulesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityRulesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityRulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityRulesClientCreateOrUpdateResponse will be returned. -func (p *SecurityRulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SecurityRulesClientCreateOrUpdateResponse, error) { - respType := SecurityRulesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.SecurityRule) - if err != nil { - return SecurityRulesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityRulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SecurityRulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type SecurityRulesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SecurityRulesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SecurityRulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SecurityRulesClientDeleteResponse will be returned. -func (p *SecurityRulesClientDeletePoller) FinalResponse(ctx context.Context) (SecurityRulesClientDeleteResponse, error) { - respType := SecurityRulesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SecurityRulesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SecurityRulesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ServiceEndpointPoliciesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ServiceEndpointPoliciesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ServiceEndpointPoliciesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ServiceEndpointPoliciesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ServiceEndpointPoliciesClientCreateOrUpdateResponse will be returned. -func (p *ServiceEndpointPoliciesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ServiceEndpointPoliciesClientCreateOrUpdateResponse, error) { - respType := ServiceEndpointPoliciesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ServiceEndpointPolicy) - if err != nil { - return ServiceEndpointPoliciesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ServiceEndpointPoliciesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ServiceEndpointPoliciesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ServiceEndpointPoliciesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ServiceEndpointPoliciesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ServiceEndpointPoliciesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ServiceEndpointPoliciesClientDeleteResponse will be returned. -func (p *ServiceEndpointPoliciesClientDeletePoller) FinalResponse(ctx context.Context) (ServiceEndpointPoliciesClientDeleteResponse, error) { - respType := ServiceEndpointPoliciesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ServiceEndpointPoliciesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ServiceEndpointPoliciesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse will be returned. -func (p *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse, error) { - respType := ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ServiceEndpointPolicyDefinition) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// ServiceEndpointPolicyDefinitionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type ServiceEndpointPolicyDefinitionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *ServiceEndpointPolicyDefinitionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *ServiceEndpointPolicyDefinitionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final ServiceEndpointPolicyDefinitionsClientDeleteResponse will be returned. -func (p *ServiceEndpointPolicyDefinitionsClientDeletePoller) FinalResponse(ctx context.Context) (ServiceEndpointPolicyDefinitionsClientDeleteResponse, error) { - respType := ServiceEndpointPolicyDefinitionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *ServiceEndpointPolicyDefinitionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SubnetsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type SubnetsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SubnetsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SubnetsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SubnetsClientCreateOrUpdateResponse will be returned. -func (p *SubnetsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (SubnetsClientCreateOrUpdateResponse, error) { - respType := SubnetsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Subnet) - if err != nil { - return SubnetsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SubnetsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SubnetsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type SubnetsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SubnetsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SubnetsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SubnetsClientDeleteResponse will be returned. -func (p *SubnetsClientDeletePoller) FinalResponse(ctx context.Context) (SubnetsClientDeleteResponse, error) { - respType := SubnetsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SubnetsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SubnetsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SubnetsClientPrepareNetworkPoliciesPoller provides polling facilities until the operation reaches a terminal state. -type SubnetsClientPrepareNetworkPoliciesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SubnetsClientPrepareNetworkPoliciesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SubnetsClientPrepareNetworkPoliciesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SubnetsClientPrepareNetworkPoliciesResponse will be returned. -func (p *SubnetsClientPrepareNetworkPoliciesPoller) FinalResponse(ctx context.Context) (SubnetsClientPrepareNetworkPoliciesResponse, error) { - respType := SubnetsClientPrepareNetworkPoliciesResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SubnetsClientPrepareNetworkPoliciesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SubnetsClientPrepareNetworkPoliciesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// SubnetsClientUnprepareNetworkPoliciesPoller provides polling facilities until the operation reaches a terminal state. -type SubnetsClientUnprepareNetworkPoliciesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *SubnetsClientUnprepareNetworkPoliciesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *SubnetsClientUnprepareNetworkPoliciesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final SubnetsClientUnprepareNetworkPoliciesResponse will be returned. -func (p *SubnetsClientUnprepareNetworkPoliciesPoller) FinalResponse(ctx context.Context) (SubnetsClientUnprepareNetworkPoliciesResponse, error) { - respType := SubnetsClientUnprepareNetworkPoliciesResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return SubnetsClientUnprepareNetworkPoliciesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *SubnetsClientUnprepareNetworkPoliciesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VPNConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNConnectionsClientCreateOrUpdateResponse will be returned. -func (p *VPNConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VPNConnectionsClientCreateOrUpdateResponse, error) { - respType := VPNConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNConnection) - if err != nil { - return VPNConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VPNConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNConnectionsClientDeleteResponse will be returned. -func (p *VPNConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (VPNConnectionsClientDeleteResponse, error) { - respType := VPNConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNConnectionsClientStartPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VPNConnectionsClientStartPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNConnectionsClientStartPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNConnectionsClientStartPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNConnectionsClientStartPacketCaptureResponse will be returned. -func (p *VPNConnectionsClientStartPacketCapturePoller) FinalResponse(ctx context.Context) (VPNConnectionsClientStartPacketCaptureResponse, error) { - respType := VPNConnectionsClientStartPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VPNConnectionsClientStartPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNConnectionsClientStartPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNConnectionsClientStopPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VPNConnectionsClientStopPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNConnectionsClientStopPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNConnectionsClientStopPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNConnectionsClientStopPacketCaptureResponse will be returned. -func (p *VPNConnectionsClientStopPacketCapturePoller) FinalResponse(ctx context.Context) (VPNConnectionsClientStopPacketCaptureResponse, error) { - respType := VPNConnectionsClientStopPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VPNConnectionsClientStopPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNConnectionsClientStopPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientCreateOrUpdateResponse will be returned. -func (p *VPNGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VPNGatewaysClientCreateOrUpdateResponse, error) { - respType := VPNGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNGateway) - if err != nil { - return VPNGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientDeleteResponse will be returned. -func (p *VPNGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (VPNGatewaysClientDeleteResponse, error) { - respType := VPNGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientResetPoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientResetPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientResetPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientResetPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientResetResponse will be returned. -func (p *VPNGatewaysClientResetPoller) FinalResponse(ctx context.Context) (VPNGatewaysClientResetResponse, error) { - respType := VPNGatewaysClientResetResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNGateway) - if err != nil { - return VPNGatewaysClientResetResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientResetPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientStartPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientStartPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientStartPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientStartPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientStartPacketCaptureResponse will be returned. -func (p *VPNGatewaysClientStartPacketCapturePoller) FinalResponse(ctx context.Context) (VPNGatewaysClientStartPacketCaptureResponse, error) { - respType := VPNGatewaysClientStartPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VPNGatewaysClientStartPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientStartPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientStopPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientStopPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientStopPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientStopPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientStopPacketCaptureResponse will be returned. -func (p *VPNGatewaysClientStopPacketCapturePoller) FinalResponse(ctx context.Context) (VPNGatewaysClientStopPacketCaptureResponse, error) { - respType := VPNGatewaysClientStopPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VPNGatewaysClientStopPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientStopPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNGatewaysClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type VPNGatewaysClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNGatewaysClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNGatewaysClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNGatewaysClientUpdateTagsResponse will be returned. -func (p *VPNGatewaysClientUpdateTagsPoller) FinalResponse(ctx context.Context) (VPNGatewaysClientUpdateTagsResponse, error) { - respType := VPNGatewaysClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNGateway) - if err != nil { - return VPNGatewaysClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNGatewaysClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNLinkConnectionsClientGetIkeSasPoller provides polling facilities until the operation reaches a terminal state. -type VPNLinkConnectionsClientGetIkeSasPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNLinkConnectionsClientGetIkeSasPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNLinkConnectionsClientGetIkeSasPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNLinkConnectionsClientGetIkeSasResponse will be returned. -func (p *VPNLinkConnectionsClientGetIkeSasPoller) FinalResponse(ctx context.Context) (VPNLinkConnectionsClientGetIkeSasResponse, error) { - respType := VPNLinkConnectionsClientGetIkeSasResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VPNLinkConnectionsClientGetIkeSasResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNLinkConnectionsClientGetIkeSasPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNLinkConnectionsClientResetConnectionPoller provides polling facilities until the operation reaches a terminal state. -type VPNLinkConnectionsClientResetConnectionPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNLinkConnectionsClientResetConnectionPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNLinkConnectionsClientResetConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNLinkConnectionsClientResetConnectionResponse will be returned. -func (p *VPNLinkConnectionsClientResetConnectionPoller) FinalResponse(ctx context.Context) (VPNLinkConnectionsClientResetConnectionResponse, error) { - respType := VPNLinkConnectionsClientResetConnectionResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNLinkConnectionsClientResetConnectionResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNLinkConnectionsClientResetConnectionPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller provides polling facilities until the operation reaches a terminal state. -type VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse will be returned. -func (p *VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller) FinalResponse(ctx context.Context) (VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse, error) { - respType := VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNServerConfigurationsResponse) - if err != nil { - return VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNServerConfigurationsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VPNServerConfigurationsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNServerConfigurationsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNServerConfigurationsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNServerConfigurationsClientCreateOrUpdateResponse will be returned. -func (p *VPNServerConfigurationsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VPNServerConfigurationsClientCreateOrUpdateResponse, error) { - respType := VPNServerConfigurationsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNServerConfiguration) - if err != nil { - return VPNServerConfigurationsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNServerConfigurationsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNServerConfigurationsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VPNServerConfigurationsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNServerConfigurationsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNServerConfigurationsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNServerConfigurationsClientDeleteResponse will be returned. -func (p *VPNServerConfigurationsClientDeletePoller) FinalResponse(ctx context.Context) (VPNServerConfigurationsClientDeleteResponse, error) { - respType := VPNServerConfigurationsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNServerConfigurationsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNServerConfigurationsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNSitesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VPNSitesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNSitesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNSitesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNSitesClientCreateOrUpdateResponse will be returned. -func (p *VPNSitesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VPNSitesClientCreateOrUpdateResponse, error) { - respType := VPNSitesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNSite) - if err != nil { - return VPNSitesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNSitesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNSitesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VPNSitesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNSitesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNSitesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNSitesClientDeleteResponse will be returned. -func (p *VPNSitesClientDeletePoller) FinalResponse(ctx context.Context) (VPNSitesClientDeleteResponse, error) { - respType := VPNSitesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNSitesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNSitesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VPNSitesConfigurationClientDownloadPoller provides polling facilities until the operation reaches a terminal state. -type VPNSitesConfigurationClientDownloadPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VPNSitesConfigurationClientDownloadPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VPNSitesConfigurationClientDownloadPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VPNSitesConfigurationClientDownloadResponse will be returned. -func (p *VPNSitesConfigurationClientDownloadPoller) FinalResponse(ctx context.Context) (VPNSitesConfigurationClientDownloadResponse, error) { - respType := VPNSitesConfigurationClientDownloadResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VPNSitesConfigurationClientDownloadResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VPNSitesConfigurationClientDownloadPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualApplianceSitesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualApplianceSitesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualApplianceSitesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualApplianceSitesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualApplianceSitesClientCreateOrUpdateResponse will be returned. -func (p *VirtualApplianceSitesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualApplianceSitesClientCreateOrUpdateResponse, error) { - respType := VirtualApplianceSitesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualApplianceSite) - if err != nil { - return VirtualApplianceSitesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualApplianceSitesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualApplianceSitesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualApplianceSitesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualApplianceSitesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualApplianceSitesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualApplianceSitesClientDeleteResponse will be returned. -func (p *VirtualApplianceSitesClientDeletePoller) FinalResponse(ctx context.Context) (VirtualApplianceSitesClientDeleteResponse, error) { - respType := VirtualApplianceSitesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualApplianceSitesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualApplianceSitesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualAppliancesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualAppliancesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualAppliancesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualAppliancesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualAppliancesClientCreateOrUpdateResponse will be returned. -func (p *VirtualAppliancesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualAppliancesClientCreateOrUpdateResponse, error) { - respType := VirtualAppliancesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualAppliance) - if err != nil { - return VirtualAppliancesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualAppliancesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualAppliancesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualAppliancesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualAppliancesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualAppliancesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualAppliancesClientDeleteResponse will be returned. -func (p *VirtualAppliancesClientDeletePoller) FinalResponse(ctx context.Context) (VirtualAppliancesClientDeleteResponse, error) { - respType := VirtualAppliancesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualAppliancesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualAppliancesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubBgpConnectionClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubBgpConnectionClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubBgpConnectionClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubBgpConnectionClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubBgpConnectionClientCreateOrUpdateResponse will be returned. -func (p *VirtualHubBgpConnectionClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualHubBgpConnectionClientCreateOrUpdateResponse, error) { - respType := VirtualHubBgpConnectionClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BgpConnection) - if err != nil { - return VirtualHubBgpConnectionClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubBgpConnectionClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubBgpConnectionClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubBgpConnectionClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubBgpConnectionClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubBgpConnectionClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubBgpConnectionClientDeleteResponse will be returned. -func (p *VirtualHubBgpConnectionClientDeletePoller) FinalResponse(ctx context.Context) (VirtualHubBgpConnectionClientDeleteResponse, error) { - respType := VirtualHubBgpConnectionClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualHubBgpConnectionClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubBgpConnectionClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse will be returned. -func (p *VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller) FinalResponse(ctx context.Context) (VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse, error) { - respType := VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PeerRouteList) - if err != nil { - return VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubBgpConnectionsClientListLearnedRoutesPoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubBgpConnectionsClientListLearnedRoutesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubBgpConnectionsClientListLearnedRoutesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubBgpConnectionsClientListLearnedRoutesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubBgpConnectionsClientListLearnedRoutesResponse will be returned. -func (p *VirtualHubBgpConnectionsClientListLearnedRoutesPoller) FinalResponse(ctx context.Context) (VirtualHubBgpConnectionsClientListLearnedRoutesResponse, error) { - respType := VirtualHubBgpConnectionsClientListLearnedRoutesResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.PeerRouteList) - if err != nil { - return VirtualHubBgpConnectionsClientListLearnedRoutesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubBgpConnectionsClientListLearnedRoutesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubIPConfigurationClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubIPConfigurationClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubIPConfigurationClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubIPConfigurationClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubIPConfigurationClientCreateOrUpdateResponse will be returned. -func (p *VirtualHubIPConfigurationClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualHubIPConfigurationClientCreateOrUpdateResponse, error) { - respType := VirtualHubIPConfigurationClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.HubIPConfiguration) - if err != nil { - return VirtualHubIPConfigurationClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubIPConfigurationClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubIPConfigurationClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubIPConfigurationClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubIPConfigurationClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubIPConfigurationClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubIPConfigurationClientDeleteResponse will be returned. -func (p *VirtualHubIPConfigurationClientDeletePoller) FinalResponse(ctx context.Context) (VirtualHubIPConfigurationClientDeleteResponse, error) { - respType := VirtualHubIPConfigurationClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualHubIPConfigurationClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubIPConfigurationClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubRouteTableV2SClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubRouteTableV2SClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubRouteTableV2SClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubRouteTableV2SClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubRouteTableV2SClientCreateOrUpdateResponse will be returned. -func (p *VirtualHubRouteTableV2SClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualHubRouteTableV2SClientCreateOrUpdateResponse, error) { - respType := VirtualHubRouteTableV2SClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualHubRouteTableV2) - if err != nil { - return VirtualHubRouteTableV2SClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubRouteTableV2SClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubRouteTableV2SClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubRouteTableV2SClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubRouteTableV2SClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubRouteTableV2SClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubRouteTableV2SClientDeleteResponse will be returned. -func (p *VirtualHubRouteTableV2SClientDeletePoller) FinalResponse(ctx context.Context) (VirtualHubRouteTableV2SClientDeleteResponse, error) { - respType := VirtualHubRouteTableV2SClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualHubRouteTableV2SClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubRouteTableV2SClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubsClientCreateOrUpdateResponse will be returned. -func (p *VirtualHubsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualHubsClientCreateOrUpdateResponse, error) { - respType := VirtualHubsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualHub) - if err != nil { - return VirtualHubsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubsClientDeleteResponse will be returned. -func (p *VirtualHubsClientDeletePoller) FinalResponse(ctx context.Context) (VirtualHubsClientDeleteResponse, error) { - respType := VirtualHubsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualHubsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualHubsClientGetEffectiveVirtualHubRoutesPoller provides polling facilities until the operation reaches a terminal state. -type VirtualHubsClientGetEffectiveVirtualHubRoutesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualHubsClientGetEffectiveVirtualHubRoutesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualHubsClientGetEffectiveVirtualHubRoutesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualHubsClientGetEffectiveVirtualHubRoutesResponse will be returned. -func (p *VirtualHubsClientGetEffectiveVirtualHubRoutesPoller) FinalResponse(ctx context.Context) (VirtualHubsClientGetEffectiveVirtualHubRoutesResponse, error) { - respType := VirtualHubsClientGetEffectiveVirtualHubRoutesResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualHubsClientGetEffectiveVirtualHubRoutesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualHubsClientGetEffectiveVirtualHubRoutesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGatewayConnection) - if err != nil { - return VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientDeleteResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientDeleteResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewayConnectionsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientGetIkeSasPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientGetIkeSasPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientGetIkeSasPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientGetIkeSasPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientGetIkeSasResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientGetIkeSasPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientGetIkeSasResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientGetIkeSasResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetIkeSasResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientGetIkeSasPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientResetConnectionPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientResetConnectionPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientResetConnectionPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientResetConnectionPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientResetConnectionResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientResetConnectionPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientResetConnectionResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientResetConnectionResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetConnectionResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientResetConnectionPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConnectionResetSharedKey) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConnectionSharedKey) - if err != nil { - return VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayConnectionsClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayConnectionsClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayConnectionsClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayConnectionsClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayConnectionsClientUpdateTagsResponse will be returned. -func (p *VirtualNetworkGatewayConnectionsClientUpdateTagsPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayConnectionsClientUpdateTagsResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGatewayConnection) - if err != nil { - return VirtualNetworkGatewayConnectionsClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayConnectionsClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGatewayNatRule) - if err != nil { - return VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewayNatRulesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewayNatRulesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewayNatRulesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewayNatRulesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewayNatRulesClientDeleteResponse will be returned. -func (p *VirtualNetworkGatewayNatRulesClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewayNatRulesClientDeleteResponse, error) { - respType := VirtualNetworkGatewayNatRulesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewayNatRulesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewayNatRulesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworkGatewaysClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewaysClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGateway) - if err != nil { - return VirtualNetworkGatewaysClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientDeleteResponse will be returned. -func (p *VirtualNetworkGatewaysClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientDeleteResponse, error) { - respType := VirtualNetworkGatewaysClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewaysClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse will be returned. -func (p *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse, error) { - respType := VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGenerateVPNProfilePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGenerateVPNProfilePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGenerateVPNProfilePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGenerateVPNProfilePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGenerateVPNProfileResponse will be returned. -func (p *VirtualNetworkGatewaysClientGenerateVPNProfilePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGenerateVPNProfileResponse, error) { - respType := VirtualNetworkGatewaysClientGenerateVPNProfileResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewaysClientGenerateVPNProfileResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGenerateVPNProfilePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse will be returned. -func (p *VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse, error) { - respType := VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse, error) { - respType := VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.GatewayRouteListResult) - if err != nil { - return VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetBgpPeerStatusPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetBgpPeerStatusPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetBgpPeerStatusPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetBgpPeerStatusPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetBgpPeerStatusResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetBgpPeerStatusPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetBgpPeerStatusResponse, error) { - respType := VirtualNetworkGatewaysClientGetBgpPeerStatusResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.BgpPeerStatusListResult) - if err != nil { - return VirtualNetworkGatewaysClientGetBgpPeerStatusResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetBgpPeerStatusPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetLearnedRoutesPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetLearnedRoutesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetLearnedRoutesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetLearnedRoutesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetLearnedRoutesResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetLearnedRoutesPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetLearnedRoutesResponse, error) { - respType := VirtualNetworkGatewaysClientGetLearnedRoutesResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.GatewayRouteListResult) - if err != nil { - return VirtualNetworkGatewaysClientGetLearnedRoutesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetLearnedRoutesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse, error) { - respType := VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse, error) { - respType := VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNClientConnectionHealthDetailListResult) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse will be returned. -func (p *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse, error) { - respType := VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNClientIPsecParameters) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientResetPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientResetPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientResetPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientResetPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientResetResponse will be returned. -func (p *VirtualNetworkGatewaysClientResetPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientResetResponse, error) { - respType := VirtualNetworkGatewaysClientResetResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGateway) - if err != nil { - return VirtualNetworkGatewaysClientResetResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientResetPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse will be returned. -func (p *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse, error) { - respType := VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse will be returned. -func (p *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse, error) { - respType := VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VPNClientIPsecParameters) - if err != nil { - return VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientStartPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientStartPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientStartPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientStartPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientStartPacketCaptureResponse will be returned. -func (p *VirtualNetworkGatewaysClientStartPacketCapturePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientStartPacketCaptureResponse, error) { - respType := VirtualNetworkGatewaysClientStartPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewaysClientStartPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientStartPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientStopPacketCapturePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientStopPacketCapturePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientStopPacketCapturePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientStopPacketCapturePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientStopPacketCaptureResponse will be returned. -func (p *VirtualNetworkGatewaysClientStopPacketCapturePoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientStopPacketCaptureResponse, error) { - respType := VirtualNetworkGatewaysClientStopPacketCaptureResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.Value) - if err != nil { - return VirtualNetworkGatewaysClientStopPacketCaptureResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientStopPacketCapturePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkGatewaysClientUpdateTagsPoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkGatewaysClientUpdateTagsPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkGatewaysClientUpdateTagsPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkGatewaysClientUpdateTagsPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkGatewaysClientUpdateTagsResponse will be returned. -func (p *VirtualNetworkGatewaysClientUpdateTagsPoller) FinalResponse(ctx context.Context) (VirtualNetworkGatewaysClientUpdateTagsResponse, error) { - respType := VirtualNetworkGatewaysClientUpdateTagsResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkGateway) - if err != nil { - return VirtualNetworkGatewaysClientUpdateTagsResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkGatewaysClientUpdateTagsPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkPeeringsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkPeeringsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkPeeringsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkPeeringsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkPeeringsClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworkPeeringsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworkPeeringsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkPeeringsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkPeering) - if err != nil { - return VirtualNetworkPeeringsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkPeeringsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkPeeringsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkPeeringsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkPeeringsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkPeeringsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkPeeringsClientDeleteResponse will be returned. -func (p *VirtualNetworkPeeringsClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworkPeeringsClientDeleteResponse, error) { - respType := VirtualNetworkPeeringsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkPeeringsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkPeeringsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkTapsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkTapsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkTapsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkTapsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkTapsClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworkTapsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworkTapsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkTapsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetworkTap) - if err != nil { - return VirtualNetworkTapsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkTapsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworkTapsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworkTapsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworkTapsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworkTapsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworkTapsClientDeleteResponse will be returned. -func (p *VirtualNetworkTapsClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworkTapsClientDeleteResponse, error) { - respType := VirtualNetworkTapsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworkTapsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworkTapsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworksClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworksClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworksClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworksClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworksClientCreateOrUpdateResponse will be returned. -func (p *VirtualNetworksClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualNetworksClientCreateOrUpdateResponse, error) { - respType := VirtualNetworksClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualNetwork) - if err != nil { - return VirtualNetworksClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworksClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualNetworksClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualNetworksClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualNetworksClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualNetworksClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualNetworksClientDeleteResponse will be returned. -func (p *VirtualNetworksClientDeletePoller) FinalResponse(ctx context.Context) (VirtualNetworksClientDeleteResponse, error) { - respType := VirtualNetworksClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualNetworksClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualNetworksClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualRouterPeeringsClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualRouterPeeringsClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualRouterPeeringsClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualRouterPeeringsClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualRouterPeeringsClientCreateOrUpdateResponse will be returned. -func (p *VirtualRouterPeeringsClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualRouterPeeringsClientCreateOrUpdateResponse, error) { - respType := VirtualRouterPeeringsClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualRouterPeering) - if err != nil { - return VirtualRouterPeeringsClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualRouterPeeringsClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualRouterPeeringsClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualRouterPeeringsClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualRouterPeeringsClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualRouterPeeringsClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualRouterPeeringsClientDeleteResponse will be returned. -func (p *VirtualRouterPeeringsClientDeletePoller) FinalResponse(ctx context.Context) (VirtualRouterPeeringsClientDeleteResponse, error) { - respType := VirtualRouterPeeringsClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualRouterPeeringsClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualRouterPeeringsClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualRoutersClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualRoutersClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualRoutersClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualRoutersClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualRoutersClientCreateOrUpdateResponse will be returned. -func (p *VirtualRoutersClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualRoutersClientCreateOrUpdateResponse, error) { - respType := VirtualRoutersClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualRouter) - if err != nil { - return VirtualRoutersClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualRoutersClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualRoutersClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualRoutersClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualRoutersClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualRoutersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualRoutersClientDeleteResponse will be returned. -func (p *VirtualRoutersClientDeletePoller) FinalResponse(ctx context.Context) (VirtualRoutersClientDeleteResponse, error) { - respType := VirtualRoutersClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualRoutersClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualRoutersClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualWansClientCreateOrUpdatePoller provides polling facilities until the operation reaches a terminal state. -type VirtualWansClientCreateOrUpdatePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualWansClientCreateOrUpdatePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualWansClientCreateOrUpdatePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualWansClientCreateOrUpdateResponse will be returned. -func (p *VirtualWansClientCreateOrUpdatePoller) FinalResponse(ctx context.Context) (VirtualWansClientCreateOrUpdateResponse, error) { - respType := VirtualWansClientCreateOrUpdateResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VirtualWAN) - if err != nil { - return VirtualWansClientCreateOrUpdateResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualWansClientCreateOrUpdatePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// VirtualWansClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type VirtualWansClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *VirtualWansClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *VirtualWansClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final VirtualWansClientDeleteResponse will be returned. -func (p *VirtualWansClientDeletePoller) FinalResponse(ctx context.Context) (VirtualWansClientDeleteResponse, error) { - respType := VirtualWansClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return VirtualWansClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *VirtualWansClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientCheckConnectivityPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientCheckConnectivityPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientCheckConnectivityPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientCheckConnectivityPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientCheckConnectivityResponse will be returned. -func (p *WatchersClientCheckConnectivityPoller) FinalResponse(ctx context.Context) (WatchersClientCheckConnectivityResponse, error) { - respType := WatchersClientCheckConnectivityResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConnectivityInformation) - if err != nil { - return WatchersClientCheckConnectivityResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientCheckConnectivityPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientDeleteResponse will be returned. -func (p *WatchersClientDeletePoller) FinalResponse(ctx context.Context) (WatchersClientDeleteResponse, error) { - respType := WatchersClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return WatchersClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetAzureReachabilityReportPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetAzureReachabilityReportPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetAzureReachabilityReportPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetAzureReachabilityReportPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetAzureReachabilityReportResponse will be returned. -func (p *WatchersClientGetAzureReachabilityReportPoller) FinalResponse(ctx context.Context) (WatchersClientGetAzureReachabilityReportResponse, error) { - respType := WatchersClientGetAzureReachabilityReportResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.AzureReachabilityReport) - if err != nil { - return WatchersClientGetAzureReachabilityReportResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetAzureReachabilityReportPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetFlowLogStatusPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetFlowLogStatusPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetFlowLogStatusPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetFlowLogStatusPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetFlowLogStatusResponse will be returned. -func (p *WatchersClientGetFlowLogStatusPoller) FinalResponse(ctx context.Context) (WatchersClientGetFlowLogStatusResponse, error) { - respType := WatchersClientGetFlowLogStatusResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.FlowLogInformation) - if err != nil { - return WatchersClientGetFlowLogStatusResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetFlowLogStatusPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetNetworkConfigurationDiagnosticPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetNetworkConfigurationDiagnosticPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetNetworkConfigurationDiagnosticPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetNetworkConfigurationDiagnosticPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetNetworkConfigurationDiagnosticResponse will be returned. -func (p *WatchersClientGetNetworkConfigurationDiagnosticPoller) FinalResponse(ctx context.Context) (WatchersClientGetNetworkConfigurationDiagnosticResponse, error) { - respType := WatchersClientGetNetworkConfigurationDiagnosticResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.ConfigurationDiagnosticResponse) - if err != nil { - return WatchersClientGetNetworkConfigurationDiagnosticResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetNetworkConfigurationDiagnosticPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetNextHopPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetNextHopPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetNextHopPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetNextHopPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetNextHopResponse will be returned. -func (p *WatchersClientGetNextHopPoller) FinalResponse(ctx context.Context) (WatchersClientGetNextHopResponse, error) { - respType := WatchersClientGetNextHopResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.NextHopResult) - if err != nil { - return WatchersClientGetNextHopResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetNextHopPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetTroubleshootingPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetTroubleshootingPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetTroubleshootingPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetTroubleshootingPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetTroubleshootingResponse will be returned. -func (p *WatchersClientGetTroubleshootingPoller) FinalResponse(ctx context.Context) (WatchersClientGetTroubleshootingResponse, error) { - respType := WatchersClientGetTroubleshootingResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.TroubleshootingResult) - if err != nil { - return WatchersClientGetTroubleshootingResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetTroubleshootingPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetTroubleshootingResultPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetTroubleshootingResultPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetTroubleshootingResultPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetTroubleshootingResultPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetTroubleshootingResultResponse will be returned. -func (p *WatchersClientGetTroubleshootingResultPoller) FinalResponse(ctx context.Context) (WatchersClientGetTroubleshootingResultResponse, error) { - respType := WatchersClientGetTroubleshootingResultResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.TroubleshootingResult) - if err != nil { - return WatchersClientGetTroubleshootingResultResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetTroubleshootingResultPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientGetVMSecurityRulesPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientGetVMSecurityRulesPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientGetVMSecurityRulesPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientGetVMSecurityRulesPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientGetVMSecurityRulesResponse will be returned. -func (p *WatchersClientGetVMSecurityRulesPoller) FinalResponse(ctx context.Context) (WatchersClientGetVMSecurityRulesResponse, error) { - respType := WatchersClientGetVMSecurityRulesResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.SecurityGroupViewResult) - if err != nil { - return WatchersClientGetVMSecurityRulesResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientGetVMSecurityRulesPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientListAvailableProvidersPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientListAvailableProvidersPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientListAvailableProvidersPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientListAvailableProvidersPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientListAvailableProvidersResponse will be returned. -func (p *WatchersClientListAvailableProvidersPoller) FinalResponse(ctx context.Context) (WatchersClientListAvailableProvidersResponse, error) { - respType := WatchersClientListAvailableProvidersResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.AvailableProvidersList) - if err != nil { - return WatchersClientListAvailableProvidersResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientListAvailableProvidersPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientSetFlowLogConfigurationPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientSetFlowLogConfigurationPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientSetFlowLogConfigurationPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientSetFlowLogConfigurationPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientSetFlowLogConfigurationResponse will be returned. -func (p *WatchersClientSetFlowLogConfigurationPoller) FinalResponse(ctx context.Context) (WatchersClientSetFlowLogConfigurationResponse, error) { - respType := WatchersClientSetFlowLogConfigurationResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.FlowLogInformation) - if err != nil { - return WatchersClientSetFlowLogConfigurationResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientSetFlowLogConfigurationPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WatchersClientVerifyIPFlowPoller provides polling facilities until the operation reaches a terminal state. -type WatchersClientVerifyIPFlowPoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WatchersClientVerifyIPFlowPoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WatchersClientVerifyIPFlowPoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WatchersClientVerifyIPFlowResponse will be returned. -func (p *WatchersClientVerifyIPFlowPoller) FinalResponse(ctx context.Context) (WatchersClientVerifyIPFlowResponse, error) { - respType := WatchersClientVerifyIPFlowResponse{} - resp, err := p.pt.FinalResponse(ctx, &respType.VerificationIPFlowResult) - if err != nil { - return WatchersClientVerifyIPFlowResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WatchersClientVerifyIPFlowPoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} - -// WebApplicationFirewallPoliciesClientDeletePoller provides polling facilities until the operation reaches a terminal state. -type WebApplicationFirewallPoliciesClientDeletePoller struct { - pt *azcore.Poller -} - -// Done returns true if the LRO has reached a terminal state. -func (p *WebApplicationFirewallPoliciesClientDeletePoller) Done() bool { - return p.pt.Done() -} - -// Poll fetches the latest state of the LRO. It returns an HTTP response or error. -// If the LRO has completed successfully, the poller's state is updated and the HTTP -// response is returned. -// If the LRO has completed with failure or was cancelled, the poller's state is -// updated and the error is returned. -// If the LRO has not reached a terminal state, the poller's state is updated and -// the latest HTTP response is returned. -// If Poll fails, the poller's state is unmodified and the error is returned. -// Calling Poll on an LRO that has reached a terminal state will return the final -// HTTP response or error. -func (p *WebApplicationFirewallPoliciesClientDeletePoller) Poll(ctx context.Context) (*http.Response, error) { - return p.pt.Poll(ctx) -} - -// FinalResponse performs a final GET to the service and returns the final response -// for the polling operation. If there is an error performing the final GET then an error is returned. -// If the final GET succeeded then the final WebApplicationFirewallPoliciesClientDeleteResponse will be returned. -func (p *WebApplicationFirewallPoliciesClientDeletePoller) FinalResponse(ctx context.Context) (WebApplicationFirewallPoliciesClientDeleteResponse, error) { - respType := WebApplicationFirewallPoliciesClientDeleteResponse{} - resp, err := p.pt.FinalResponse(ctx, nil) - if err != nil { - return WebApplicationFirewallPoliciesClientDeleteResponse{}, err - } - respType.RawResponse = resp - return respType, nil -} - -// ResumeToken returns a value representing the poller that can be used to resume -// the LRO at a later time. ResumeTokens are unique per service operation. -func (p *WebApplicationFirewallPoliciesClientDeletePoller) ResumeToken() (string, error) { - return p.pt.ResumeToken() -} diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_polymorphic_helpers.go b/sdk/resourcemanager/network/armnetwork/zz_generated_polymorphic_helpers.go index 8f605ad85e8f..c0461bc7ec9c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_polymorphic_helpers.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_polymorphic_helpers.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go index 1c4e768d9614..5256b851ef69 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privatednszonegroups_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PrivateDNSZoneGroupsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateDNSZoneGroupsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateDNSZoneGroupsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PrivateDNSZoneGroupsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. @@ -58,22 +63,18 @@ func NewPrivateDNSZoneGroupsClient(subscriptionID string, credential azcore.Toke // parameters - Parameters supplied to the create or update private dns zone group operation. // options - PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginCreateOrUpdate // method. -func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) - if err != nil { - return PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse{}, err - } - result := PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateDNSZoneGroupsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &PrivateDNSZoneGroupsClientCreateOrUpdatePoller{ - pt: pt, +func (client *PrivateDNSZoneGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, parameters PrivateDNSZoneGroup, options *PrivateDNSZoneGroupsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PrivateDNSZoneGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateDNSZoneGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a private dns zone group in the specified private endpoint. @@ -130,22 +131,18 @@ func (client *PrivateDNSZoneGroupsClient) createOrUpdateCreateRequest(ctx contex // privateDNSZoneGroupName - The name of the private dns zone group. // options - PrivateDNSZoneGroupsClientBeginDeleteOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.BeginDelete // method. -func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (PrivateDNSZoneGroupsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) - if err != nil { - return PrivateDNSZoneGroupsClientDeletePollerResponse{}, err - } - result := PrivateDNSZoneGroupsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateDNSZoneGroupsClient.Delete", "location", resp, client.pl) - if err != nil { - return PrivateDNSZoneGroupsClientDeletePollerResponse{}, err - } - result.Poller = &PrivateDNSZoneGroupsClientDeletePoller{ - pt: pt, +func (client *PrivateDNSZoneGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, privateDNSZoneGroupName string, options *PrivateDNSZoneGroupsClientBeginDeleteOptions) (*armruntime.Poller[PrivateDNSZoneGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, privateDNSZoneGroupName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateDNSZoneGroupsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateDNSZoneGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified private dns zone group. @@ -249,7 +246,7 @@ func (client *PrivateDNSZoneGroupsClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientGetResponse, error) { - result := PrivateDNSZoneGroupsClientGetResponse{RawResponse: resp} + result := PrivateDNSZoneGroupsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroup); err != nil { return PrivateDNSZoneGroupsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *PrivateDNSZoneGroupsClient) getHandleResponse(resp *http.Response) // resourceGroupName - The name of the resource group. // options - PrivateDNSZoneGroupsClientListOptions contains the optional parameters for the PrivateDNSZoneGroupsClient.List // method. -func (client *PrivateDNSZoneGroupsClient) List(privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) *PrivateDNSZoneGroupsClientListPager { - return &PrivateDNSZoneGroupsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) +func (client *PrivateDNSZoneGroupsClient) List(privateEndpointName string, resourceGroupName string, options *PrivateDNSZoneGroupsClientListOptions) *runtime.Pager[PrivateDNSZoneGroupsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateDNSZoneGroupsClientListResponse]{ + More: func(page PrivateDNSZoneGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateDNSZoneGroupsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateDNSZoneGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateDNSZoneGroupsClientListResponse) (PrivateDNSZoneGroupsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, privateEndpointName, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateDNSZoneGroupsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateDNSZoneGroupsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateDNSZoneGroupsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *PrivateDNSZoneGroupsClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *PrivateDNSZoneGroupsClient) listHandleResponse(resp *http.Response) (PrivateDNSZoneGroupsClientListResponse, error) { - result := PrivateDNSZoneGroupsClientListResponse{RawResponse: resp} + result := PrivateDNSZoneGroupsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateDNSZoneGroupListResult); err != nil { return PrivateDNSZoneGroupsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go index 0edb537eb871..0e583b0fe472 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privateendpoints_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PrivateEndpointsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateEndpointsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PrivateEndpointsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates an private endpoint in the specified resource group. @@ -57,22 +62,18 @@ func NewPrivateEndpointsClient(subscriptionID string, credential azcore.TokenCre // parameters - Parameters supplied to the create or update private endpoint operation. // options - PrivateEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointsClient.BeginCreateOrUpdate // method. -func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (PrivateEndpointsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, parameters, options) - if err != nil { - return PrivateEndpointsClientCreateOrUpdatePollerResponse{}, err - } - result := PrivateEndpointsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *PrivateEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, privateEndpointName string, parameters PrivateEndpoint, options *PrivateEndpointsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PrivateEndpointsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, privateEndpointName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateEndpointsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateEndpointsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PrivateEndpointsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return PrivateEndpointsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &PrivateEndpointsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an private endpoint in the specified resource group. @@ -124,22 +125,18 @@ func (client *PrivateEndpointsClient) createOrUpdateCreateRequest(ctx context.Co // privateEndpointName - The name of the private endpoint. // options - PrivateEndpointsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointsClient.BeginDelete // method. -func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (PrivateEndpointsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, options) - if err != nil { - return PrivateEndpointsClientDeletePollerResponse{}, err - } - result := PrivateEndpointsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateEndpointsClient.Delete", "location", resp, client.pl) - if err != nil { - return PrivateEndpointsClientDeletePollerResponse{}, err +func (client *PrivateEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, privateEndpointName string, options *PrivateEndpointsClientBeginDeleteOptions) (*armruntime.Poller[PrivateEndpointsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, privateEndpointName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateEndpointsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateEndpointsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &PrivateEndpointsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified private endpoint. @@ -236,7 +233,7 @@ func (client *PrivateEndpointsClient) getCreateRequest(ctx context.Context, reso // getHandleResponse handles the Get response. func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (PrivateEndpointsClientGetResponse, error) { - result := PrivateEndpointsClientGetResponse{RawResponse: resp} + result := PrivateEndpointsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpoint); err != nil { return PrivateEndpointsClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *PrivateEndpointsClient) getHandleResponse(resp *http.Response) (Pr // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - PrivateEndpointsClientListOptions contains the optional parameters for the PrivateEndpointsClient.List method. -func (client *PrivateEndpointsClient) List(resourceGroupName string, options *PrivateEndpointsClientListOptions) *PrivateEndpointsClientListPager { - return &PrivateEndpointsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *PrivateEndpointsClient) List(resourceGroupName string, options *PrivateEndpointsClientListOptions) *runtime.Pager[PrivateEndpointsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateEndpointsClientListResponse]{ + More: func(page PrivateEndpointsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateEndpointsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateEndpointListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListResponse) (PrivateEndpointsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateEndpointsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateEndpointsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateEndpointsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *PrivateEndpointsClient) listCreateRequest(ctx context.Context, res // listHandleResponse handles the List response. func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (PrivateEndpointsClientListResponse, error) { - result := PrivateEndpointsClientListResponse{RawResponse: resp} + result := PrivateEndpointsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { return PrivateEndpointsClientListResponse{}, err } @@ -294,16 +307,32 @@ func (client *PrivateEndpointsClient) listHandleResponse(resp *http.Response) (P // If the operation fails it returns an *azcore.ResponseError type. // options - PrivateEndpointsClientListBySubscriptionOptions contains the optional parameters for the PrivateEndpointsClient.ListBySubscription // method. -func (client *PrivateEndpointsClient) ListBySubscription(options *PrivateEndpointsClientListBySubscriptionOptions) *PrivateEndpointsClientListBySubscriptionPager { - return &PrivateEndpointsClientListBySubscriptionPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listBySubscriptionCreateRequest(ctx, options) +func (client *PrivateEndpointsClient) ListBySubscription(options *PrivateEndpointsClientListBySubscriptionOptions) *runtime.Pager[PrivateEndpointsClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateEndpointsClientListBySubscriptionResponse]{ + More: func(page PrivateEndpointsClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateEndpointsClientListBySubscriptionResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateEndpointListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateEndpointsClientListBySubscriptionResponse) (PrivateEndpointsClientListBySubscriptionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBySubscriptionCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateEndpointsClientListBySubscriptionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateEndpointsClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateEndpointsClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) }, - } + }) } // listBySubscriptionCreateRequest creates the ListBySubscription request. @@ -326,7 +355,7 @@ func (client *PrivateEndpointsClient) listBySubscriptionCreateRequest(ctx contex // listBySubscriptionHandleResponse handles the ListBySubscription response. func (client *PrivateEndpointsClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateEndpointsClientListBySubscriptionResponse, error) { - result := PrivateEndpointsClientListBySubscriptionResponse{RawResponse: resp} + result := PrivateEndpointsClientListBySubscriptionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointListResult); err != nil { return PrivateEndpointsClientListBySubscriptionResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go index 6d0228259893..6e766a523fc5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_privatelinkservices_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PrivateLinkServicesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PrivateLinkServicesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkServicesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PrivateLinkServicesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. @@ -56,22 +61,18 @@ func NewPrivateLinkServicesClient(subscriptionID string, credential azcore.Token // parameters - The request body of CheckPrivateLinkService API call. // options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions contains the optional parameters for the // PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibility method. -func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse, error) { - resp, err := client.checkPrivateLinkServiceVisibility(ctx, location, parameters, options) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse{}, err - } - result := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse{ - RawResponse: resp, +func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibility(ctx context.Context, location string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityOptions) (*armruntime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkPrivateLinkServiceVisibility(ctx, location, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility", "location", resp, client.pl) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse{}, err - } - result.Poller = &PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller{ - pt: pt, - } - return result, nil } // CheckPrivateLinkServiceVisibility - Checks whether the subscription is visible to private link service. @@ -121,22 +122,18 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityCreate // parameters - The request body of CheckPrivateLinkService API call. // options - PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions contains the optional parameters // for the PrivateLinkServicesClient.BeginCheckPrivateLinkServiceVisibilityByResourceGroup method. -func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse, error) { - resp, err := client.checkPrivateLinkServiceVisibilityByResourceGroup(ctx, location, resourceGroupName, parameters, options) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse{}, err +func (client *PrivateLinkServicesClient) BeginCheckPrivateLinkServiceVisibilityByResourceGroup(ctx context.Context, location string, resourceGroupName string, parameters CheckPrivateLinkServiceVisibilityRequest, options *PrivateLinkServicesClientBeginCheckPrivateLinkServiceVisibilityByResourceGroupOptions) (*armruntime.Poller[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkPrivateLinkServiceVisibilityByResourceGroup(ctx, location, resourceGroupName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse](options.ResumeToken, client.pl, nil) } - result := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup", "location", resp, client.pl) - if err != nil { - return PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse{}, err - } - result.Poller = &PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller{ - pt: pt, - } - return result, nil } // CheckPrivateLinkServiceVisibilityByResourceGroup - Checks whether the subscription is visible to private link service in @@ -190,22 +187,18 @@ func (client *PrivateLinkServicesClient) checkPrivateLinkServiceVisibilityByReso // parameters - Parameters supplied to the create or update private link service operation. // options - PrivateLinkServicesClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateLinkServicesClient.BeginCreateOrUpdate // method. -func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (PrivateLinkServicesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) - if err != nil { - return PrivateLinkServicesClientCreateOrUpdatePollerResponse{}, err - } - result := PrivateLinkServicesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateLinkServicesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return PrivateLinkServicesClientCreateOrUpdatePollerResponse{}, err +func (client *PrivateLinkServicesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PrivateLinkService, options *PrivateLinkServicesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PrivateLinkServicesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateLinkServicesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateLinkServicesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &PrivateLinkServicesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates an private link service in the specified resource group. @@ -257,22 +250,18 @@ func (client *PrivateLinkServicesClient) createOrUpdateCreateRequest(ctx context // serviceName - The name of the private link service. // options - PrivateLinkServicesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkServicesClient.BeginDelete // method. -func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (PrivateLinkServicesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) - if err != nil { - return PrivateLinkServicesClientDeletePollerResponse{}, err - } - result := PrivateLinkServicesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PrivateLinkServicesClient.Delete", "location", resp, client.pl) - if err != nil { - return PrivateLinkServicesClientDeletePollerResponse{}, err - } - result.Poller = &PrivateLinkServicesClientDeletePoller{ - pt: pt, +func (client *PrivateLinkServicesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceName string, options *PrivateLinkServicesClientBeginDeleteOptions) (*armruntime.Poller[PrivateLinkServicesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateLinkServicesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateLinkServicesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified private link service. @@ -325,22 +314,18 @@ func (client *PrivateLinkServicesClient) deleteCreateRequest(ctx context.Context // peConnectionName - The name of the private end point connection. // options - PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions contains the optional parameters for the // PrivateLinkServicesClient.BeginDeletePrivateEndpointConnection method. -func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse, error) { - resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, serviceName, peConnectionName, options) - if err != nil { - return PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse{}, err - } - result := PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse{ - RawResponse: resp, +func (client *PrivateLinkServicesClient) BeginDeletePrivateEndpointConnection(ctx context.Context, resourceGroupName string, serviceName string, peConnectionName string, options *PrivateLinkServicesClientBeginDeletePrivateEndpointConnectionOptions) (*armruntime.Poller[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deletePrivateEndpointConnection(ctx, resourceGroupName, serviceName, peConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PrivateLinkServicesClient.DeletePrivateEndpointConnection", "location", resp, client.pl) - if err != nil { - return PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse{}, err - } - result.Poller = &PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller{ - pt: pt, - } - return result, nil } // DeletePrivateEndpointConnection - Delete private end point connection for a private link service in a subscription. @@ -441,7 +426,7 @@ func (client *PrivateLinkServicesClient) getCreateRequest(ctx context.Context, r // getHandleResponse handles the Get response. func (client *PrivateLinkServicesClient) getHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetResponse, error) { - result := PrivateLinkServicesClientGetResponse{RawResponse: resp} + result := PrivateLinkServicesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkService); err != nil { return PrivateLinkServicesClientGetResponse{}, err } @@ -506,7 +491,7 @@ func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionCreateReque // getPrivateEndpointConnectionHandleResponse handles the GetPrivateEndpointConnection response. func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientGetPrivateEndpointConnectionResponse, error) { - result := PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{RawResponse: resp} + result := PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { return PrivateLinkServicesClientGetPrivateEndpointConnectionResponse{}, err } @@ -518,16 +503,32 @@ func (client *PrivateLinkServicesClient) getPrivateEndpointConnectionHandleRespo // resourceGroupName - The name of the resource group. // options - PrivateLinkServicesClientListOptions contains the optional parameters for the PrivateLinkServicesClient.List // method. -func (client *PrivateLinkServicesClient) List(resourceGroupName string, options *PrivateLinkServicesClientListOptions) *PrivateLinkServicesClientListPager { - return &PrivateLinkServicesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *PrivateLinkServicesClient) List(resourceGroupName string, options *PrivateLinkServicesClientListOptions) *runtime.Pager[PrivateLinkServicesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateLinkServicesClientListResponse]{ + More: func(page PrivateLinkServicesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateLinkServicesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateLinkServiceListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListResponse) (PrivateLinkServicesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateLinkServicesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateLinkServicesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkServicesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -554,7 +555,7 @@ func (client *PrivateLinkServicesClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *PrivateLinkServicesClient) listHandleResponse(resp *http.Response) (PrivateLinkServicesClientListResponse, error) { - result := PrivateLinkServicesClientListResponse{RawResponse: resp} + result := PrivateLinkServicesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { return PrivateLinkServicesClientListResponse{}, err } @@ -567,16 +568,32 @@ func (client *PrivateLinkServicesClient) listHandleResponse(resp *http.Response) // location - The location of the domain name. // options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions contains the optional parameters for the // PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices method. -func (client *PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager { - return &PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) +func (client *PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServices(location string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse]{ + More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AutoApprovedPrivateLinkServicesResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAutoApprovedPrivateLinkServicesCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, runtime.NewResponseError(resp) + } + return client.listAutoApprovedPrivateLinkServicesHandleResponse(resp) }, - } + }) } // listAutoApprovedPrivateLinkServicesCreateRequest creates the ListAutoApprovedPrivateLinkServices request. @@ -603,7 +620,7 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesCrea // listAutoApprovedPrivateLinkServicesHandleResponse handles the ListAutoApprovedPrivateLinkServices response. func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse, error) { - result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{RawResponse: resp} + result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse{}, err } @@ -617,16 +634,32 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesHand // resourceGroupName - The name of the resource group. // options - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions contains the optional parameters // for the PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup method. -func (client *PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager { - return &PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) +func (client *PrivateLinkServicesClient) ListAutoApprovedPrivateLinkServicesByResourceGroup(location string, resourceGroupName string, options *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupOptions) *runtime.Pager[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse]{ + More: func(page PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AutoApprovedPrivateLinkServicesResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest(ctx, location, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp) }, - } + }) } // listAutoApprovedPrivateLinkServicesByResourceGroupCreateRequest creates the ListAutoApprovedPrivateLinkServicesByResourceGroup request. @@ -657,7 +690,7 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRe // listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse handles the ListAutoApprovedPrivateLinkServicesByResourceGroup response. func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByResourceGroupHandleResponse(resp *http.Response) (PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse, error) { - result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{RawResponse: resp} + result := PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AutoApprovedPrivateLinkServicesResult); err != nil { return PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse{}, err } @@ -668,16 +701,32 @@ func (client *PrivateLinkServicesClient) listAutoApprovedPrivateLinkServicesByRe // If the operation fails it returns an *azcore.ResponseError type. // options - PrivateLinkServicesClientListBySubscriptionOptions contains the optional parameters for the PrivateLinkServicesClient.ListBySubscription // method. -func (client *PrivateLinkServicesClient) ListBySubscription(options *PrivateLinkServicesClientListBySubscriptionOptions) *PrivateLinkServicesClientListBySubscriptionPager { - return &PrivateLinkServicesClientListBySubscriptionPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listBySubscriptionCreateRequest(ctx, options) +func (client *PrivateLinkServicesClient) ListBySubscription(options *PrivateLinkServicesClientListBySubscriptionOptions) *runtime.Pager[PrivateLinkServicesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateLinkServicesClientListBySubscriptionResponse]{ + More: func(page PrivateLinkServicesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateLinkServicesClientListBySubscriptionResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateLinkServiceListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListBySubscriptionResponse) (PrivateLinkServicesClientListBySubscriptionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBySubscriptionCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateLinkServicesClientListBySubscriptionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateLinkServicesClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkServicesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) }, - } + }) } // listBySubscriptionCreateRequest creates the ListBySubscription request. @@ -700,7 +749,7 @@ func (client *PrivateLinkServicesClient) listBySubscriptionCreateRequest(ctx con // listBySubscriptionHandleResponse handles the ListBySubscription response. func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp *http.Response) (PrivateLinkServicesClientListBySubscriptionResponse, error) { - result := PrivateLinkServicesClientListBySubscriptionResponse{RawResponse: resp} + result := PrivateLinkServicesClientListBySubscriptionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateLinkServiceListResult); err != nil { return PrivateLinkServicesClientListBySubscriptionResponse{}, err } @@ -713,16 +762,32 @@ func (client *PrivateLinkServicesClient) listBySubscriptionHandleResponse(resp * // serviceName - The name of the private link service. // options - PrivateLinkServicesClientListPrivateEndpointConnectionsOptions contains the optional parameters for the PrivateLinkServicesClient.ListPrivateEndpointConnections // method. -func (client *PrivateLinkServicesClient) ListPrivateEndpointConnections(resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) *PrivateLinkServicesClientListPrivateEndpointConnectionsPager { - return &PrivateLinkServicesClientListPrivateEndpointConnectionsPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) +func (client *PrivateLinkServicesClient) ListPrivateEndpointConnections(resourceGroupName string, serviceName string, options *PrivateLinkServicesClientListPrivateEndpointConnectionsOptions) *runtime.Pager[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse] { + return runtime.NewPager(runtime.PageProcessor[PrivateLinkServicesClientListPrivateEndpointConnectionsResponse]{ + More: func(page PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PrivateEndpointConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *PrivateLinkServicesClientListPrivateEndpointConnectionsResponse) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listPrivateEndpointConnectionsCreateRequest(ctx, resourceGroupName, serviceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, runtime.NewResponseError(resp) + } + return client.listPrivateEndpointConnectionsHandleResponse(resp) }, - } + }) } // listPrivateEndpointConnectionsCreateRequest creates the ListPrivateEndpointConnections request. @@ -753,7 +818,7 @@ func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsCreateReq // listPrivateEndpointConnectionsHandleResponse handles the ListPrivateEndpointConnections response. func (client *PrivateLinkServicesClient) listPrivateEndpointConnectionsHandleResponse(resp *http.Response) (PrivateLinkServicesClientListPrivateEndpointConnectionsResponse, error) { - result := PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{RawResponse: resp} + result := PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnectionListResult); err != nil { return PrivateLinkServicesClientListPrivateEndpointConnectionsResponse{}, err } @@ -815,7 +880,7 @@ func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionCreateRe // updatePrivateEndpointConnectionHandleResponse handles the UpdatePrivateEndpointConnection response. func (client *PrivateLinkServicesClient) updatePrivateEndpointConnectionHandleResponse(resp *http.Response) (PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse, error) { - result := PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{RawResponse: resp} + result := PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PrivateEndpointConnection); err != nil { return PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go index 74ff9391f680..9687729f8fc5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_profiles_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ProfilesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ProfilesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewProfilesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ProfilesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ProfilesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // CreateOrUpdate - Creates or updates a network profile. @@ -99,7 +104,7 @@ func (client *ProfilesClient) createOrUpdateCreateRequest(ctx context.Context, r // createOrUpdateHandleResponse handles the CreateOrUpdate response. func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) (ProfilesClientCreateOrUpdateResponse, error) { - result := ProfilesClientCreateOrUpdateResponse{RawResponse: resp} + result := ProfilesClientCreateOrUpdateResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { return ProfilesClientCreateOrUpdateResponse{}, err } @@ -111,22 +116,18 @@ func (client *ProfilesClient) createOrUpdateHandleResponse(resp *http.Response) // resourceGroupName - The name of the resource group. // networkProfileName - The name of the NetworkProfile. // options - ProfilesClientBeginDeleteOptions contains the optional parameters for the ProfilesClient.BeginDelete method. -func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (ProfilesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkProfileName, options) - if err != nil { - return ProfilesClientDeletePollerResponse{}, err - } - result := ProfilesClientDeletePollerResponse{ - RawResponse: resp, +func (client *ProfilesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkProfileName string, options *ProfilesClientBeginDeleteOptions) (*armruntime.Poller[ProfilesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkProfileName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ProfilesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ProfilesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ProfilesClient.Delete", "location", resp, client.pl) - if err != nil { - return ProfilesClientDeletePollerResponse{}, err - } - result.Poller = &ProfilesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified network profile. @@ -223,7 +224,7 @@ func (client *ProfilesClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesClientGetResponse, error) { - result := ProfilesClientGetResponse{RawResponse: resp} + result := ProfilesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { return ProfilesClientGetResponse{}, err } @@ -234,16 +235,32 @@ func (client *ProfilesClient) getHandleResponse(resp *http.Response) (ProfilesCl // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - ProfilesClientListOptions contains the optional parameters for the ProfilesClient.List method. -func (client *ProfilesClient) List(resourceGroupName string, options *ProfilesClientListOptions) *ProfilesClientListPager { - return &ProfilesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *ProfilesClient) List(resourceGroupName string, options *ProfilesClientListOptions) *runtime.Pager[ProfilesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ProfilesClientListResponse]{ + More: func(page ProfilesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ProfilesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ProfileListResult.NextLink) + Fetcher: func(ctx context.Context, page *ProfilesClientListResponse) (ProfilesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ProfilesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ProfilesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ProfilesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -270,7 +287,7 @@ func (client *ProfilesClient) listCreateRequest(ctx context.Context, resourceGro // listHandleResponse handles the List response. func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesClientListResponse, error) { - result := ProfilesClientListResponse{RawResponse: resp} + result := ProfilesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { return ProfilesClientListResponse{}, err } @@ -280,16 +297,32 @@ func (client *ProfilesClient) listHandleResponse(resp *http.Response) (ProfilesC // ListAll - Gets all the network profiles in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - ProfilesClientListAllOptions contains the optional parameters for the ProfilesClient.ListAll method. -func (client *ProfilesClient) ListAll(options *ProfilesClientListAllOptions) *ProfilesClientListAllPager { - return &ProfilesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *ProfilesClient) ListAll(options *ProfilesClientListAllOptions) *runtime.Pager[ProfilesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[ProfilesClientListAllResponse]{ + More: func(page ProfilesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ProfilesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ProfileListResult.NextLink) + Fetcher: func(ctx context.Context, page *ProfilesClientListAllResponse) (ProfilesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ProfilesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ProfilesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ProfilesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -312,7 +345,7 @@ func (client *ProfilesClient) listAllCreateRequest(ctx context.Context, options // listAllHandleResponse handles the ListAll response. func (client *ProfilesClient) listAllHandleResponse(resp *http.Response) (ProfilesClientListAllResponse, error) { - result := ProfilesClientListAllResponse{RawResponse: resp} + result := ProfilesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ProfileListResult); err != nil { return ProfilesClientListAllResponse{}, err } @@ -368,7 +401,7 @@ func (client *ProfilesClient) updateTagsCreateRequest(ctx context.Context, resou // updateTagsHandleResponse handles the UpdateTags response. func (client *ProfilesClient) updateTagsHandleResponse(resp *http.Response) (ProfilesClientUpdateTagsResponse, error) { - result := ProfilesClientUpdateTagsResponse{RawResponse: resp} + result := ProfilesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Profile); err != nil { return ProfilesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go index c0026675da7e..345ab9b62cc5 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipaddresses_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PublicIPAddressesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PublicIPAddressesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPAddressesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PublicIPAddressesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a static or dynamic public IP address. @@ -57,22 +62,18 @@ func NewPublicIPAddressesClient(subscriptionID string, credential azcore.TokenCr // parameters - Parameters supplied to the create or update public IP address operation. // options - PublicIPAddressesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPAddressesClient.BeginCreateOrUpdate // method. -func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (PublicIPAddressesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, options) - if err != nil { - return PublicIPAddressesClientCreateOrUpdatePollerResponse{}, err - } - result := PublicIPAddressesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *PublicIPAddressesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, options *PublicIPAddressesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PublicIPAddressesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PublicIPAddressesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[PublicIPAddressesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PublicIPAddressesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return PublicIPAddressesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &PublicIPAddressesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a static or dynamic public IP address. @@ -124,22 +125,18 @@ func (client *PublicIPAddressesClient) createOrUpdateCreateRequest(ctx context.C // publicIPAddressName - The name of the public IP address. // options - PublicIPAddressesClientBeginDeleteOptions contains the optional parameters for the PublicIPAddressesClient.BeginDelete // method. -func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (PublicIPAddressesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPAddressName, options) - if err != nil { - return PublicIPAddressesClientDeletePollerResponse{}, err - } - result := PublicIPAddressesClientDeletePollerResponse{ - RawResponse: resp, +func (client *PublicIPAddressesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPAddressName string, options *PublicIPAddressesClientBeginDeleteOptions) (*armruntime.Poller[PublicIPAddressesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPAddressName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PublicIPAddressesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PublicIPAddressesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PublicIPAddressesClient.Delete", "location", resp, client.pl) - if err != nil { - return PublicIPAddressesClientDeletePollerResponse{}, err - } - result.Poller = &PublicIPAddressesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified public IP address. @@ -236,7 +233,7 @@ func (client *PublicIPAddressesClient) getCreateRequest(ctx context.Context, res // getHandleResponse handles the Get response. func (client *PublicIPAddressesClient) getHandleResponse(resp *http.Response) (PublicIPAddressesClientGetResponse, error) { - result := PublicIPAddressesClientGetResponse{RawResponse: resp} + result := PublicIPAddressesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { return PublicIPAddressesClientGetResponse{}, err } @@ -315,7 +312,7 @@ func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressCreateReque // getCloudServicePublicIPAddressHandleResponse handles the GetCloudServicePublicIPAddress response. func (client *PublicIPAddressesClient) getCloudServicePublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetCloudServicePublicIPAddressResponse, error) { - result := PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{RawResponse: resp} + result := PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { return PublicIPAddressesClientGetCloudServicePublicIPAddressResponse{}, err } @@ -394,7 +391,7 @@ func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressC // getVirtualMachineScaleSetPublicIPAddressHandleResponse handles the GetVirtualMachineScaleSetPublicIPAddress response. func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressHandleResponse(resp *http.Response) (PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse, error) { - result := PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{RawResponse: resp} + result := PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { return PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse{}, err } @@ -405,16 +402,32 @@ func (client *PublicIPAddressesClient) getVirtualMachineScaleSetPublicIPAddressH // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - PublicIPAddressesClientListOptions contains the optional parameters for the PublicIPAddressesClient.List method. -func (client *PublicIPAddressesClient) List(resourceGroupName string, options *PublicIPAddressesClientListOptions) *PublicIPAddressesClientListPager { - return &PublicIPAddressesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *PublicIPAddressesClient) List(resourceGroupName string, options *PublicIPAddressesClientListOptions) *runtime.Pager[PublicIPAddressesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListResponse]{ + More: func(page PublicIPAddressesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListResponse) (PublicIPAddressesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -441,7 +454,7 @@ func (client *PublicIPAddressesClient) listCreateRequest(ctx context.Context, re // listHandleResponse handles the List response. func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) (PublicIPAddressesClientListResponse, error) { - result := PublicIPAddressesClientListResponse{RawResponse: resp} + result := PublicIPAddressesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListResponse{}, err } @@ -452,16 +465,32 @@ func (client *PublicIPAddressesClient) listHandleResponse(resp *http.Response) ( // If the operation fails it returns an *azcore.ResponseError type. // options - PublicIPAddressesClientListAllOptions contains the optional parameters for the PublicIPAddressesClient.ListAll // method. -func (client *PublicIPAddressesClient) ListAll(options *PublicIPAddressesClientListAllOptions) *PublicIPAddressesClientListAllPager { - return &PublicIPAddressesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *PublicIPAddressesClient) ListAll(options *PublicIPAddressesClientListAllOptions) *runtime.Pager[PublicIPAddressesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListAllResponse]{ + More: func(page PublicIPAddressesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListAllResponse) (PublicIPAddressesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -484,7 +513,7 @@ func (client *PublicIPAddressesClient) listAllCreateRequest(ctx context.Context, // listAllHandleResponse handles the ListAll response. func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response) (PublicIPAddressesClientListAllResponse, error) { - result := PublicIPAddressesClientListAllResponse{RawResponse: resp} + result := PublicIPAddressesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListAllResponse{}, err } @@ -497,16 +526,32 @@ func (client *PublicIPAddressesClient) listAllHandleResponse(resp *http.Response // cloudServiceName - The name of the cloud service. // options - PublicIPAddressesClientListCloudServicePublicIPAddressesOptions contains the optional parameters for the PublicIPAddressesClient.ListCloudServicePublicIPAddresses // method. -func (client *PublicIPAddressesClient) ListCloudServicePublicIPAddresses(resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) *PublicIPAddressesClientListCloudServicePublicIPAddressesPager { - return &PublicIPAddressesClientListCloudServicePublicIPAddressesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) +func (client *PublicIPAddressesClient) ListCloudServicePublicIPAddresses(resourceGroupName string, cloudServiceName string, options *PublicIPAddressesClientListCloudServicePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListCloudServicePublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServicePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCloudServicePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, runtime.NewResponseError(resp) + } + return client.listCloudServicePublicIPAddressesHandleResponse(resp) }, - } + }) } // listCloudServicePublicIPAddressesCreateRequest creates the ListCloudServicePublicIPAddresses request. @@ -537,7 +582,7 @@ func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesCreateRe // listCloudServicePublicIPAddressesHandleResponse handles the ListCloudServicePublicIPAddresses response. func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServicePublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{RawResponse: resp} + result := PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListCloudServicePublicIPAddressesResponse{}, err } @@ -554,16 +599,32 @@ func (client *PublicIPAddressesClient) listCloudServicePublicIPAddressesHandleRe // ipConfigurationName - The IP configuration name. // options - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions contains the optional parameters // for the PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses method. -func (client *PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddresses(resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager { - return &PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) +func (client *PublicIPAddressesClient) ListCloudServiceRoleInstancePublicIPAddresses(resourceGroupName string, cloudServiceName string, roleInstanceName string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCloudServiceRoleInstancePublicIPAddressesCreateRequest(ctx, resourceGroupName, cloudServiceName, roleInstanceName, networkInterfaceName, ipConfigurationName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, runtime.NewResponseError(resp) + } + return client.listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp) }, - } + }) } // listCloudServiceRoleInstancePublicIPAddressesCreateRequest creates the ListCloudServiceRoleInstancePublicIPAddresses request. @@ -606,7 +667,7 @@ func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddre // listCloudServiceRoleInstancePublicIPAddressesHandleResponse handles the ListCloudServiceRoleInstancePublicIPAddresses response. func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{RawResponse: resp} + result := PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse{}, err } @@ -620,16 +681,32 @@ func (client *PublicIPAddressesClient) listCloudServiceRoleInstancePublicIPAddre // virtualMachineScaleSetName - The name of the virtual machine scale set. // options - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions contains the optional parameters for // the PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses method. -func (client *PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager { - return &PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) +func (client *PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string, options *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVirtualMachineScaleSetPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, runtime.NewResponseError(resp) + } + return client.listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp) }, - } + }) } // listVirtualMachineScaleSetPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetPublicIPAddresses request. @@ -660,7 +737,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddress // listVirtualMachineScaleSetPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetPublicIPAddresses response. func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{RawResponse: resp} + result := PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse{}, err } @@ -677,16 +754,32 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddress // ipConfigurationName - The IP configuration name. // options - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions contains the optional parameters // for the PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses method. -func (client *PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager { - return &PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) +func (client *PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, ipConfigurationName string, options *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesOptions) *runtime.Pager[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse]{ + More: func(page PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPAddressListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, runtime.NewResponseError(resp) + } + return client.listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp) }, - } + }) } // listVirtualMachineScaleSetVMPublicIPAddressesCreateRequest creates the ListVirtualMachineScaleSetVMPublicIPAddresses request. @@ -729,7 +822,7 @@ func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddre // listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse handles the ListVirtualMachineScaleSetVMPublicIPAddresses response. func (client *PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesHandleResponse(resp *http.Response) (PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse, error) { - result := PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{RawResponse: resp} + result := PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddressListResult); err != nil { return PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse{}, err } @@ -786,7 +879,7 @@ func (client *PublicIPAddressesClient) updateTagsCreateRequest(ctx context.Conte // updateTagsHandleResponse handles the UpdateTags response. func (client *PublicIPAddressesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPAddressesClientUpdateTagsResponse, error) { - result := PublicIPAddressesClientUpdateTagsResponse{RawResponse: resp} + result := PublicIPAddressesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPAddress); err != nil { return PublicIPAddressesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go index add3201a36ec..ad9b3ab3bb7a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_publicipprefixes_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type PublicIPPrefixesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *PublicIPPrefixesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PublicIPPrefixesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &PublicIPPrefixesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a static or dynamic public IP prefix. @@ -57,22 +62,18 @@ func NewPublicIPPrefixesClient(subscriptionID string, credential azcore.TokenCre // parameters - Parameters supplied to the create or update public IP prefix operation. // options - PublicIPPrefixesClientBeginCreateOrUpdateOptions contains the optional parameters for the PublicIPPrefixesClient.BeginCreateOrUpdate // method. -func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (PublicIPPrefixesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPPrefixName, parameters, options) - if err != nil { - return PublicIPPrefixesClientCreateOrUpdatePollerResponse{}, err - } - result := PublicIPPrefixesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *PublicIPPrefixesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix, options *PublicIPPrefixesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[PublicIPPrefixesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, publicIPPrefixName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PublicIPPrefixesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PublicIPPrefixesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("PublicIPPrefixesClient.CreateOrUpdate", "location", resp, client.pl) - if err != nil { - return PublicIPPrefixesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &PublicIPPrefixesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a static or dynamic public IP prefix. @@ -124,22 +125,18 @@ func (client *PublicIPPrefixesClient) createOrUpdateCreateRequest(ctx context.Co // publicIPPrefixName - The name of the PublicIpPrefix. // options - PublicIPPrefixesClientBeginDeleteOptions contains the optional parameters for the PublicIPPrefixesClient.BeginDelete // method. -func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (PublicIPPrefixesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPPrefixName, options) - if err != nil { - return PublicIPPrefixesClientDeletePollerResponse{}, err - } - result := PublicIPPrefixesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("PublicIPPrefixesClient.Delete", "location", resp, client.pl) - if err != nil { - return PublicIPPrefixesClientDeletePollerResponse{}, err +func (client *PublicIPPrefixesClient) BeginDelete(ctx context.Context, resourceGroupName string, publicIPPrefixName string, options *PublicIPPrefixesClientBeginDeleteOptions) (*armruntime.Poller[PublicIPPrefixesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, publicIPPrefixName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[PublicIPPrefixesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[PublicIPPrefixesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &PublicIPPrefixesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified public IP prefix. @@ -236,7 +233,7 @@ func (client *PublicIPPrefixesClient) getCreateRequest(ctx context.Context, reso // getHandleResponse handles the Get response. func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (PublicIPPrefixesClientGetResponse, error) { - result := PublicIPPrefixesClientGetResponse{RawResponse: resp} + result := PublicIPPrefixesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { return PublicIPPrefixesClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *PublicIPPrefixesClient) getHandleResponse(resp *http.Response) (Pu // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - PublicIPPrefixesClientListOptions contains the optional parameters for the PublicIPPrefixesClient.List method. -func (client *PublicIPPrefixesClient) List(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *PublicIPPrefixesClientListPager { - return &PublicIPPrefixesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *PublicIPPrefixesClient) List(resourceGroupName string, options *PublicIPPrefixesClientListOptions) *runtime.Pager[PublicIPPrefixesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPPrefixesClientListResponse]{ + More: func(page PublicIPPrefixesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPPrefixesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPPrefixListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListResponse) (PublicIPPrefixesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPPrefixesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPPrefixesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPPrefixesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *PublicIPPrefixesClient) listCreateRequest(ctx context.Context, res // listHandleResponse handles the List response. func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (PublicIPPrefixesClientListResponse, error) { - result := PublicIPPrefixesClientListResponse{RawResponse: resp} + result := PublicIPPrefixesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { return PublicIPPrefixesClientListResponse{}, err } @@ -294,16 +307,32 @@ func (client *PublicIPPrefixesClient) listHandleResponse(resp *http.Response) (P // If the operation fails it returns an *azcore.ResponseError type. // options - PublicIPPrefixesClientListAllOptions contains the optional parameters for the PublicIPPrefixesClient.ListAll // method. -func (client *PublicIPPrefixesClient) ListAll(options *PublicIPPrefixesClientListAllOptions) *PublicIPPrefixesClientListAllPager { - return &PublicIPPrefixesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *PublicIPPrefixesClient) ListAll(options *PublicIPPrefixesClientListAllOptions) *runtime.Pager[PublicIPPrefixesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[PublicIPPrefixesClientListAllResponse]{ + More: func(page PublicIPPrefixesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp PublicIPPrefixesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.PublicIPPrefixListResult.NextLink) + Fetcher: func(ctx context.Context, page *PublicIPPrefixesClientListAllResponse) (PublicIPPrefixesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return PublicIPPrefixesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return PublicIPPrefixesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return PublicIPPrefixesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -326,7 +355,7 @@ func (client *PublicIPPrefixesClient) listAllCreateRequest(ctx context.Context, // listAllHandleResponse handles the ListAll response. func (client *PublicIPPrefixesClient) listAllHandleResponse(resp *http.Response) (PublicIPPrefixesClientListAllResponse, error) { - result := PublicIPPrefixesClientListAllResponse{RawResponse: resp} + result := PublicIPPrefixesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefixListResult); err != nil { return PublicIPPrefixesClientListAllResponse{}, err } @@ -383,7 +412,7 @@ func (client *PublicIPPrefixesClient) updateTagsCreateRequest(ctx context.Contex // updateTagsHandleResponse handles the UpdateTags response. func (client *PublicIPPrefixesClient) updateTagsHandleResponse(resp *http.Response) (PublicIPPrefixesClientUpdateTagsResponse, error) { - result := PublicIPPrefixesClientUpdateTagsResponse{RawResponse: resp} + result := PublicIPPrefixesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.PublicIPPrefix); err != nil { return PublicIPPrefixesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go index 447be2eefd1d..1685ac79c864 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_resourcenavigationlinks_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ResourceNavigationLinksClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ResourceNavigationLinksClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewResourceNavigationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ResourceNavigationLinksClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ResourceNavigationLinksClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets a list of resource navigation links for a subnet. @@ -104,7 +109,7 @@ func (client *ResourceNavigationLinksClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *ResourceNavigationLinksClient) listHandleResponse(resp *http.Response) (ResourceNavigationLinksClientListResponse, error) { - result := ResourceNavigationLinksClientListResponse{RawResponse: resp} + result := ResourceNavigationLinksClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ResourceNavigationLinksListResult); err != nil { return ResourceNavigationLinksClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go b/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go index d1df03450218..f5f5d754d6b1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_response_types.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -8,15115 +8,2772 @@ package armnetwork -import ( - "context" - armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" - "net/http" - "time" -) - -// ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Delete. -type ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse, error) { - respType := ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse from the provided client and -// resume token. -func (l *ApplicationGatewayPrivateEndpointConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *ApplicationGatewayPrivateEndpointConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewayPrivateEndpointConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewayPrivateEndpointConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} +import "encoding/json" // ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Delete. type ApplicationGatewayPrivateEndpointConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ApplicationGatewayPrivateEndpointConnectionsClientGetResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Get. type ApplicationGatewayPrivateEndpointConnectionsClientGetResponse struct { - ApplicationGatewayPrivateEndpointConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewayPrivateEndpointConnectionsClientGetResult contains the result from method ApplicationGatewayPrivateEndpointConnectionsClient.Get. -type ApplicationGatewayPrivateEndpointConnectionsClientGetResult struct { ApplicationGatewayPrivateEndpointConnection } // ApplicationGatewayPrivateEndpointConnectionsClientListResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.List. type ApplicationGatewayPrivateEndpointConnectionsClientListResponse struct { - ApplicationGatewayPrivateEndpointConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewayPrivateEndpointConnectionsClientListResult contains the result from method ApplicationGatewayPrivateEndpointConnectionsClient.List. -type ApplicationGatewayPrivateEndpointConnectionsClientListResult struct { ApplicationGatewayPrivateEndpointConnectionListResult } -// ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Update. -type ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse, error) { - respType := ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ApplicationGatewayPrivateEndpointConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse from the provided client and -// resume token. -func (l *ApplicationGatewayPrivateEndpointConnectionsClientUpdatePollerResponse) Resume(ctx context.Context, client *ApplicationGatewayPrivateEndpointConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewayPrivateEndpointConnectionsClient.Update", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewayPrivateEndpointConnectionsClientUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse contains the response from method ApplicationGatewayPrivateEndpointConnectionsClient.Update. type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResponse struct { - ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult contains the result from method ApplicationGatewayPrivateEndpointConnectionsClient.Update. -type ApplicationGatewayPrivateEndpointConnectionsClientUpdateResult struct { ApplicationGatewayPrivateEndpointConnection } // ApplicationGatewayPrivateLinkResourcesClientListResponse contains the response from method ApplicationGatewayPrivateLinkResourcesClient.List. type ApplicationGatewayPrivateLinkResourcesClientListResponse struct { - ApplicationGatewayPrivateLinkResourcesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewayPrivateLinkResourcesClientListResult contains the result from method ApplicationGatewayPrivateLinkResourcesClient.List. -type ApplicationGatewayPrivateLinkResourcesClientListResult struct { ApplicationGatewayPrivateLinkResourceListResult } -// ApplicationGatewaysClientBackendHealthOnDemandPollerResponse contains the response from method ApplicationGatewaysClient.BackendHealthOnDemand. -type ApplicationGatewaysClientBackendHealthOnDemandPollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientBackendHealthOnDemandPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientBackendHealthOnDemandPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientBackendHealthOnDemandResponse, error) { - respType := ApplicationGatewaysClientBackendHealthOnDemandResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ApplicationGatewayBackendHealthOnDemand) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientBackendHealthOnDemandPollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientBackendHealthOnDemandPollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.BackendHealthOnDemand", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientBackendHealthOnDemandPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewaysClientBackendHealthOnDemandResponse contains the response from method ApplicationGatewaysClient.BackendHealthOnDemand. type ApplicationGatewaysClientBackendHealthOnDemandResponse struct { - ApplicationGatewaysClientBackendHealthOnDemandResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientBackendHealthOnDemandResult contains the result from method ApplicationGatewaysClient.BackendHealthOnDemand. -type ApplicationGatewaysClientBackendHealthOnDemandResult struct { ApplicationGatewayBackendHealthOnDemand } -// ApplicationGatewaysClientBackendHealthPollerResponse contains the response from method ApplicationGatewaysClient.BackendHealth. -type ApplicationGatewaysClientBackendHealthPollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientBackendHealthPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientBackendHealthPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientBackendHealthResponse, error) { - respType := ApplicationGatewaysClientBackendHealthResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ApplicationGatewayBackendHealth) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientBackendHealthPollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientBackendHealthPollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.BackendHealth", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientBackendHealthPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewaysClientBackendHealthResponse contains the response from method ApplicationGatewaysClient.BackendHealth. type ApplicationGatewaysClientBackendHealthResponse struct { - ApplicationGatewaysClientBackendHealthResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientBackendHealthResult contains the result from method ApplicationGatewaysClient.BackendHealth. -type ApplicationGatewaysClientBackendHealthResult struct { ApplicationGatewayBackendHealth } -// ApplicationGatewaysClientCreateOrUpdatePollerResponse contains the response from method ApplicationGatewaysClient.CreateOrUpdate. -type ApplicationGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientCreateOrUpdateResponse, error) { - respType := ApplicationGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ApplicationGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewaysClientCreateOrUpdateResponse contains the response from method ApplicationGatewaysClient.CreateOrUpdate. type ApplicationGatewaysClientCreateOrUpdateResponse struct { - ApplicationGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientCreateOrUpdateResult contains the result from method ApplicationGatewaysClient.CreateOrUpdate. -type ApplicationGatewaysClientCreateOrUpdateResult struct { ApplicationGateway } -// ApplicationGatewaysClientDeletePollerResponse contains the response from method ApplicationGatewaysClient.Delete. -type ApplicationGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientDeleteResponse, error) { - respType := ApplicationGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewaysClientDeleteResponse contains the response from method ApplicationGatewaysClient.Delete. type ApplicationGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ApplicationGatewaysClientGetResponse contains the response from method ApplicationGatewaysClient.Get. type ApplicationGatewaysClientGetResponse struct { - ApplicationGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientGetResult contains the result from method ApplicationGatewaysClient.Get. -type ApplicationGatewaysClientGetResult struct { ApplicationGateway } // ApplicationGatewaysClientGetSSLPredefinedPolicyResponse contains the response from method ApplicationGatewaysClient.GetSSLPredefinedPolicy. type ApplicationGatewaysClientGetSSLPredefinedPolicyResponse struct { - ApplicationGatewaysClientGetSSLPredefinedPolicyResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientGetSSLPredefinedPolicyResult contains the result from method ApplicationGatewaysClient.GetSSLPredefinedPolicy. -type ApplicationGatewaysClientGetSSLPredefinedPolicyResult struct { ApplicationGatewaySSLPredefinedPolicy } // ApplicationGatewaysClientListAllResponse contains the response from method ApplicationGatewaysClient.ListAll. type ApplicationGatewaysClientListAllResponse struct { - ApplicationGatewaysClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAllResult contains the result from method ApplicationGatewaysClient.ListAll. -type ApplicationGatewaysClientListAllResult struct { ApplicationGatewayListResult } // ApplicationGatewaysClientListAvailableRequestHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableRequestHeaders. type ApplicationGatewaysClientListAvailableRequestHeadersResponse struct { - ApplicationGatewaysClientListAvailableRequestHeadersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableRequestHeadersResult contains the result from method ApplicationGatewaysClient.ListAvailableRequestHeaders. -type ApplicationGatewaysClientListAvailableRequestHeadersResult struct { // Response for ApplicationGatewayAvailableRequestHeaders API service call. StringArray []*string } // ApplicationGatewaysClientListAvailableResponseHeadersResponse contains the response from method ApplicationGatewaysClient.ListAvailableResponseHeaders. type ApplicationGatewaysClientListAvailableResponseHeadersResponse struct { - ApplicationGatewaysClientListAvailableResponseHeadersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableResponseHeadersResult contains the result from method ApplicationGatewaysClient.ListAvailableResponseHeaders. -type ApplicationGatewaysClientListAvailableResponseHeadersResult struct { // Response for ApplicationGatewayAvailableResponseHeaders API service call. StringArray []*string } // ApplicationGatewaysClientListAvailableSSLOptionsResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLOptions. type ApplicationGatewaysClientListAvailableSSLOptionsResponse struct { - ApplicationGatewaysClientListAvailableSSLOptionsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableSSLOptionsResult contains the result from method ApplicationGatewaysClient.ListAvailableSSLOptions. -type ApplicationGatewaysClientListAvailableSSLOptionsResult struct { ApplicationGatewayAvailableSSLOptions } // ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse contains the response from method ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies. type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResponse struct { - ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResult contains the result from method ApplicationGatewaysClient.ListAvailableSSLPredefinedPolicies. -type ApplicationGatewaysClientListAvailableSSLPredefinedPoliciesResult struct { ApplicationGatewayAvailableSSLPredefinedPolicies } // ApplicationGatewaysClientListAvailableServerVariablesResponse contains the response from method ApplicationGatewaysClient.ListAvailableServerVariables. type ApplicationGatewaysClientListAvailableServerVariablesResponse struct { - ApplicationGatewaysClientListAvailableServerVariablesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableServerVariablesResult contains the result from method ApplicationGatewaysClient.ListAvailableServerVariables. -type ApplicationGatewaysClientListAvailableServerVariablesResult struct { // Response for ApplicationGatewayAvailableServerVariables API service call. StringArray []*string } // ApplicationGatewaysClientListAvailableWafRuleSetsResponse contains the response from method ApplicationGatewaysClient.ListAvailableWafRuleSets. type ApplicationGatewaysClientListAvailableWafRuleSetsResponse struct { - ApplicationGatewaysClientListAvailableWafRuleSetsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListAvailableWafRuleSetsResult contains the result from method ApplicationGatewaysClient.ListAvailableWafRuleSets. -type ApplicationGatewaysClientListAvailableWafRuleSetsResult struct { ApplicationGatewayAvailableWafRuleSetsResult } // ApplicationGatewaysClientListResponse contains the response from method ApplicationGatewaysClient.List. type ApplicationGatewaysClientListResponse struct { - ApplicationGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientListResult contains the result from method ApplicationGatewaysClient.List. -type ApplicationGatewaysClientListResult struct { ApplicationGatewayListResult } -// ApplicationGatewaysClientStartPollerResponse contains the response from method ApplicationGatewaysClient.Start. -type ApplicationGatewaysClientStartPollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientStartPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientStartPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientStartResponse, error) { - respType := ApplicationGatewaysClientStartResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientStartPollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientStartPollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.Start", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientStartPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationGatewaysClientStartResponse contains the response from method ApplicationGatewaysClient.Start. type ApplicationGatewaysClientStartResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientStopPollerResponse contains the response from method ApplicationGatewaysClient.Stop. -type ApplicationGatewaysClientStopPollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationGatewaysClientStopPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationGatewaysClientStopPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationGatewaysClientStopResponse, error) { - respType := ApplicationGatewaysClientStopResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationGatewaysClientStopPollerResponse from the provided client and resume token. -func (l *ApplicationGatewaysClientStopPollerResponse) Resume(ctx context.Context, client *ApplicationGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationGatewaysClient.Stop", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationGatewaysClientStopPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // ApplicationGatewaysClientStopResponse contains the response from method ApplicationGatewaysClient.Stop. type ApplicationGatewaysClientStopResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ApplicationGatewaysClientUpdateTagsResponse contains the response from method ApplicationGatewaysClient.UpdateTags. type ApplicationGatewaysClientUpdateTagsResponse struct { - ApplicationGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationGatewaysClientUpdateTagsResult contains the result from method ApplicationGatewaysClient.UpdateTags. -type ApplicationGatewaysClientUpdateTagsResult struct { ApplicationGateway } -// ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse contains the response from method ApplicationSecurityGroupsClient.CreateOrUpdate. -type ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationSecurityGroupsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationSecurityGroupsClientCreateOrUpdateResponse, error) { - respType := ApplicationSecurityGroupsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ApplicationSecurityGroup) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ApplicationSecurityGroupsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ApplicationSecurityGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationSecurityGroupsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationSecurityGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationSecurityGroupsClientCreateOrUpdateResponse contains the response from method ApplicationSecurityGroupsClient.CreateOrUpdate. type ApplicationSecurityGroupsClientCreateOrUpdateResponse struct { - ApplicationSecurityGroupsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationSecurityGroupsClientCreateOrUpdateResult contains the result from method ApplicationSecurityGroupsClient.CreateOrUpdate. -type ApplicationSecurityGroupsClientCreateOrUpdateResult struct { ApplicationSecurityGroup } -// ApplicationSecurityGroupsClientDeletePollerResponse contains the response from method ApplicationSecurityGroupsClient.Delete. -type ApplicationSecurityGroupsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ApplicationSecurityGroupsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ApplicationSecurityGroupsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ApplicationSecurityGroupsClientDeleteResponse, error) { - respType := ApplicationSecurityGroupsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ApplicationSecurityGroupsClientDeletePollerResponse from the provided client and resume token. -func (l *ApplicationSecurityGroupsClientDeletePollerResponse) Resume(ctx context.Context, client *ApplicationSecurityGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ApplicationSecurityGroupsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ApplicationSecurityGroupsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ApplicationSecurityGroupsClientDeleteResponse contains the response from method ApplicationSecurityGroupsClient.Delete. type ApplicationSecurityGroupsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ApplicationSecurityGroupsClientGetResponse contains the response from method ApplicationSecurityGroupsClient.Get. type ApplicationSecurityGroupsClientGetResponse struct { - ApplicationSecurityGroupsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationSecurityGroupsClientGetResult contains the result from method ApplicationSecurityGroupsClient.Get. -type ApplicationSecurityGroupsClientGetResult struct { ApplicationSecurityGroup } // ApplicationSecurityGroupsClientListAllResponse contains the response from method ApplicationSecurityGroupsClient.ListAll. type ApplicationSecurityGroupsClientListAllResponse struct { - ApplicationSecurityGroupsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationSecurityGroupsClientListAllResult contains the result from method ApplicationSecurityGroupsClient.ListAll. -type ApplicationSecurityGroupsClientListAllResult struct { ApplicationSecurityGroupListResult } // ApplicationSecurityGroupsClientListResponse contains the response from method ApplicationSecurityGroupsClient.List. type ApplicationSecurityGroupsClientListResponse struct { - ApplicationSecurityGroupsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationSecurityGroupsClientListResult contains the result from method ApplicationSecurityGroupsClient.List. -type ApplicationSecurityGroupsClientListResult struct { ApplicationSecurityGroupListResult } // ApplicationSecurityGroupsClientUpdateTagsResponse contains the response from method ApplicationSecurityGroupsClient.UpdateTags. type ApplicationSecurityGroupsClientUpdateTagsResponse struct { - ApplicationSecurityGroupsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ApplicationSecurityGroupsClientUpdateTagsResult contains the result from method ApplicationSecurityGroupsClient.UpdateTags. -type ApplicationSecurityGroupsClientUpdateTagsResult struct { ApplicationSecurityGroup } // AvailableDelegationsClientListResponse contains the response from method AvailableDelegationsClient.List. type AvailableDelegationsClientListResponse struct { - AvailableDelegationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailableDelegationsClientListResult contains the result from method AvailableDelegationsClient.List. -type AvailableDelegationsClientListResult struct { AvailableDelegationsResult } // AvailableEndpointServicesClientListResponse contains the response from method AvailableEndpointServicesClient.List. type AvailableEndpointServicesClientListResponse struct { - AvailableEndpointServicesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailableEndpointServicesClientListResult contains the result from method AvailableEndpointServicesClient.List. -type AvailableEndpointServicesClientListResult struct { EndpointServicesListResult } // AvailablePrivateEndpointTypesClientListByResourceGroupResponse contains the response from method AvailablePrivateEndpointTypesClient.ListByResourceGroup. type AvailablePrivateEndpointTypesClientListByResourceGroupResponse struct { - AvailablePrivateEndpointTypesClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailablePrivateEndpointTypesClientListByResourceGroupResult contains the result from method AvailablePrivateEndpointTypesClient.ListByResourceGroup. -type AvailablePrivateEndpointTypesClientListByResourceGroupResult struct { AvailablePrivateEndpointTypesResult } // AvailablePrivateEndpointTypesClientListResponse contains the response from method AvailablePrivateEndpointTypesClient.List. type AvailablePrivateEndpointTypesClientListResponse struct { - AvailablePrivateEndpointTypesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailablePrivateEndpointTypesClientListResult contains the result from method AvailablePrivateEndpointTypesClient.List. -type AvailablePrivateEndpointTypesClientListResult struct { AvailablePrivateEndpointTypesResult } // AvailableResourceGroupDelegationsClientListResponse contains the response from method AvailableResourceGroupDelegationsClient.List. type AvailableResourceGroupDelegationsClientListResponse struct { - AvailableResourceGroupDelegationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailableResourceGroupDelegationsClientListResult contains the result from method AvailableResourceGroupDelegationsClient.List. -type AvailableResourceGroupDelegationsClientListResult struct { AvailableDelegationsResult } // AvailableServiceAliasesClientListByResourceGroupResponse contains the response from method AvailableServiceAliasesClient.ListByResourceGroup. type AvailableServiceAliasesClientListByResourceGroupResponse struct { - AvailableServiceAliasesClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailableServiceAliasesClientListByResourceGroupResult contains the result from method AvailableServiceAliasesClient.ListByResourceGroup. -type AvailableServiceAliasesClientListByResourceGroupResult struct { AvailableServiceAliasesResult } // AvailableServiceAliasesClientListResponse contains the response from method AvailableServiceAliasesClient.List. type AvailableServiceAliasesClientListResponse struct { - AvailableServiceAliasesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AvailableServiceAliasesClientListResult contains the result from method AvailableServiceAliasesClient.List. -type AvailableServiceAliasesClientListResult struct { AvailableServiceAliasesResult } // AzureFirewallFqdnTagsClientListAllResponse contains the response from method AzureFirewallFqdnTagsClient.ListAll. type AzureFirewallFqdnTagsClientListAllResponse struct { - AzureFirewallFqdnTagsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallFqdnTagsClientListAllResult contains the result from method AzureFirewallFqdnTagsClient.ListAll. -type AzureFirewallFqdnTagsClientListAllResult struct { AzureFirewallFqdnTagListResult } -// AzureFirewallsClientCreateOrUpdatePollerResponse contains the response from method AzureFirewallsClient.CreateOrUpdate. -type AzureFirewallsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *AzureFirewallsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l AzureFirewallsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AzureFirewallsClientCreateOrUpdateResponse, error) { - respType := AzureFirewallsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AzureFirewall) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a AzureFirewallsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *AzureFirewallsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *AzureFirewallsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("AzureFirewallsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &AzureFirewallsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // AzureFirewallsClientCreateOrUpdateResponse contains the response from method AzureFirewallsClient.CreateOrUpdate. type AzureFirewallsClientCreateOrUpdateResponse struct { - AzureFirewallsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallsClientCreateOrUpdateResult contains the result from method AzureFirewallsClient.CreateOrUpdate. -type AzureFirewallsClientCreateOrUpdateResult struct { AzureFirewall } -// AzureFirewallsClientDeletePollerResponse contains the response from method AzureFirewallsClient.Delete. -type AzureFirewallsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *AzureFirewallsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l AzureFirewallsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AzureFirewallsClientDeleteResponse, error) { - respType := AzureFirewallsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a AzureFirewallsClientDeletePollerResponse from the provided client and resume token. -func (l *AzureFirewallsClientDeletePollerResponse) Resume(ctx context.Context, client *AzureFirewallsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("AzureFirewallsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &AzureFirewallsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // AzureFirewallsClientDeleteResponse contains the response from method AzureFirewallsClient.Delete. type AzureFirewallsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // AzureFirewallsClientGetResponse contains the response from method AzureFirewallsClient.Get. type AzureFirewallsClientGetResponse struct { - AzureFirewallsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallsClientGetResult contains the result from method AzureFirewallsClient.Get. -type AzureFirewallsClientGetResult struct { AzureFirewall } // AzureFirewallsClientListAllResponse contains the response from method AzureFirewallsClient.ListAll. type AzureFirewallsClientListAllResponse struct { - AzureFirewallsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallsClientListAllResult contains the result from method AzureFirewallsClient.ListAll. -type AzureFirewallsClientListAllResult struct { AzureFirewallListResult } // AzureFirewallsClientListResponse contains the response from method AzureFirewallsClient.List. type AzureFirewallsClientListResponse struct { - AzureFirewallsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallsClientListResult contains the result from method AzureFirewallsClient.List. -type AzureFirewallsClientListResult struct { AzureFirewallListResult } -// AzureFirewallsClientUpdateTagsPollerResponse contains the response from method AzureFirewallsClient.UpdateTags. -type AzureFirewallsClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *AzureFirewallsClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l AzureFirewallsClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (AzureFirewallsClientUpdateTagsResponse, error) { - respType := AzureFirewallsClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AzureFirewall) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a AzureFirewallsClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *AzureFirewallsClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *AzureFirewallsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("AzureFirewallsClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &AzureFirewallsClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // AzureFirewallsClientUpdateTagsResponse contains the response from method AzureFirewallsClient.UpdateTags. type AzureFirewallsClientUpdateTagsResponse struct { - AzureFirewallsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// AzureFirewallsClientUpdateTagsResult contains the result from method AzureFirewallsClient.UpdateTags. -type AzureFirewallsClientUpdateTagsResult struct { AzureFirewall } -// BastionHostsClientCreateOrUpdatePollerResponse contains the response from method BastionHostsClient.CreateOrUpdate. -type BastionHostsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *BastionHostsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l BastionHostsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BastionHostsClientCreateOrUpdateResponse, error) { - respType := BastionHostsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BastionHost) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a BastionHostsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *BastionHostsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *BastionHostsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("BastionHostsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &BastionHostsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // BastionHostsClientCreateOrUpdateResponse contains the response from method BastionHostsClient.CreateOrUpdate. type BastionHostsClientCreateOrUpdateResponse struct { - BastionHostsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BastionHostsClientCreateOrUpdateResult contains the result from method BastionHostsClient.CreateOrUpdate. -type BastionHostsClientCreateOrUpdateResult struct { BastionHost } -// BastionHostsClientDeletePollerResponse contains the response from method BastionHostsClient.Delete. -type BastionHostsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *BastionHostsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l BastionHostsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BastionHostsClientDeleteResponse, error) { - respType := BastionHostsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a BastionHostsClientDeletePollerResponse from the provided client and resume token. -func (l *BastionHostsClientDeletePollerResponse) Resume(ctx context.Context, client *BastionHostsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("BastionHostsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &BastionHostsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // BastionHostsClientDeleteResponse contains the response from method BastionHostsClient.Delete. type BastionHostsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // BastionHostsClientGetResponse contains the response from method BastionHostsClient.Get. type BastionHostsClientGetResponse struct { - BastionHostsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BastionHostsClientGetResult contains the result from method BastionHostsClient.Get. -type BastionHostsClientGetResult struct { BastionHost } // BastionHostsClientListByResourceGroupResponse contains the response from method BastionHostsClient.ListByResourceGroup. type BastionHostsClientListByResourceGroupResponse struct { - BastionHostsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BastionHostsClientListByResourceGroupResult contains the result from method BastionHostsClient.ListByResourceGroup. -type BastionHostsClientListByResourceGroupResult struct { BastionHostListResult } // BastionHostsClientListResponse contains the response from method BastionHostsClient.List. type BastionHostsClientListResponse struct { - BastionHostsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BastionHostsClientListResult contains the result from method BastionHostsClient.List. -type BastionHostsClientListResult struct { BastionHostListResult } -// BastionHostsClientUpdateTagsPollerResponse contains the response from method BastionHostsClient.UpdateTags. -type BastionHostsClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *BastionHostsClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l BastionHostsClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (BastionHostsClientUpdateTagsResponse, error) { - respType := BastionHostsClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BastionHost) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a BastionHostsClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *BastionHostsClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *BastionHostsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("BastionHostsClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &BastionHostsClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // BastionHostsClientUpdateTagsResponse contains the response from method BastionHostsClient.UpdateTags. type BastionHostsClientUpdateTagsResponse struct { - BastionHostsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BastionHostsClientUpdateTagsResult contains the result from method BastionHostsClient.UpdateTags. -type BastionHostsClientUpdateTagsResult struct { BastionHost } // BgpServiceCommunitiesClientListResponse contains the response from method BgpServiceCommunitiesClient.List. type BgpServiceCommunitiesClientListResponse struct { - BgpServiceCommunitiesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// BgpServiceCommunitiesClientListResult contains the result from method BgpServiceCommunitiesClient.List. -type BgpServiceCommunitiesClientListResult struct { BgpServiceCommunityListResult } -// ConnectionMonitorsClientCreateOrUpdatePollerResponse contains the response from method ConnectionMonitorsClient.CreateOrUpdate. -type ConnectionMonitorsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ConnectionMonitorsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ConnectionMonitorsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorsClientCreateOrUpdateResponse, error) { - respType := ConnectionMonitorsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConnectionMonitorResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ConnectionMonitorsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ConnectionMonitorsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ConnectionMonitorsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ConnectionMonitorsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ConnectionMonitorsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ConnectionMonitorsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorsClient.CreateOrUpdate. type ConnectionMonitorsClientCreateOrUpdateResponse struct { - ConnectionMonitorsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientCreateOrUpdateResult contains the result from method ConnectionMonitorsClient.CreateOrUpdate. -type ConnectionMonitorsClientCreateOrUpdateResult struct { ConnectionMonitorResult } -// ConnectionMonitorsClientDeletePollerResponse contains the response from method ConnectionMonitorsClient.Delete. -type ConnectionMonitorsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ConnectionMonitorsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ConnectionMonitorsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorsClientDeleteResponse, error) { - respType := ConnectionMonitorsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ConnectionMonitorsClientDeletePollerResponse from the provided client and resume token. -func (l *ConnectionMonitorsClientDeletePollerResponse) Resume(ctx context.Context, client *ConnectionMonitorsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ConnectionMonitorsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ConnectionMonitorsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ConnectionMonitorsClientDeleteResponse contains the response from method ConnectionMonitorsClient.Delete. type ConnectionMonitorsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ConnectionMonitorsClientGetResponse contains the response from method ConnectionMonitorsClient.Get. type ConnectionMonitorsClientGetResponse struct { - ConnectionMonitorsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientGetResult contains the result from method ConnectionMonitorsClient.Get. -type ConnectionMonitorsClientGetResult struct { ConnectionMonitorResult } // ConnectionMonitorsClientListResponse contains the response from method ConnectionMonitorsClient.List. type ConnectionMonitorsClientListResponse struct { - ConnectionMonitorsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientListResult contains the result from method ConnectionMonitorsClient.List. -type ConnectionMonitorsClientListResult struct { ConnectionMonitorListResult } -// ConnectionMonitorsClientQueryPollerResponse contains the response from method ConnectionMonitorsClient.Query. -type ConnectionMonitorsClientQueryPollerResponse struct { - // Poller contains an initialized poller. - Poller *ConnectionMonitorsClientQueryPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ConnectionMonitorsClientQueryPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorsClientQueryResponse, error) { - respType := ConnectionMonitorsClientQueryResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConnectionMonitorQueryResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ConnectionMonitorsClientQueryPollerResponse from the provided client and resume token. -func (l *ConnectionMonitorsClientQueryPollerResponse) Resume(ctx context.Context, client *ConnectionMonitorsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ConnectionMonitorsClient.Query", token, client.pl) - if err != nil { - return err - } - poller := &ConnectionMonitorsClientQueryPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ConnectionMonitorsClientQueryResponse contains the response from method ConnectionMonitorsClient.Query. type ConnectionMonitorsClientQueryResponse struct { - ConnectionMonitorsClientQueryResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientQueryResult contains the result from method ConnectionMonitorsClient.Query. -type ConnectionMonitorsClientQueryResult struct { ConnectionMonitorQueryResult } -// ConnectionMonitorsClientStartPollerResponse contains the response from method ConnectionMonitorsClient.Start. -type ConnectionMonitorsClientStartPollerResponse struct { - // Poller contains an initialized poller. - Poller *ConnectionMonitorsClientStartPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ConnectionMonitorsClientStartPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorsClientStartResponse, error) { - respType := ConnectionMonitorsClientStartResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ConnectionMonitorsClientStartPollerResponse from the provided client and resume token. -func (l *ConnectionMonitorsClientStartPollerResponse) Resume(ctx context.Context, client *ConnectionMonitorsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ConnectionMonitorsClient.Start", token, client.pl) - if err != nil { - return err - } - poller := &ConnectionMonitorsClientStartPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ConnectionMonitorsClientStartResponse contains the response from method ConnectionMonitorsClient.Start. type ConnectionMonitorsClientStartResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientStopPollerResponse contains the response from method ConnectionMonitorsClient.Stop. -type ConnectionMonitorsClientStopPollerResponse struct { - // Poller contains an initialized poller. - Poller *ConnectionMonitorsClientStopPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ConnectionMonitorsClientStopPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ConnectionMonitorsClientStopResponse, error) { - respType := ConnectionMonitorsClientStopResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ConnectionMonitorsClientStopPollerResponse from the provided client and resume token. -func (l *ConnectionMonitorsClientStopPollerResponse) Resume(ctx context.Context, client *ConnectionMonitorsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ConnectionMonitorsClient.Stop", token, client.pl) - if err != nil { - return err - } - poller := &ConnectionMonitorsClientStopPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // ConnectionMonitorsClientStopResponse contains the response from method ConnectionMonitorsClient.Stop. type ConnectionMonitorsClientStopResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ConnectionMonitorsClientUpdateTagsResponse contains the response from method ConnectionMonitorsClient.UpdateTags. type ConnectionMonitorsClientUpdateTagsResponse struct { - ConnectionMonitorsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ConnectionMonitorsClientUpdateTagsResult contains the result from method ConnectionMonitorsClient.UpdateTags. -type ConnectionMonitorsClientUpdateTagsResult struct { ConnectionMonitorResult } -// CustomIPPrefixesClientCreateOrUpdatePollerResponse contains the response from method CustomIPPrefixesClient.CreateOrUpdate. -type CustomIPPrefixesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *CustomIPPrefixesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l CustomIPPrefixesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (CustomIPPrefixesClientCreateOrUpdateResponse, error) { - respType := CustomIPPrefixesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.CustomIPPrefix) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a CustomIPPrefixesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *CustomIPPrefixesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *CustomIPPrefixesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("CustomIPPrefixesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &CustomIPPrefixesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // CustomIPPrefixesClientCreateOrUpdateResponse contains the response from method CustomIPPrefixesClient.CreateOrUpdate. type CustomIPPrefixesClientCreateOrUpdateResponse struct { - CustomIPPrefixesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// CustomIPPrefixesClientCreateOrUpdateResult contains the result from method CustomIPPrefixesClient.CreateOrUpdate. -type CustomIPPrefixesClientCreateOrUpdateResult struct { CustomIPPrefix } -// CustomIPPrefixesClientDeletePollerResponse contains the response from method CustomIPPrefixesClient.Delete. -type CustomIPPrefixesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *CustomIPPrefixesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l CustomIPPrefixesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (CustomIPPrefixesClientDeleteResponse, error) { - respType := CustomIPPrefixesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a CustomIPPrefixesClientDeletePollerResponse from the provided client and resume token. -func (l *CustomIPPrefixesClientDeletePollerResponse) Resume(ctx context.Context, client *CustomIPPrefixesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("CustomIPPrefixesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &CustomIPPrefixesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // CustomIPPrefixesClientDeleteResponse contains the response from method CustomIPPrefixesClient.Delete. type CustomIPPrefixesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // CustomIPPrefixesClientGetResponse contains the response from method CustomIPPrefixesClient.Get. type CustomIPPrefixesClientGetResponse struct { - CustomIPPrefixesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// CustomIPPrefixesClientGetResult contains the result from method CustomIPPrefixesClient.Get. -type CustomIPPrefixesClientGetResult struct { CustomIPPrefix } // CustomIPPrefixesClientListAllResponse contains the response from method CustomIPPrefixesClient.ListAll. type CustomIPPrefixesClientListAllResponse struct { - CustomIPPrefixesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// CustomIPPrefixesClientListAllResult contains the result from method CustomIPPrefixesClient.ListAll. -type CustomIPPrefixesClientListAllResult struct { CustomIPPrefixListResult } // CustomIPPrefixesClientListResponse contains the response from method CustomIPPrefixesClient.List. type CustomIPPrefixesClientListResponse struct { - CustomIPPrefixesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// CustomIPPrefixesClientListResult contains the result from method CustomIPPrefixesClient.List. -type CustomIPPrefixesClientListResult struct { CustomIPPrefixListResult } // CustomIPPrefixesClientUpdateTagsResponse contains the response from method CustomIPPrefixesClient.UpdateTags. type CustomIPPrefixesClientUpdateTagsResponse struct { - CustomIPPrefixesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// CustomIPPrefixesClientUpdateTagsResult contains the result from method CustomIPPrefixesClient.UpdateTags. -type CustomIPPrefixesClientUpdateTagsResult struct { CustomIPPrefix } -// DdosCustomPoliciesClientCreateOrUpdatePollerResponse contains the response from method DdosCustomPoliciesClient.CreateOrUpdate. -type DdosCustomPoliciesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *DdosCustomPoliciesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DdosCustomPoliciesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DdosCustomPoliciesClientCreateOrUpdateResponse, error) { - respType := DdosCustomPoliciesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.DdosCustomPolicy) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DdosCustomPoliciesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *DdosCustomPoliciesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *DdosCustomPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DdosCustomPoliciesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &DdosCustomPoliciesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DdosCustomPoliciesClientCreateOrUpdateResponse contains the response from method DdosCustomPoliciesClient.CreateOrUpdate. type DdosCustomPoliciesClientCreateOrUpdateResponse struct { - DdosCustomPoliciesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosCustomPoliciesClientCreateOrUpdateResult contains the result from method DdosCustomPoliciesClient.CreateOrUpdate. -type DdosCustomPoliciesClientCreateOrUpdateResult struct { DdosCustomPolicy } -// DdosCustomPoliciesClientDeletePollerResponse contains the response from method DdosCustomPoliciesClient.Delete. -type DdosCustomPoliciesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *DdosCustomPoliciesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DdosCustomPoliciesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DdosCustomPoliciesClientDeleteResponse, error) { - respType := DdosCustomPoliciesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DdosCustomPoliciesClientDeletePollerResponse from the provided client and resume token. -func (l *DdosCustomPoliciesClientDeletePollerResponse) Resume(ctx context.Context, client *DdosCustomPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DdosCustomPoliciesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &DdosCustomPoliciesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DdosCustomPoliciesClientDeleteResponse contains the response from method DdosCustomPoliciesClient.Delete. type DdosCustomPoliciesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // DdosCustomPoliciesClientGetResponse contains the response from method DdosCustomPoliciesClient.Get. type DdosCustomPoliciesClientGetResponse struct { - DdosCustomPoliciesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosCustomPoliciesClientGetResult contains the result from method DdosCustomPoliciesClient.Get. -type DdosCustomPoliciesClientGetResult struct { DdosCustomPolicy } // DdosCustomPoliciesClientUpdateTagsResponse contains the response from method DdosCustomPoliciesClient.UpdateTags. type DdosCustomPoliciesClientUpdateTagsResponse struct { - DdosCustomPoliciesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosCustomPoliciesClientUpdateTagsResult contains the result from method DdosCustomPoliciesClient.UpdateTags. -type DdosCustomPoliciesClientUpdateTagsResult struct { DdosCustomPolicy } -// DdosProtectionPlansClientCreateOrUpdatePollerResponse contains the response from method DdosProtectionPlansClient.CreateOrUpdate. -type DdosProtectionPlansClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *DdosProtectionPlansClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DdosProtectionPlansClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DdosProtectionPlansClientCreateOrUpdateResponse, error) { - respType := DdosProtectionPlansClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.DdosProtectionPlan) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DdosProtectionPlansClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *DdosProtectionPlansClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *DdosProtectionPlansClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DdosProtectionPlansClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &DdosProtectionPlansClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DdosProtectionPlansClientCreateOrUpdateResponse contains the response from method DdosProtectionPlansClient.CreateOrUpdate. type DdosProtectionPlansClientCreateOrUpdateResponse struct { - DdosProtectionPlansClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosProtectionPlansClientCreateOrUpdateResult contains the result from method DdosProtectionPlansClient.CreateOrUpdate. -type DdosProtectionPlansClientCreateOrUpdateResult struct { DdosProtectionPlan } -// DdosProtectionPlansClientDeletePollerResponse contains the response from method DdosProtectionPlansClient.Delete. -type DdosProtectionPlansClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *DdosProtectionPlansClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DdosProtectionPlansClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DdosProtectionPlansClientDeleteResponse, error) { - respType := DdosProtectionPlansClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DdosProtectionPlansClientDeletePollerResponse from the provided client and resume token. -func (l *DdosProtectionPlansClientDeletePollerResponse) Resume(ctx context.Context, client *DdosProtectionPlansClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DdosProtectionPlansClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &DdosProtectionPlansClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DdosProtectionPlansClientDeleteResponse contains the response from method DdosProtectionPlansClient.Delete. type DdosProtectionPlansClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // DdosProtectionPlansClientGetResponse contains the response from method DdosProtectionPlansClient.Get. type DdosProtectionPlansClientGetResponse struct { - DdosProtectionPlansClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosProtectionPlansClientGetResult contains the result from method DdosProtectionPlansClient.Get. -type DdosProtectionPlansClientGetResult struct { DdosProtectionPlan } // DdosProtectionPlansClientListByResourceGroupResponse contains the response from method DdosProtectionPlansClient.ListByResourceGroup. type DdosProtectionPlansClientListByResourceGroupResponse struct { - DdosProtectionPlansClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosProtectionPlansClientListByResourceGroupResult contains the result from method DdosProtectionPlansClient.ListByResourceGroup. -type DdosProtectionPlansClientListByResourceGroupResult struct { DdosProtectionPlanListResult } // DdosProtectionPlansClientListResponse contains the response from method DdosProtectionPlansClient.List. type DdosProtectionPlansClientListResponse struct { - DdosProtectionPlansClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosProtectionPlansClientListResult contains the result from method DdosProtectionPlansClient.List. -type DdosProtectionPlansClientListResult struct { DdosProtectionPlanListResult } // DdosProtectionPlansClientUpdateTagsResponse contains the response from method DdosProtectionPlansClient.UpdateTags. type DdosProtectionPlansClientUpdateTagsResponse struct { - DdosProtectionPlansClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DdosProtectionPlansClientUpdateTagsResult contains the result from method DdosProtectionPlansClient.UpdateTags. -type DdosProtectionPlansClientUpdateTagsResult struct { DdosProtectionPlan } // DefaultSecurityRulesClientGetResponse contains the response from method DefaultSecurityRulesClient.Get. type DefaultSecurityRulesClientGetResponse struct { - DefaultSecurityRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DefaultSecurityRulesClientGetResult contains the result from method DefaultSecurityRulesClient.Get. -type DefaultSecurityRulesClientGetResult struct { SecurityRule } // DefaultSecurityRulesClientListResponse contains the response from method DefaultSecurityRulesClient.List. type DefaultSecurityRulesClientListResponse struct { - DefaultSecurityRulesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DefaultSecurityRulesClientListResult contains the result from method DefaultSecurityRulesClient.List. -type DefaultSecurityRulesClientListResult struct { SecurityRuleListResult } -// DscpConfigurationClientCreateOrUpdatePollerResponse contains the response from method DscpConfigurationClient.CreateOrUpdate. -type DscpConfigurationClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *DscpConfigurationClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DscpConfigurationClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DscpConfigurationClientCreateOrUpdateResponse, error) { - respType := DscpConfigurationClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.DscpConfiguration) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DscpConfigurationClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *DscpConfigurationClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *DscpConfigurationClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DscpConfigurationClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &DscpConfigurationClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DscpConfigurationClientCreateOrUpdateResponse contains the response from method DscpConfigurationClient.CreateOrUpdate. type DscpConfigurationClientCreateOrUpdateResponse struct { - DscpConfigurationClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DscpConfigurationClientCreateOrUpdateResult contains the result from method DscpConfigurationClient.CreateOrUpdate. -type DscpConfigurationClientCreateOrUpdateResult struct { DscpConfiguration } -// DscpConfigurationClientDeletePollerResponse contains the response from method DscpConfigurationClient.Delete. -type DscpConfigurationClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *DscpConfigurationClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l DscpConfigurationClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (DscpConfigurationClientDeleteResponse, error) { - respType := DscpConfigurationClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a DscpConfigurationClientDeletePollerResponse from the provided client and resume token. -func (l *DscpConfigurationClientDeletePollerResponse) Resume(ctx context.Context, client *DscpConfigurationClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("DscpConfigurationClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &DscpConfigurationClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // DscpConfigurationClientDeleteResponse contains the response from method DscpConfigurationClient.Delete. type DscpConfigurationClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // DscpConfigurationClientGetResponse contains the response from method DscpConfigurationClient.Get. type DscpConfigurationClientGetResponse struct { - DscpConfigurationClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DscpConfigurationClientGetResult contains the result from method DscpConfigurationClient.Get. -type DscpConfigurationClientGetResult struct { DscpConfiguration } // DscpConfigurationClientListAllResponse contains the response from method DscpConfigurationClient.ListAll. type DscpConfigurationClientListAllResponse struct { - DscpConfigurationClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DscpConfigurationClientListAllResult contains the result from method DscpConfigurationClient.ListAll. -type DscpConfigurationClientListAllResult struct { DscpConfigurationListResult } // DscpConfigurationClientListResponse contains the response from method DscpConfigurationClient.List. type DscpConfigurationClientListResponse struct { - DscpConfigurationClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// DscpConfigurationClientListResult contains the result from method DscpConfigurationClient.List. -type DscpConfigurationClientListResult struct { DscpConfigurationListResult } -// ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate. -type ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitAuthorization) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitAuthorizationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitAuthorizationsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate. type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult contains the result from method ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate. -type ExpressRouteCircuitAuthorizationsClientCreateOrUpdateResult struct { ExpressRouteCircuitAuthorization } -// ExpressRouteCircuitAuthorizationsClientDeletePollerResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Delete. -type ExpressRouteCircuitAuthorizationsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitAuthorizationsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitAuthorizationsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitAuthorizationsClientDeleteResponse, error) { - respType := ExpressRouteCircuitAuthorizationsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitAuthorizationsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitAuthorizationsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitAuthorizationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitAuthorizationsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitAuthorizationsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitAuthorizationsClientDeleteResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Delete. type ExpressRouteCircuitAuthorizationsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteCircuitAuthorizationsClientGetResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.Get. type ExpressRouteCircuitAuthorizationsClientGetResponse struct { - ExpressRouteCircuitAuthorizationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitAuthorizationsClientGetResult contains the result from method ExpressRouteCircuitAuthorizationsClient.Get. -type ExpressRouteCircuitAuthorizationsClientGetResult struct { ExpressRouteCircuitAuthorization } // ExpressRouteCircuitAuthorizationsClientListResponse contains the response from method ExpressRouteCircuitAuthorizationsClient.List. type ExpressRouteCircuitAuthorizationsClientListResponse struct { - ExpressRouteCircuitAuthorizationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitAuthorizationsClientListResult contains the result from method ExpressRouteCircuitAuthorizationsClient.List. -type ExpressRouteCircuitAuthorizationsClientListResult struct { AuthorizationListResult } -// ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCircuitConnectionsClient.CreateOrUpdate. -type ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *ExpressRouteCircuitConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitConnectionsClient.CreateOrUpdate. type ExpressRouteCircuitConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitConnectionsClientCreateOrUpdateResult contains the result from method ExpressRouteCircuitConnectionsClient.CreateOrUpdate. -type ExpressRouteCircuitConnectionsClientCreateOrUpdateResult struct { ExpressRouteCircuitConnection } -// ExpressRouteCircuitConnectionsClientDeletePollerResponse contains the response from method ExpressRouteCircuitConnectionsClient.Delete. -type ExpressRouteCircuitConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitConnectionsClientDeleteResponse, error) { - respType := ExpressRouteCircuitConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitConnectionsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitConnectionsClientDeleteResponse contains the response from method ExpressRouteCircuitConnectionsClient.Delete. type ExpressRouteCircuitConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteCircuitConnectionsClientGetResponse contains the response from method ExpressRouteCircuitConnectionsClient.Get. type ExpressRouteCircuitConnectionsClientGetResponse struct { - ExpressRouteCircuitConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitConnectionsClientGetResult contains the result from method ExpressRouteCircuitConnectionsClient.Get. -type ExpressRouteCircuitConnectionsClientGetResult struct { ExpressRouteCircuitConnection } // ExpressRouteCircuitConnectionsClientListResponse contains the response from method ExpressRouteCircuitConnectionsClient.List. type ExpressRouteCircuitConnectionsClientListResponse struct { - ExpressRouteCircuitConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitConnectionsClientListResult contains the result from method ExpressRouteCircuitConnectionsClient.List. -type ExpressRouteCircuitConnectionsClientListResult struct { ExpressRouteCircuitConnectionListResult } -// ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCircuitPeeringsClient.CreateOrUpdate. -type ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitPeering) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitPeeringsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitPeeringsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitPeeringsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitPeeringsClient.CreateOrUpdate. type ExpressRouteCircuitPeeringsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitPeeringsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitPeeringsClientCreateOrUpdateResult contains the result from method ExpressRouteCircuitPeeringsClient.CreateOrUpdate. -type ExpressRouteCircuitPeeringsClientCreateOrUpdateResult struct { ExpressRouteCircuitPeering } -// ExpressRouteCircuitPeeringsClientDeletePollerResponse contains the response from method ExpressRouteCircuitPeeringsClient.Delete. -type ExpressRouteCircuitPeeringsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitPeeringsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitPeeringsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitPeeringsClientDeleteResponse, error) { - respType := ExpressRouteCircuitPeeringsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitPeeringsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitPeeringsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitPeeringsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitPeeringsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitPeeringsClientDeleteResponse contains the response from method ExpressRouteCircuitPeeringsClient.Delete. type ExpressRouteCircuitPeeringsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteCircuitPeeringsClientGetResponse contains the response from method ExpressRouteCircuitPeeringsClient.Get. type ExpressRouteCircuitPeeringsClientGetResponse struct { - ExpressRouteCircuitPeeringsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitPeeringsClientGetResult contains the result from method ExpressRouteCircuitPeeringsClient.Get. -type ExpressRouteCircuitPeeringsClientGetResult struct { ExpressRouteCircuitPeering } // ExpressRouteCircuitPeeringsClientListResponse contains the response from method ExpressRouteCircuitPeeringsClient.List. type ExpressRouteCircuitPeeringsClientListResponse struct { - ExpressRouteCircuitPeeringsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitPeeringsClientListResult contains the result from method ExpressRouteCircuitPeeringsClient.List. -type ExpressRouteCircuitPeeringsClientListResult struct { ExpressRouteCircuitPeeringListResult } -// ExpressRouteCircuitsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCircuitsClient.CreateOrUpdate. -type ExpressRouteCircuitsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCircuitsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuit) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitsClientCreateOrUpdateResponse contains the response from method ExpressRouteCircuitsClient.CreateOrUpdate. type ExpressRouteCircuitsClientCreateOrUpdateResponse struct { - ExpressRouteCircuitsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientCreateOrUpdateResult contains the result from method ExpressRouteCircuitsClient.CreateOrUpdate. -type ExpressRouteCircuitsClientCreateOrUpdateResult struct { ExpressRouteCircuit } -// ExpressRouteCircuitsClientDeletePollerResponse contains the response from method ExpressRouteCircuitsClient.Delete. -type ExpressRouteCircuitsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsClientDeleteResponse, error) { - respType := ExpressRouteCircuitsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitsClientDeleteResponse contains the response from method ExpressRouteCircuitsClient.Delete. type ExpressRouteCircuitsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteCircuitsClientGetPeeringStatsResponse contains the response from method ExpressRouteCircuitsClient.GetPeeringStats. type ExpressRouteCircuitsClientGetPeeringStatsResponse struct { - ExpressRouteCircuitsClientGetPeeringStatsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientGetPeeringStatsResult contains the result from method ExpressRouteCircuitsClient.GetPeeringStats. -type ExpressRouteCircuitsClientGetPeeringStatsResult struct { ExpressRouteCircuitStats } // ExpressRouteCircuitsClientGetResponse contains the response from method ExpressRouteCircuitsClient.Get. type ExpressRouteCircuitsClientGetResponse struct { - ExpressRouteCircuitsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientGetResult contains the result from method ExpressRouteCircuitsClient.Get. -type ExpressRouteCircuitsClientGetResult struct { ExpressRouteCircuit } // ExpressRouteCircuitsClientGetStatsResponse contains the response from method ExpressRouteCircuitsClient.GetStats. type ExpressRouteCircuitsClientGetStatsResponse struct { - ExpressRouteCircuitsClientGetStatsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientGetStatsResult contains the result from method ExpressRouteCircuitsClient.GetStats. -type ExpressRouteCircuitsClientGetStatsResult struct { ExpressRouteCircuitStats } // ExpressRouteCircuitsClientListAllResponse contains the response from method ExpressRouteCircuitsClient.ListAll. type ExpressRouteCircuitsClientListAllResponse struct { - ExpressRouteCircuitsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientListAllResult contains the result from method ExpressRouteCircuitsClient.ListAll. -type ExpressRouteCircuitsClientListAllResult struct { ExpressRouteCircuitListResult } -// ExpressRouteCircuitsClientListArpTablePollerResponse contains the response from method ExpressRouteCircuitsClient.ListArpTable. -type ExpressRouteCircuitsClientListArpTablePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitsClientListArpTablePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitsClientListArpTablePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsClientListArpTableResponse, error) { - respType := ExpressRouteCircuitsClientListArpTableResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitsArpTableListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitsClientListArpTablePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitsClientListArpTablePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitsClient.ListArpTable", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitsClientListArpTablePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitsClientListArpTableResponse contains the response from method ExpressRouteCircuitsClient.ListArpTable. type ExpressRouteCircuitsClientListArpTableResponse struct { - ExpressRouteCircuitsClientListArpTableResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientListArpTableResult contains the result from method ExpressRouteCircuitsClient.ListArpTable. -type ExpressRouteCircuitsClientListArpTableResult struct { ExpressRouteCircuitsArpTableListResult } // ExpressRouteCircuitsClientListResponse contains the response from method ExpressRouteCircuitsClient.List. type ExpressRouteCircuitsClientListResponse struct { - ExpressRouteCircuitsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientListResult contains the result from method ExpressRouteCircuitsClient.List. -type ExpressRouteCircuitsClientListResult struct { ExpressRouteCircuitListResult } -// ExpressRouteCircuitsClientListRoutesTablePollerResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTable. -type ExpressRouteCircuitsClientListRoutesTablePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitsClientListRoutesTablePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitsClientListRoutesTablePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsClientListRoutesTableResponse, error) { - respType := ExpressRouteCircuitsClientListRoutesTableResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitsRoutesTableListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitsClientListRoutesTablePollerResponse from the provided client and resume token. -func (l *ExpressRouteCircuitsClientListRoutesTablePollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitsClient.ListRoutesTable", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitsClientListRoutesTablePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitsClientListRoutesTableResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTable. type ExpressRouteCircuitsClientListRoutesTableResponse struct { - ExpressRouteCircuitsClientListRoutesTableResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientListRoutesTableResult contains the result from method ExpressRouteCircuitsClient.ListRoutesTable. -type ExpressRouteCircuitsClientListRoutesTableResult struct { ExpressRouteCircuitsRoutesTableListResult } -// ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTableSummary. -type ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCircuitsClientListRoutesTableSummaryPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCircuitsClientListRoutesTableSummaryResponse, error) { - respType := ExpressRouteCircuitsClientListRoutesTableSummaryResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitsRoutesTableSummaryListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse from the provided client and resume -// token. -func (l *ExpressRouteCircuitsClientListRoutesTableSummaryPollerResponse) Resume(ctx context.Context, client *ExpressRouteCircuitsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCircuitsClient.ListRoutesTableSummary", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCircuitsClientListRoutesTableSummaryPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCircuitsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCircuitsClient.ListRoutesTableSummary. type ExpressRouteCircuitsClientListRoutesTableSummaryResponse struct { - ExpressRouteCircuitsClientListRoutesTableSummaryResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientListRoutesTableSummaryResult contains the result from method ExpressRouteCircuitsClient.ListRoutesTableSummary. -type ExpressRouteCircuitsClientListRoutesTableSummaryResult struct { ExpressRouteCircuitsRoutesTableSummaryListResult } // ExpressRouteCircuitsClientUpdateTagsResponse contains the response from method ExpressRouteCircuitsClient.UpdateTags. type ExpressRouteCircuitsClientUpdateTagsResponse struct { - ExpressRouteCircuitsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCircuitsClientUpdateTagsResult contains the result from method ExpressRouteCircuitsClient.UpdateTags. -type ExpressRouteCircuitsClientUpdateTagsResult struct { ExpressRouteCircuit } -// ExpressRouteConnectionsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteConnectionsClient.CreateOrUpdate. -type ExpressRouteConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ExpressRouteConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteConnectionsClient.CreateOrUpdate. type ExpressRouteConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteConnectionsClientCreateOrUpdateResult contains the result from method ExpressRouteConnectionsClient.CreateOrUpdate. -type ExpressRouteConnectionsClientCreateOrUpdateResult struct { ExpressRouteConnection } -// ExpressRouteConnectionsClientDeletePollerResponse contains the response from method ExpressRouteConnectionsClient.Delete. -type ExpressRouteConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteConnectionsClientDeleteResponse, error) { - respType := ExpressRouteConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteConnectionsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteConnectionsClientDeleteResponse contains the response from method ExpressRouteConnectionsClient.Delete. type ExpressRouteConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteConnectionsClientGetResponse contains the response from method ExpressRouteConnectionsClient.Get. type ExpressRouteConnectionsClientGetResponse struct { - ExpressRouteConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteConnectionsClientGetResult contains the result from method ExpressRouteConnectionsClient.Get. -type ExpressRouteConnectionsClientGetResult struct { ExpressRouteConnection } // ExpressRouteConnectionsClientListResponse contains the response from method ExpressRouteConnectionsClient.List. type ExpressRouteConnectionsClientListResponse struct { - ExpressRouteConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteConnectionsClientListResult contains the result from method ExpressRouteConnectionsClient.List. -type ExpressRouteConnectionsClientListResult struct { ExpressRouteConnectionList } -// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCrossConnectionPeering) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse from the provided client and -// resume token. -func (l *ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionPeeringsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate. type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResponse struct { - ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult contains the result from method ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionPeeringsClientCreateOrUpdateResult struct { ExpressRouteCrossConnectionPeering } -// ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Delete. -type ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionPeeringsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionPeeringsClientDeleteResponse, error) { - respType := ExpressRouteCrossConnectionPeeringsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteCrossConnectionPeeringsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionPeeringsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionPeeringsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionPeeringsClientDeleteResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Delete. type ExpressRouteCrossConnectionPeeringsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteCrossConnectionPeeringsClientGetResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.Get. type ExpressRouteCrossConnectionPeeringsClientGetResponse struct { - ExpressRouteCrossConnectionPeeringsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionPeeringsClientGetResult contains the result from method ExpressRouteCrossConnectionPeeringsClient.Get. -type ExpressRouteCrossConnectionPeeringsClientGetResult struct { ExpressRouteCrossConnectionPeering } // ExpressRouteCrossConnectionPeeringsClientListResponse contains the response from method ExpressRouteCrossConnectionPeeringsClient.List. type ExpressRouteCrossConnectionPeeringsClientListResponse struct { - ExpressRouteCrossConnectionPeeringsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionPeeringsClientListResult contains the result from method ExpressRouteCrossConnectionPeeringsClient.List. -type ExpressRouteCrossConnectionPeeringsClientListResult struct { ExpressRouteCrossConnectionPeeringList } -// ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteCrossConnectionsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionsClientCreateOrUpdateResponse, error) { - respType := ExpressRouteCrossConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCrossConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *ExpressRouteCrossConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionsClientCreateOrUpdateResponse contains the response from method ExpressRouteCrossConnectionsClient.CreateOrUpdate. type ExpressRouteCrossConnectionsClientCreateOrUpdateResponse struct { - ExpressRouteCrossConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientCreateOrUpdateResult contains the result from method ExpressRouteCrossConnectionsClient.CreateOrUpdate. -type ExpressRouteCrossConnectionsClientCreateOrUpdateResult struct { ExpressRouteCrossConnection } // ExpressRouteCrossConnectionsClientGetResponse contains the response from method ExpressRouteCrossConnectionsClient.Get. type ExpressRouteCrossConnectionsClientGetResponse struct { - ExpressRouteCrossConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientGetResult contains the result from method ExpressRouteCrossConnectionsClient.Get. -type ExpressRouteCrossConnectionsClientGetResult struct { ExpressRouteCrossConnection } -// ExpressRouteCrossConnectionsClientListArpTablePollerResponse contains the response from method ExpressRouteCrossConnectionsClient.ListArpTable. -type ExpressRouteCrossConnectionsClientListArpTablePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionsClientListArpTablePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionsClientListArpTablePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionsClientListArpTableResponse, error) { - respType := ExpressRouteCrossConnectionsClientListArpTableResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitsArpTableListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionsClientListArpTablePollerResponse from the provided client and resume token. -func (l *ExpressRouteCrossConnectionsClientListArpTablePollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionsClient.ListArpTable", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionsClientListArpTablePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionsClientListArpTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListArpTable. type ExpressRouteCrossConnectionsClientListArpTableResponse struct { - ExpressRouteCrossConnectionsClientListArpTableResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientListArpTableResult contains the result from method ExpressRouteCrossConnectionsClient.ListArpTable. -type ExpressRouteCrossConnectionsClientListArpTableResult struct { ExpressRouteCircuitsArpTableListResult } // ExpressRouteCrossConnectionsClientListByResourceGroupResponse contains the response from method ExpressRouteCrossConnectionsClient.ListByResourceGroup. type ExpressRouteCrossConnectionsClientListByResourceGroupResponse struct { - ExpressRouteCrossConnectionsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientListByResourceGroupResult contains the result from method ExpressRouteCrossConnectionsClient.ListByResourceGroup. -type ExpressRouteCrossConnectionsClientListByResourceGroupResult struct { ExpressRouteCrossConnectionListResult } // ExpressRouteCrossConnectionsClientListResponse contains the response from method ExpressRouteCrossConnectionsClient.List. type ExpressRouteCrossConnectionsClientListResponse struct { - ExpressRouteCrossConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientListResult contains the result from method ExpressRouteCrossConnectionsClient.List. -type ExpressRouteCrossConnectionsClientListResult struct { ExpressRouteCrossConnectionListResult } -// ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTable. -type ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionsClientListRoutesTablePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionsClientListRoutesTableResponse, error) { - respType := ExpressRouteCrossConnectionsClientListRoutesTableResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCircuitsRoutesTableListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse from the provided client and resume -// token. -func (l *ExpressRouteCrossConnectionsClientListRoutesTablePollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionsClient.ListRoutesTable", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionsClientListRoutesTablePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionsClientListRoutesTableResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTable. type ExpressRouteCrossConnectionsClientListRoutesTableResponse struct { - ExpressRouteCrossConnectionsClientListRoutesTableResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientListRoutesTableResult contains the result from method ExpressRouteCrossConnectionsClient.ListRoutesTable. -type ExpressRouteCrossConnectionsClientListRoutesTableResult struct { ExpressRouteCircuitsRoutesTableListResult } -// ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTableSummary. -type ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse, error) { - respType := ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteCrossConnectionsRoutesTableSummaryListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse from the provided client and -// resume token. -func (l *ExpressRouteCrossConnectionsClientListRoutesTableSummaryPollerResponse) Resume(ctx context.Context, client *ExpressRouteCrossConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteCrossConnectionsClient.ListRoutesTableSummary", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteCrossConnectionsClientListRoutesTableSummaryPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse contains the response from method ExpressRouteCrossConnectionsClient.ListRoutesTableSummary. type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResponse struct { - ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult contains the result from method ExpressRouteCrossConnectionsClient.ListRoutesTableSummary. -type ExpressRouteCrossConnectionsClientListRoutesTableSummaryResult struct { ExpressRouteCrossConnectionsRoutesTableSummaryListResult } // ExpressRouteCrossConnectionsClientUpdateTagsResponse contains the response from method ExpressRouteCrossConnectionsClient.UpdateTags. type ExpressRouteCrossConnectionsClientUpdateTagsResponse struct { - ExpressRouteCrossConnectionsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteCrossConnectionsClientUpdateTagsResult contains the result from method ExpressRouteCrossConnectionsClient.UpdateTags. -type ExpressRouteCrossConnectionsClientUpdateTagsResult struct { ExpressRouteCrossConnection } -// ExpressRouteGatewaysClientCreateOrUpdatePollerResponse contains the response from method ExpressRouteGatewaysClient.CreateOrUpdate. -type ExpressRouteGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteGatewaysClientCreateOrUpdateResponse, error) { - respType := ExpressRouteGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ExpressRouteGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRouteGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteGatewaysClientCreateOrUpdateResponse contains the response from method ExpressRouteGatewaysClient.CreateOrUpdate. type ExpressRouteGatewaysClientCreateOrUpdateResponse struct { - ExpressRouteGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteGatewaysClientCreateOrUpdateResult contains the result from method ExpressRouteGatewaysClient.CreateOrUpdate. -type ExpressRouteGatewaysClientCreateOrUpdateResult struct { ExpressRouteGateway } -// ExpressRouteGatewaysClientDeletePollerResponse contains the response from method ExpressRouteGatewaysClient.Delete. -type ExpressRouteGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteGatewaysClientDeleteResponse, error) { - respType := ExpressRouteGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRouteGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRouteGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteGatewaysClientDeleteResponse contains the response from method ExpressRouteGatewaysClient.Delete. type ExpressRouteGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRouteGatewaysClientGetResponse contains the response from method ExpressRouteGatewaysClient.Get. type ExpressRouteGatewaysClientGetResponse struct { - ExpressRouteGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteGatewaysClientGetResult contains the result from method ExpressRouteGatewaysClient.Get. -type ExpressRouteGatewaysClientGetResult struct { ExpressRouteGateway } // ExpressRouteGatewaysClientListByResourceGroupResponse contains the response from method ExpressRouteGatewaysClient.ListByResourceGroup. type ExpressRouteGatewaysClientListByResourceGroupResponse struct { - ExpressRouteGatewaysClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteGatewaysClientListByResourceGroupResult contains the result from method ExpressRouteGatewaysClient.ListByResourceGroup. -type ExpressRouteGatewaysClientListByResourceGroupResult struct { ExpressRouteGatewayList } // ExpressRouteGatewaysClientListBySubscriptionResponse contains the response from method ExpressRouteGatewaysClient.ListBySubscription. type ExpressRouteGatewaysClientListBySubscriptionResponse struct { - ExpressRouteGatewaysClientListBySubscriptionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteGatewaysClientListBySubscriptionResult contains the result from method ExpressRouteGatewaysClient.ListBySubscription. -type ExpressRouteGatewaysClientListBySubscriptionResult struct { ExpressRouteGatewayList } -// ExpressRouteGatewaysClientUpdateTagsPollerResponse contains the response from method ExpressRouteGatewaysClient.UpdateTags. -type ExpressRouteGatewaysClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRouteGatewaysClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRouteGatewaysClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRouteGatewaysClientUpdateTagsResponse, error) { - respType := ExpressRouteGatewaysClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRouteGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRouteGatewaysClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *ExpressRouteGatewaysClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *ExpressRouteGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRouteGatewaysClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRouteGatewaysClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRouteGatewaysClientUpdateTagsResponse contains the response from method ExpressRouteGatewaysClient.UpdateTags. type ExpressRouteGatewaysClientUpdateTagsResponse struct { - ExpressRouteGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteGatewaysClientUpdateTagsResult contains the result from method ExpressRouteGatewaysClient.UpdateTags. -type ExpressRouteGatewaysClientUpdateTagsResult struct { ExpressRouteGateway } // ExpressRouteLinksClientGetResponse contains the response from method ExpressRouteLinksClient.Get. type ExpressRouteLinksClientGetResponse struct { - ExpressRouteLinksClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteLinksClientGetResult contains the result from method ExpressRouteLinksClient.Get. -type ExpressRouteLinksClientGetResult struct { ExpressRouteLink } // ExpressRouteLinksClientListResponse contains the response from method ExpressRouteLinksClient.List. type ExpressRouteLinksClientListResponse struct { - ExpressRouteLinksClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteLinksClientListResult contains the result from method ExpressRouteLinksClient.List. -type ExpressRouteLinksClientListResult struct { ExpressRouteLinkListResult } -// ExpressRoutePortsClientCreateOrUpdatePollerResponse contains the response from method ExpressRoutePortsClient.CreateOrUpdate. -type ExpressRoutePortsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRoutePortsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRoutePortsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRoutePortsClientCreateOrUpdateResponse, error) { - respType := ExpressRoutePortsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ExpressRoutePort) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRoutePortsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ExpressRoutePortsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ExpressRoutePortsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRoutePortsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRoutePortsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRoutePortsClientCreateOrUpdateResponse contains the response from method ExpressRoutePortsClient.CreateOrUpdate. type ExpressRoutePortsClientCreateOrUpdateResponse struct { - ExpressRoutePortsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientCreateOrUpdateResult contains the result from method ExpressRoutePortsClient.CreateOrUpdate. -type ExpressRoutePortsClientCreateOrUpdateResult struct { ExpressRoutePort } -// ExpressRoutePortsClientDeletePollerResponse contains the response from method ExpressRoutePortsClient.Delete. -type ExpressRoutePortsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ExpressRoutePortsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ExpressRoutePortsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ExpressRoutePortsClientDeleteResponse, error) { - respType := ExpressRoutePortsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ExpressRoutePortsClientDeletePollerResponse from the provided client and resume token. -func (l *ExpressRoutePortsClientDeletePollerResponse) Resume(ctx context.Context, client *ExpressRoutePortsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ExpressRoutePortsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ExpressRoutePortsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ExpressRoutePortsClientDeleteResponse contains the response from method ExpressRoutePortsClient.Delete. type ExpressRoutePortsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ExpressRoutePortsClientGenerateLOAResponse contains the response from method ExpressRoutePortsClient.GenerateLOA. type ExpressRoutePortsClientGenerateLOAResponse struct { - ExpressRoutePortsClientGenerateLOAResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientGenerateLOAResult contains the result from method ExpressRoutePortsClient.GenerateLOA. -type ExpressRoutePortsClientGenerateLOAResult struct { GenerateExpressRoutePortsLOAResult } // ExpressRoutePortsClientGetResponse contains the response from method ExpressRoutePortsClient.Get. type ExpressRoutePortsClientGetResponse struct { - ExpressRoutePortsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientGetResult contains the result from method ExpressRoutePortsClient.Get. -type ExpressRoutePortsClientGetResult struct { ExpressRoutePort } // ExpressRoutePortsClientListByResourceGroupResponse contains the response from method ExpressRoutePortsClient.ListByResourceGroup. type ExpressRoutePortsClientListByResourceGroupResponse struct { - ExpressRoutePortsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientListByResourceGroupResult contains the result from method ExpressRoutePortsClient.ListByResourceGroup. -type ExpressRoutePortsClientListByResourceGroupResult struct { ExpressRoutePortListResult } // ExpressRoutePortsClientListResponse contains the response from method ExpressRoutePortsClient.List. type ExpressRoutePortsClientListResponse struct { - ExpressRoutePortsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientListResult contains the result from method ExpressRoutePortsClient.List. -type ExpressRoutePortsClientListResult struct { ExpressRoutePortListResult } // ExpressRoutePortsClientUpdateTagsResponse contains the response from method ExpressRoutePortsClient.UpdateTags. type ExpressRoutePortsClientUpdateTagsResponse struct { - ExpressRoutePortsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsClientUpdateTagsResult contains the result from method ExpressRoutePortsClient.UpdateTags. -type ExpressRoutePortsClientUpdateTagsResult struct { ExpressRoutePort } // ExpressRoutePortsLocationsClientGetResponse contains the response from method ExpressRoutePortsLocationsClient.Get. type ExpressRoutePortsLocationsClientGetResponse struct { - ExpressRoutePortsLocationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsLocationsClientGetResult contains the result from method ExpressRoutePortsLocationsClient.Get. -type ExpressRoutePortsLocationsClientGetResult struct { ExpressRoutePortsLocation } // ExpressRoutePortsLocationsClientListResponse contains the response from method ExpressRoutePortsLocationsClient.List. type ExpressRoutePortsLocationsClientListResponse struct { - ExpressRoutePortsLocationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRoutePortsLocationsClientListResult contains the result from method ExpressRoutePortsLocationsClient.List. -type ExpressRoutePortsLocationsClientListResult struct { ExpressRoutePortsLocationListResult } // ExpressRouteServiceProvidersClientListResponse contains the response from method ExpressRouteServiceProvidersClient.List. type ExpressRouteServiceProvidersClientListResponse struct { - ExpressRouteServiceProvidersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ExpressRouteServiceProvidersClientListResult contains the result from method ExpressRouteServiceProvidersClient.List. -type ExpressRouteServiceProvidersClientListResult struct { ExpressRouteServiceProviderListResult } -// FirewallPoliciesClientCreateOrUpdatePollerResponse contains the response from method FirewallPoliciesClient.CreateOrUpdate. -type FirewallPoliciesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *FirewallPoliciesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FirewallPoliciesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FirewallPoliciesClientCreateOrUpdateResponse, error) { - respType := FirewallPoliciesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.FirewallPolicy) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FirewallPoliciesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *FirewallPoliciesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *FirewallPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FirewallPoliciesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &FirewallPoliciesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FirewallPoliciesClientCreateOrUpdateResponse contains the response from method FirewallPoliciesClient.CreateOrUpdate. type FirewallPoliciesClientCreateOrUpdateResponse struct { - FirewallPoliciesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPoliciesClientCreateOrUpdateResult contains the result from method FirewallPoliciesClient.CreateOrUpdate. -type FirewallPoliciesClientCreateOrUpdateResult struct { FirewallPolicy } -// FirewallPoliciesClientDeletePollerResponse contains the response from method FirewallPoliciesClient.Delete. -type FirewallPoliciesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *FirewallPoliciesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FirewallPoliciesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FirewallPoliciesClientDeleteResponse, error) { - respType := FirewallPoliciesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FirewallPoliciesClientDeletePollerResponse from the provided client and resume token. -func (l *FirewallPoliciesClientDeletePollerResponse) Resume(ctx context.Context, client *FirewallPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FirewallPoliciesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &FirewallPoliciesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FirewallPoliciesClientDeleteResponse contains the response from method FirewallPoliciesClient.Delete. type FirewallPoliciesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // FirewallPoliciesClientGetResponse contains the response from method FirewallPoliciesClient.Get. type FirewallPoliciesClientGetResponse struct { - FirewallPoliciesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPoliciesClientGetResult contains the result from method FirewallPoliciesClient.Get. -type FirewallPoliciesClientGetResult struct { FirewallPolicy } // FirewallPoliciesClientListAllResponse contains the response from method FirewallPoliciesClient.ListAll. type FirewallPoliciesClientListAllResponse struct { - FirewallPoliciesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPoliciesClientListAllResult contains the result from method FirewallPoliciesClient.ListAll. -type FirewallPoliciesClientListAllResult struct { FirewallPolicyListResult } // FirewallPoliciesClientListResponse contains the response from method FirewallPoliciesClient.List. type FirewallPoliciesClientListResponse struct { - FirewallPoliciesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPoliciesClientListResult contains the result from method FirewallPoliciesClient.List. -type FirewallPoliciesClientListResult struct { FirewallPolicyListResult } // FirewallPolicyIdpsSignaturesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesClient.List. type FirewallPolicyIdpsSignaturesClientListResponse struct { - FirewallPolicyIdpsSignaturesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesClientListResult contains the result from method FirewallPolicyIdpsSignaturesClient.List. -type FirewallPolicyIdpsSignaturesClientListResult struct { QueryResults } // FirewallPolicyIdpsSignaturesFilterValuesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesFilterValuesClient.List. type FirewallPolicyIdpsSignaturesFilterValuesClientListResponse struct { - FirewallPolicyIdpsSignaturesFilterValuesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesFilterValuesClientListResult contains the result from method FirewallPolicyIdpsSignaturesFilterValuesClient.List. -type FirewallPolicyIdpsSignaturesFilterValuesClientListResult struct { SignatureOverridesFilterValuesResponse } // FirewallPolicyIdpsSignaturesOverridesClientGetResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Get. type FirewallPolicyIdpsSignaturesOverridesClientGetResponse struct { - FirewallPolicyIdpsSignaturesOverridesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesOverridesClientGetResult contains the result from method FirewallPolicyIdpsSignaturesOverridesClient.Get. -type FirewallPolicyIdpsSignaturesOverridesClientGetResult struct { SignaturesOverrides } // FirewallPolicyIdpsSignaturesOverridesClientListResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.List. type FirewallPolicyIdpsSignaturesOverridesClientListResponse struct { - FirewallPolicyIdpsSignaturesOverridesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesOverridesClientListResult contains the result from method FirewallPolicyIdpsSignaturesOverridesClient.List. -type FirewallPolicyIdpsSignaturesOverridesClientListResult struct { SignaturesOverridesList } // FirewallPolicyIdpsSignaturesOverridesClientPatchResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Patch. type FirewallPolicyIdpsSignaturesOverridesClientPatchResponse struct { - FirewallPolicyIdpsSignaturesOverridesClientPatchResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesOverridesClientPatchResult contains the result from method FirewallPolicyIdpsSignaturesOverridesClient.Patch. -type FirewallPolicyIdpsSignaturesOverridesClientPatchResult struct { SignaturesOverrides } // FirewallPolicyIdpsSignaturesOverridesClientPutResponse contains the response from method FirewallPolicyIdpsSignaturesOverridesClient.Put. type FirewallPolicyIdpsSignaturesOverridesClientPutResponse struct { - FirewallPolicyIdpsSignaturesOverridesClientPutResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyIdpsSignaturesOverridesClientPutResult contains the result from method FirewallPolicyIdpsSignaturesOverridesClient.Put. -type FirewallPolicyIdpsSignaturesOverridesClientPutResult struct { SignaturesOverrides } -// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate. -type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse, error) { - respType := FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.FirewallPolicyRuleCollectionGroup) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *FirewallPolicyRuleCollectionGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &FirewallPolicyRuleCollectionGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate. type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResponse struct { - FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult contains the result from method FirewallPolicyRuleCollectionGroupsClient.CreateOrUpdate. -type FirewallPolicyRuleCollectionGroupsClientCreateOrUpdateResult struct { FirewallPolicyRuleCollectionGroup } -// FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Delete. -type FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *FirewallPolicyRuleCollectionGroupsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FirewallPolicyRuleCollectionGroupsClientDeleteResponse, error) { - respType := FirewallPolicyRuleCollectionGroupsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse from the provided client and resume token. -func (l *FirewallPolicyRuleCollectionGroupsClientDeletePollerResponse) Resume(ctx context.Context, client *FirewallPolicyRuleCollectionGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FirewallPolicyRuleCollectionGroupsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &FirewallPolicyRuleCollectionGroupsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FirewallPolicyRuleCollectionGroupsClientDeleteResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Delete. type FirewallPolicyRuleCollectionGroupsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // FirewallPolicyRuleCollectionGroupsClientGetResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.Get. type FirewallPolicyRuleCollectionGroupsClientGetResponse struct { - FirewallPolicyRuleCollectionGroupsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyRuleCollectionGroupsClientGetResult contains the result from method FirewallPolicyRuleCollectionGroupsClient.Get. -type FirewallPolicyRuleCollectionGroupsClientGetResult struct { FirewallPolicyRuleCollectionGroup } // FirewallPolicyRuleCollectionGroupsClientListResponse contains the response from method FirewallPolicyRuleCollectionGroupsClient.List. type FirewallPolicyRuleCollectionGroupsClientListResponse struct { - FirewallPolicyRuleCollectionGroupsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FirewallPolicyRuleCollectionGroupsClientListResult contains the result from method FirewallPolicyRuleCollectionGroupsClient.List. -type FirewallPolicyRuleCollectionGroupsClientListResult struct { FirewallPolicyRuleCollectionGroupListResult } -// FlowLogsClientCreateOrUpdatePollerResponse contains the response from method FlowLogsClient.CreateOrUpdate. -type FlowLogsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *FlowLogsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FlowLogsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FlowLogsClientCreateOrUpdateResponse, error) { - respType := FlowLogsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.FlowLog) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FlowLogsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *FlowLogsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *FlowLogsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FlowLogsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &FlowLogsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FlowLogsClientCreateOrUpdateResponse contains the response from method FlowLogsClient.CreateOrUpdate. type FlowLogsClientCreateOrUpdateResponse struct { - FlowLogsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FlowLogsClientCreateOrUpdateResult contains the result from method FlowLogsClient.CreateOrUpdate. -type FlowLogsClientCreateOrUpdateResult struct { FlowLog } -// FlowLogsClientDeletePollerResponse contains the response from method FlowLogsClient.Delete. -type FlowLogsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *FlowLogsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l FlowLogsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (FlowLogsClientDeleteResponse, error) { - respType := FlowLogsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a FlowLogsClientDeletePollerResponse from the provided client and resume token. -func (l *FlowLogsClientDeletePollerResponse) Resume(ctx context.Context, client *FlowLogsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("FlowLogsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &FlowLogsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // FlowLogsClientDeleteResponse contains the response from method FlowLogsClient.Delete. type FlowLogsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // FlowLogsClientGetResponse contains the response from method FlowLogsClient.Get. type FlowLogsClientGetResponse struct { - FlowLogsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FlowLogsClientGetResult contains the result from method FlowLogsClient.Get. -type FlowLogsClientGetResult struct { FlowLog } // FlowLogsClientListResponse contains the response from method FlowLogsClient.List. type FlowLogsClientListResponse struct { - FlowLogsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FlowLogsClientListResult contains the result from method FlowLogsClient.List. -type FlowLogsClientListResult struct { FlowLogListResult } // FlowLogsClientUpdateTagsResponse contains the response from method FlowLogsClient.UpdateTags. type FlowLogsClientUpdateTagsResponse struct { - FlowLogsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// FlowLogsClientUpdateTagsResult contains the result from method FlowLogsClient.UpdateTags. -type FlowLogsClientUpdateTagsResult struct { FlowLog } -// HubRouteTablesClientCreateOrUpdatePollerResponse contains the response from method HubRouteTablesClient.CreateOrUpdate. -type HubRouteTablesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *HubRouteTablesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l HubRouteTablesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (HubRouteTablesClientCreateOrUpdateResponse, error) { - respType := HubRouteTablesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.HubRouteTable) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a HubRouteTablesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *HubRouteTablesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *HubRouteTablesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("HubRouteTablesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &HubRouteTablesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // HubRouteTablesClientCreateOrUpdateResponse contains the response from method HubRouteTablesClient.CreateOrUpdate. type HubRouteTablesClientCreateOrUpdateResponse struct { - HubRouteTablesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubRouteTablesClientCreateOrUpdateResult contains the result from method HubRouteTablesClient.CreateOrUpdate. -type HubRouteTablesClientCreateOrUpdateResult struct { HubRouteTable } -// HubRouteTablesClientDeletePollerResponse contains the response from method HubRouteTablesClient.Delete. -type HubRouteTablesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *HubRouteTablesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l HubRouteTablesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (HubRouteTablesClientDeleteResponse, error) { - respType := HubRouteTablesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a HubRouteTablesClientDeletePollerResponse from the provided client and resume token. -func (l *HubRouteTablesClientDeletePollerResponse) Resume(ctx context.Context, client *HubRouteTablesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("HubRouteTablesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &HubRouteTablesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // HubRouteTablesClientDeleteResponse contains the response from method HubRouteTablesClient.Delete. type HubRouteTablesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // HubRouteTablesClientGetResponse contains the response from method HubRouteTablesClient.Get. type HubRouteTablesClientGetResponse struct { - HubRouteTablesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubRouteTablesClientGetResult contains the result from method HubRouteTablesClient.Get. -type HubRouteTablesClientGetResult struct { HubRouteTable } // HubRouteTablesClientListResponse contains the response from method HubRouteTablesClient.List. type HubRouteTablesClientListResponse struct { - HubRouteTablesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubRouteTablesClientListResult contains the result from method HubRouteTablesClient.List. -type HubRouteTablesClientListResult struct { ListHubRouteTablesResult } -// HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse contains the response from method HubVirtualNetworkConnectionsClient.CreateOrUpdate. -type HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *HubVirtualNetworkConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (HubVirtualNetworkConnectionsClientCreateOrUpdateResponse, error) { - respType := HubVirtualNetworkConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.HubVirtualNetworkConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *HubVirtualNetworkConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *HubVirtualNetworkConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("HubVirtualNetworkConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &HubVirtualNetworkConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // HubVirtualNetworkConnectionsClientCreateOrUpdateResponse contains the response from method HubVirtualNetworkConnectionsClient.CreateOrUpdate. type HubVirtualNetworkConnectionsClientCreateOrUpdateResponse struct { - HubVirtualNetworkConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubVirtualNetworkConnectionsClientCreateOrUpdateResult contains the result from method HubVirtualNetworkConnectionsClient.CreateOrUpdate. -type HubVirtualNetworkConnectionsClientCreateOrUpdateResult struct { HubVirtualNetworkConnection } -// HubVirtualNetworkConnectionsClientDeletePollerResponse contains the response from method HubVirtualNetworkConnectionsClient.Delete. -type HubVirtualNetworkConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *HubVirtualNetworkConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l HubVirtualNetworkConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (HubVirtualNetworkConnectionsClientDeleteResponse, error) { - respType := HubVirtualNetworkConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a HubVirtualNetworkConnectionsClientDeletePollerResponse from the provided client and resume token. -func (l *HubVirtualNetworkConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *HubVirtualNetworkConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("HubVirtualNetworkConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &HubVirtualNetworkConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // HubVirtualNetworkConnectionsClientDeleteResponse contains the response from method HubVirtualNetworkConnectionsClient.Delete. type HubVirtualNetworkConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // HubVirtualNetworkConnectionsClientGetResponse contains the response from method HubVirtualNetworkConnectionsClient.Get. type HubVirtualNetworkConnectionsClientGetResponse struct { - HubVirtualNetworkConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubVirtualNetworkConnectionsClientGetResult contains the result from method HubVirtualNetworkConnectionsClient.Get. -type HubVirtualNetworkConnectionsClientGetResult struct { HubVirtualNetworkConnection } // HubVirtualNetworkConnectionsClientListResponse contains the response from method HubVirtualNetworkConnectionsClient.List. type HubVirtualNetworkConnectionsClientListResponse struct { - HubVirtualNetworkConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// HubVirtualNetworkConnectionsClientListResult contains the result from method HubVirtualNetworkConnectionsClient.List. -type HubVirtualNetworkConnectionsClientListResult struct { ListHubVirtualNetworkConnectionsResult } -// IPAllocationsClientCreateOrUpdatePollerResponse contains the response from method IPAllocationsClient.CreateOrUpdate. -type IPAllocationsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *IPAllocationsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l IPAllocationsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (IPAllocationsClientCreateOrUpdateResponse, error) { - respType := IPAllocationsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.IPAllocation) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a IPAllocationsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *IPAllocationsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *IPAllocationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("IPAllocationsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &IPAllocationsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // IPAllocationsClientCreateOrUpdateResponse contains the response from method IPAllocationsClient.CreateOrUpdate. type IPAllocationsClientCreateOrUpdateResponse struct { - IPAllocationsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPAllocationsClientCreateOrUpdateResult contains the result from method IPAllocationsClient.CreateOrUpdate. -type IPAllocationsClientCreateOrUpdateResult struct { IPAllocation } -// IPAllocationsClientDeletePollerResponse contains the response from method IPAllocationsClient.Delete. -type IPAllocationsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *IPAllocationsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l IPAllocationsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (IPAllocationsClientDeleteResponse, error) { - respType := IPAllocationsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a IPAllocationsClientDeletePollerResponse from the provided client and resume token. -func (l *IPAllocationsClientDeletePollerResponse) Resume(ctx context.Context, client *IPAllocationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("IPAllocationsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &IPAllocationsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // IPAllocationsClientDeleteResponse contains the response from method IPAllocationsClient.Delete. type IPAllocationsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // IPAllocationsClientGetResponse contains the response from method IPAllocationsClient.Get. type IPAllocationsClientGetResponse struct { - IPAllocationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPAllocationsClientGetResult contains the result from method IPAllocationsClient.Get. -type IPAllocationsClientGetResult struct { IPAllocation } // IPAllocationsClientListByResourceGroupResponse contains the response from method IPAllocationsClient.ListByResourceGroup. type IPAllocationsClientListByResourceGroupResponse struct { - IPAllocationsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPAllocationsClientListByResourceGroupResult contains the result from method IPAllocationsClient.ListByResourceGroup. -type IPAllocationsClientListByResourceGroupResult struct { IPAllocationListResult } // IPAllocationsClientListResponse contains the response from method IPAllocationsClient.List. type IPAllocationsClientListResponse struct { - IPAllocationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPAllocationsClientListResult contains the result from method IPAllocationsClient.List. -type IPAllocationsClientListResult struct { IPAllocationListResult } // IPAllocationsClientUpdateTagsResponse contains the response from method IPAllocationsClient.UpdateTags. type IPAllocationsClientUpdateTagsResponse struct { - IPAllocationsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPAllocationsClientUpdateTagsResult contains the result from method IPAllocationsClient.UpdateTags. -type IPAllocationsClientUpdateTagsResult struct { IPAllocation } -// IPGroupsClientCreateOrUpdatePollerResponse contains the response from method IPGroupsClient.CreateOrUpdate. -type IPGroupsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *IPGroupsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l IPGroupsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (IPGroupsClientCreateOrUpdateResponse, error) { - respType := IPGroupsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.IPGroup) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a IPGroupsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *IPGroupsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *IPGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("IPGroupsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &IPGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // IPGroupsClientCreateOrUpdateResponse contains the response from method IPGroupsClient.CreateOrUpdate. type IPGroupsClientCreateOrUpdateResponse struct { - IPGroupsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPGroupsClientCreateOrUpdateResult contains the result from method IPGroupsClient.CreateOrUpdate. -type IPGroupsClientCreateOrUpdateResult struct { IPGroup } -// IPGroupsClientDeletePollerResponse contains the response from method IPGroupsClient.Delete. -type IPGroupsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *IPGroupsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l IPGroupsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (IPGroupsClientDeleteResponse, error) { - respType := IPGroupsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a IPGroupsClientDeletePollerResponse from the provided client and resume token. -func (l *IPGroupsClientDeletePollerResponse) Resume(ctx context.Context, client *IPGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("IPGroupsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &IPGroupsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // IPGroupsClientDeleteResponse contains the response from method IPGroupsClient.Delete. type IPGroupsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // IPGroupsClientGetResponse contains the response from method IPGroupsClient.Get. type IPGroupsClientGetResponse struct { - IPGroupsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPGroupsClientGetResult contains the result from method IPGroupsClient.Get. -type IPGroupsClientGetResult struct { IPGroup } // IPGroupsClientListByResourceGroupResponse contains the response from method IPGroupsClient.ListByResourceGroup. type IPGroupsClientListByResourceGroupResponse struct { - IPGroupsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPGroupsClientListByResourceGroupResult contains the result from method IPGroupsClient.ListByResourceGroup. -type IPGroupsClientListByResourceGroupResult struct { IPGroupListResult } // IPGroupsClientListResponse contains the response from method IPGroupsClient.List. type IPGroupsClientListResponse struct { - IPGroupsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPGroupsClientListResult contains the result from method IPGroupsClient.List. -type IPGroupsClientListResult struct { IPGroupListResult } // IPGroupsClientUpdateGroupsResponse contains the response from method IPGroupsClient.UpdateGroups. type IPGroupsClientUpdateGroupsResponse struct { - IPGroupsClientUpdateGroupsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// IPGroupsClientUpdateGroupsResult contains the result from method IPGroupsClient.UpdateGroups. -type IPGroupsClientUpdateGroupsResult struct { IPGroup } -// InboundNatRulesClientCreateOrUpdatePollerResponse contains the response from method InboundNatRulesClient.CreateOrUpdate. -type InboundNatRulesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *InboundNatRulesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InboundNatRulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InboundNatRulesClientCreateOrUpdateResponse, error) { - respType := InboundNatRulesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.InboundNatRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InboundNatRulesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *InboundNatRulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *InboundNatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InboundNatRulesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &InboundNatRulesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InboundNatRulesClientCreateOrUpdateResponse contains the response from method InboundNatRulesClient.CreateOrUpdate. type InboundNatRulesClientCreateOrUpdateResponse struct { - InboundNatRulesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InboundNatRulesClientCreateOrUpdateResult contains the result from method InboundNatRulesClient.CreateOrUpdate. -type InboundNatRulesClientCreateOrUpdateResult struct { InboundNatRule } -// InboundNatRulesClientDeletePollerResponse contains the response from method InboundNatRulesClient.Delete. -type InboundNatRulesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *InboundNatRulesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InboundNatRulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InboundNatRulesClientDeleteResponse, error) { - respType := InboundNatRulesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InboundNatRulesClientDeletePollerResponse from the provided client and resume token. -func (l *InboundNatRulesClientDeletePollerResponse) Resume(ctx context.Context, client *InboundNatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InboundNatRulesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &InboundNatRulesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InboundNatRulesClientDeleteResponse contains the response from method InboundNatRulesClient.Delete. type InboundNatRulesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // InboundNatRulesClientGetResponse contains the response from method InboundNatRulesClient.Get. type InboundNatRulesClientGetResponse struct { - InboundNatRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InboundNatRulesClientGetResult contains the result from method InboundNatRulesClient.Get. -type InboundNatRulesClientGetResult struct { InboundNatRule } // InboundNatRulesClientListResponse contains the response from method InboundNatRulesClient.List. type InboundNatRulesClientListResponse struct { - InboundNatRulesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InboundNatRulesClientListResult contains the result from method InboundNatRulesClient.List. -type InboundNatRulesClientListResult struct { InboundNatRuleListResult } -// InboundSecurityRuleClientCreateOrUpdatePollerResponse contains the response from method InboundSecurityRuleClient.CreateOrUpdate. -type InboundSecurityRuleClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *InboundSecurityRuleClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InboundSecurityRuleClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InboundSecurityRuleClientCreateOrUpdateResponse, error) { - respType := InboundSecurityRuleClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.InboundSecurityRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InboundSecurityRuleClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *InboundSecurityRuleClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *InboundSecurityRuleClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InboundSecurityRuleClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &InboundSecurityRuleClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InboundSecurityRuleClientCreateOrUpdateResponse contains the response from method InboundSecurityRuleClient.CreateOrUpdate. type InboundSecurityRuleClientCreateOrUpdateResponse struct { - InboundSecurityRuleClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InboundSecurityRuleClientCreateOrUpdateResult contains the result from method InboundSecurityRuleClient.CreateOrUpdate. -type InboundSecurityRuleClientCreateOrUpdateResult struct { InboundSecurityRule } // InterfaceIPConfigurationsClientGetResponse contains the response from method InterfaceIPConfigurationsClient.Get. type InterfaceIPConfigurationsClientGetResponse struct { - InterfaceIPConfigurationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceIPConfigurationsClientGetResult contains the result from method InterfaceIPConfigurationsClient.Get. -type InterfaceIPConfigurationsClientGetResult struct { InterfaceIPConfiguration } // InterfaceIPConfigurationsClientListResponse contains the response from method InterfaceIPConfigurationsClient.List. type InterfaceIPConfigurationsClientListResponse struct { - InterfaceIPConfigurationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceIPConfigurationsClientListResult contains the result from method InterfaceIPConfigurationsClient.List. -type InterfaceIPConfigurationsClientListResult struct { InterfaceIPConfigurationListResult } // InterfaceLoadBalancersClientListResponse contains the response from method InterfaceLoadBalancersClient.List. type InterfaceLoadBalancersClientListResponse struct { - InterfaceLoadBalancersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceLoadBalancersClientListResult contains the result from method InterfaceLoadBalancersClient.List. -type InterfaceLoadBalancersClientListResult struct { InterfaceLoadBalancerListResult } -// InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse contains the response from method InterfaceTapConfigurationsClient.CreateOrUpdate. -type InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfaceTapConfigurationsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfaceTapConfigurationsClientCreateOrUpdateResponse, error) { - respType := InterfaceTapConfigurationsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.InterfaceTapConfiguration) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *InterfaceTapConfigurationsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *InterfaceTapConfigurationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfaceTapConfigurationsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &InterfaceTapConfigurationsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfaceTapConfigurationsClientCreateOrUpdateResponse contains the response from method InterfaceTapConfigurationsClient.CreateOrUpdate. type InterfaceTapConfigurationsClientCreateOrUpdateResponse struct { - InterfaceTapConfigurationsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceTapConfigurationsClientCreateOrUpdateResult contains the result from method InterfaceTapConfigurationsClient.CreateOrUpdate. -type InterfaceTapConfigurationsClientCreateOrUpdateResult struct { InterfaceTapConfiguration } -// InterfaceTapConfigurationsClientDeletePollerResponse contains the response from method InterfaceTapConfigurationsClient.Delete. -type InterfaceTapConfigurationsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfaceTapConfigurationsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfaceTapConfigurationsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfaceTapConfigurationsClientDeleteResponse, error) { - respType := InterfaceTapConfigurationsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfaceTapConfigurationsClientDeletePollerResponse from the provided client and resume token. -func (l *InterfaceTapConfigurationsClientDeletePollerResponse) Resume(ctx context.Context, client *InterfaceTapConfigurationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfaceTapConfigurationsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &InterfaceTapConfigurationsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfaceTapConfigurationsClientDeleteResponse contains the response from method InterfaceTapConfigurationsClient.Delete. type InterfaceTapConfigurationsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // InterfaceTapConfigurationsClientGetResponse contains the response from method InterfaceTapConfigurationsClient.Get. type InterfaceTapConfigurationsClientGetResponse struct { - InterfaceTapConfigurationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceTapConfigurationsClientGetResult contains the result from method InterfaceTapConfigurationsClient.Get. -type InterfaceTapConfigurationsClientGetResult struct { InterfaceTapConfiguration } // InterfaceTapConfigurationsClientListResponse contains the response from method InterfaceTapConfigurationsClient.List. type InterfaceTapConfigurationsClientListResponse struct { - InterfaceTapConfigurationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfaceTapConfigurationsClientListResult contains the result from method InterfaceTapConfigurationsClient.List. -type InterfaceTapConfigurationsClientListResult struct { InterfaceTapConfigurationListResult } -// InterfacesClientCreateOrUpdatePollerResponse contains the response from method InterfacesClient.CreateOrUpdate. -type InterfacesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfacesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfacesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfacesClientCreateOrUpdateResponse, error) { - respType := InterfacesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Interface) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfacesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *InterfacesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *InterfacesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfacesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &InterfacesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfacesClientCreateOrUpdateResponse contains the response from method InterfacesClient.CreateOrUpdate. type InterfacesClientCreateOrUpdateResponse struct { - InterfacesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientCreateOrUpdateResult contains the result from method InterfacesClient.CreateOrUpdate. -type InterfacesClientCreateOrUpdateResult struct { Interface } -// InterfacesClientDeletePollerResponse contains the response from method InterfacesClient.Delete. -type InterfacesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfacesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfacesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfacesClientDeleteResponse, error) { - respType := InterfacesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfacesClientDeletePollerResponse from the provided client and resume token. -func (l *InterfacesClientDeletePollerResponse) Resume(ctx context.Context, client *InterfacesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfacesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &InterfacesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfacesClientDeleteResponse contains the response from method InterfacesClient.Delete. type InterfacesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // InterfacesClientGetCloudServiceNetworkInterfaceResponse contains the response from method InterfacesClient.GetCloudServiceNetworkInterface. type InterfacesClientGetCloudServiceNetworkInterfaceResponse struct { - InterfacesClientGetCloudServiceNetworkInterfaceResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientGetCloudServiceNetworkInterfaceResult contains the result from method InterfacesClient.GetCloudServiceNetworkInterface. -type InterfacesClientGetCloudServiceNetworkInterfaceResult struct { Interface } -// InterfacesClientGetEffectiveRouteTablePollerResponse contains the response from method InterfacesClient.GetEffectiveRouteTable. -type InterfacesClientGetEffectiveRouteTablePollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfacesClientGetEffectiveRouteTablePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfacesClientGetEffectiveRouteTablePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfacesClientGetEffectiveRouteTableResponse, error) { - respType := InterfacesClientGetEffectiveRouteTableResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.EffectiveRouteListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfacesClientGetEffectiveRouteTablePollerResponse from the provided client and resume token. -func (l *InterfacesClientGetEffectiveRouteTablePollerResponse) Resume(ctx context.Context, client *InterfacesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfacesClient.GetEffectiveRouteTable", token, client.pl) - if err != nil { - return err - } - poller := &InterfacesClientGetEffectiveRouteTablePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfacesClientGetEffectiveRouteTableResponse contains the response from method InterfacesClient.GetEffectiveRouteTable. type InterfacesClientGetEffectiveRouteTableResponse struct { - InterfacesClientGetEffectiveRouteTableResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientGetEffectiveRouteTableResult contains the result from method InterfacesClient.GetEffectiveRouteTable. -type InterfacesClientGetEffectiveRouteTableResult struct { EffectiveRouteListResult } // InterfacesClientGetResponse contains the response from method InterfacesClient.Get. type InterfacesClientGetResponse struct { - InterfacesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientGetResult contains the result from method InterfacesClient.Get. -type InterfacesClientGetResult struct { Interface } // InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetIPConfiguration. type InterfacesClientGetVirtualMachineScaleSetIPConfigurationResponse struct { - InterfacesClientGetVirtualMachineScaleSetIPConfigurationResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientGetVirtualMachineScaleSetIPConfigurationResult contains the result from method InterfacesClient.GetVirtualMachineScaleSetIPConfiguration. -type InterfacesClientGetVirtualMachineScaleSetIPConfigurationResult struct { InterfaceIPConfiguration } // InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse contains the response from method InterfacesClient.GetVirtualMachineScaleSetNetworkInterface. type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResponse struct { - InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult contains the result from method InterfacesClient.GetVirtualMachineScaleSetNetworkInterface. -type InterfacesClientGetVirtualMachineScaleSetNetworkInterfaceResult struct { Interface } // InterfacesClientListAllResponse contains the response from method InterfacesClient.ListAll. type InterfacesClientListAllResponse struct { - InterfacesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListAllResult contains the result from method InterfacesClient.ListAll. -type InterfacesClientListAllResult struct { InterfaceListResult } // InterfacesClientListCloudServiceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceNetworkInterfaces. type InterfacesClientListCloudServiceNetworkInterfacesResponse struct { - InterfacesClientListCloudServiceNetworkInterfacesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListCloudServiceNetworkInterfacesResult contains the result from method InterfacesClient.ListCloudServiceNetworkInterfaces. -type InterfacesClientListCloudServiceNetworkInterfacesResult struct { InterfaceListResult } // InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse contains the response from method InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces. type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResponse struct { - InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResult contains the result from method InterfacesClient.ListCloudServiceRoleInstanceNetworkInterfaces. -type InterfacesClientListCloudServiceRoleInstanceNetworkInterfacesResult struct { InterfaceListResult } -// InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse contains the response from method InterfacesClient.ListEffectiveNetworkSecurityGroups. -type InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse struct { - // Poller contains an initialized poller. - Poller *InterfacesClientListEffectiveNetworkSecurityGroupsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (InterfacesClientListEffectiveNetworkSecurityGroupsResponse, error) { - respType := InterfacesClientListEffectiveNetworkSecurityGroupsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.EffectiveNetworkSecurityGroupListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse from the provided client and resume -// token. -func (l *InterfacesClientListEffectiveNetworkSecurityGroupsPollerResponse) Resume(ctx context.Context, client *InterfacesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("InterfacesClient.ListEffectiveNetworkSecurityGroups", token, client.pl) - if err != nil { - return err - } - poller := &InterfacesClientListEffectiveNetworkSecurityGroupsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // InterfacesClientListEffectiveNetworkSecurityGroupsResponse contains the response from method InterfacesClient.ListEffectiveNetworkSecurityGroups. type InterfacesClientListEffectiveNetworkSecurityGroupsResponse struct { - InterfacesClientListEffectiveNetworkSecurityGroupsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListEffectiveNetworkSecurityGroupsResult contains the result from method InterfacesClient.ListEffectiveNetworkSecurityGroups. -type InterfacesClientListEffectiveNetworkSecurityGroupsResult struct { EffectiveNetworkSecurityGroupListResult } // InterfacesClientListResponse contains the response from method InterfacesClient.List. type InterfacesClientListResponse struct { - InterfacesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListResult contains the result from method InterfacesClient.List. -type InterfacesClientListResult struct { InterfaceListResult } // InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetIPConfigurations. type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResponse struct { - InterfacesClientListVirtualMachineScaleSetIPConfigurationsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListVirtualMachineScaleSetIPConfigurationsResult contains the result from method InterfacesClient.ListVirtualMachineScaleSetIPConfigurations. -type InterfacesClientListVirtualMachineScaleSetIPConfigurationsResult struct { InterfaceIPConfigurationListResult } // InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces. type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResponse struct { - InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResult contains the result from method InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces. -type InterfacesClientListVirtualMachineScaleSetNetworkInterfacesResult struct { InterfaceListResult } // InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse contains the response from method InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces. type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResponse struct { - InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResult contains the result from method InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces. -type InterfacesClientListVirtualMachineScaleSetVMNetworkInterfacesResult struct { InterfaceListResult } // InterfacesClientUpdateTagsResponse contains the response from method InterfacesClient.UpdateTags. type InterfacesClientUpdateTagsResponse struct { - InterfacesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// InterfacesClientUpdateTagsResult contains the result from method InterfacesClient.UpdateTags. -type InterfacesClientUpdateTagsResult struct { Interface } -// LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse contains the response from method LoadBalancerBackendAddressPoolsClient.CreateOrUpdate. -type LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse, error) { - respType := LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BackendAddressPool) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *LoadBalancerBackendAddressPoolsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *LoadBalancerBackendAddressPoolsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancerBackendAddressPoolsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancerBackendAddressPoolsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse contains the response from method LoadBalancerBackendAddressPoolsClient.CreateOrUpdate. type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResponse struct { - LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult contains the result from method LoadBalancerBackendAddressPoolsClient.CreateOrUpdate. -type LoadBalancerBackendAddressPoolsClientCreateOrUpdateResult struct { BackendAddressPool } -// LoadBalancerBackendAddressPoolsClientDeletePollerResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Delete. -type LoadBalancerBackendAddressPoolsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancerBackendAddressPoolsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancerBackendAddressPoolsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancerBackendAddressPoolsClientDeleteResponse, error) { - respType := LoadBalancerBackendAddressPoolsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancerBackendAddressPoolsClientDeletePollerResponse from the provided client and resume token. -func (l *LoadBalancerBackendAddressPoolsClientDeletePollerResponse) Resume(ctx context.Context, client *LoadBalancerBackendAddressPoolsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancerBackendAddressPoolsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancerBackendAddressPoolsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancerBackendAddressPoolsClientDeleteResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Delete. type LoadBalancerBackendAddressPoolsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // LoadBalancerBackendAddressPoolsClientGetResponse contains the response from method LoadBalancerBackendAddressPoolsClient.Get. type LoadBalancerBackendAddressPoolsClientGetResponse struct { - LoadBalancerBackendAddressPoolsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerBackendAddressPoolsClientGetResult contains the result from method LoadBalancerBackendAddressPoolsClient.Get. -type LoadBalancerBackendAddressPoolsClientGetResult struct { BackendAddressPool } // LoadBalancerBackendAddressPoolsClientListResponse contains the response from method LoadBalancerBackendAddressPoolsClient.List. type LoadBalancerBackendAddressPoolsClientListResponse struct { - LoadBalancerBackendAddressPoolsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerBackendAddressPoolsClientListResult contains the result from method LoadBalancerBackendAddressPoolsClient.List. -type LoadBalancerBackendAddressPoolsClientListResult struct { LoadBalancerBackendAddressPoolListResult } // LoadBalancerFrontendIPConfigurationsClientGetResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.Get. type LoadBalancerFrontendIPConfigurationsClientGetResponse struct { - LoadBalancerFrontendIPConfigurationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerFrontendIPConfigurationsClientGetResult contains the result from method LoadBalancerFrontendIPConfigurationsClient.Get. -type LoadBalancerFrontendIPConfigurationsClientGetResult struct { FrontendIPConfiguration } // LoadBalancerFrontendIPConfigurationsClientListResponse contains the response from method LoadBalancerFrontendIPConfigurationsClient.List. type LoadBalancerFrontendIPConfigurationsClientListResponse struct { - LoadBalancerFrontendIPConfigurationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerFrontendIPConfigurationsClientListResult contains the result from method LoadBalancerFrontendIPConfigurationsClient.List. -type LoadBalancerFrontendIPConfigurationsClientListResult struct { LoadBalancerFrontendIPConfigurationListResult } // LoadBalancerLoadBalancingRulesClientGetResponse contains the response from method LoadBalancerLoadBalancingRulesClient.Get. type LoadBalancerLoadBalancingRulesClientGetResponse struct { - LoadBalancerLoadBalancingRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerLoadBalancingRulesClientGetResult contains the result from method LoadBalancerLoadBalancingRulesClient.Get. -type LoadBalancerLoadBalancingRulesClientGetResult struct { LoadBalancingRule } // LoadBalancerLoadBalancingRulesClientListResponse contains the response from method LoadBalancerLoadBalancingRulesClient.List. type LoadBalancerLoadBalancingRulesClientListResponse struct { - LoadBalancerLoadBalancingRulesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerLoadBalancingRulesClientListResult contains the result from method LoadBalancerLoadBalancingRulesClient.List. -type LoadBalancerLoadBalancingRulesClientListResult struct { LoadBalancerLoadBalancingRuleListResult } // LoadBalancerNetworkInterfacesClientListResponse contains the response from method LoadBalancerNetworkInterfacesClient.List. type LoadBalancerNetworkInterfacesClientListResponse struct { - LoadBalancerNetworkInterfacesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerNetworkInterfacesClientListResult contains the result from method LoadBalancerNetworkInterfacesClient.List. -type LoadBalancerNetworkInterfacesClientListResult struct { - InterfaceListResult + InterfaceListResult } // LoadBalancerOutboundRulesClientGetResponse contains the response from method LoadBalancerOutboundRulesClient.Get. type LoadBalancerOutboundRulesClientGetResponse struct { - LoadBalancerOutboundRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerOutboundRulesClientGetResult contains the result from method LoadBalancerOutboundRulesClient.Get. -type LoadBalancerOutboundRulesClientGetResult struct { OutboundRule } // LoadBalancerOutboundRulesClientListResponse contains the response from method LoadBalancerOutboundRulesClient.List. type LoadBalancerOutboundRulesClientListResponse struct { - LoadBalancerOutboundRulesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerOutboundRulesClientListResult contains the result from method LoadBalancerOutboundRulesClient.List. -type LoadBalancerOutboundRulesClientListResult struct { LoadBalancerOutboundRuleListResult } // LoadBalancerProbesClientGetResponse contains the response from method LoadBalancerProbesClient.Get. type LoadBalancerProbesClientGetResponse struct { - LoadBalancerProbesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerProbesClientGetResult contains the result from method LoadBalancerProbesClient.Get. -type LoadBalancerProbesClientGetResult struct { Probe } // LoadBalancerProbesClientListResponse contains the response from method LoadBalancerProbesClient.List. type LoadBalancerProbesClientListResponse struct { - LoadBalancerProbesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancerProbesClientListResult contains the result from method LoadBalancerProbesClient.List. -type LoadBalancerProbesClientListResult struct { LoadBalancerProbeListResult } -// LoadBalancersClientCreateOrUpdatePollerResponse contains the response from method LoadBalancersClient.CreateOrUpdate. -type LoadBalancersClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancersClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancersClientCreateOrUpdateResponse, error) { - respType := LoadBalancersClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.LoadBalancer) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancersClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *LoadBalancersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *LoadBalancersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancersClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancersClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.CreateOrUpdate. type LoadBalancersClientCreateOrUpdateResponse struct { - LoadBalancersClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientCreateOrUpdateResult contains the result from method LoadBalancersClient.CreateOrUpdate. -type LoadBalancersClientCreateOrUpdateResult struct { LoadBalancer } -// LoadBalancersClientDeletePollerResponse contains the response from method LoadBalancersClient.Delete. -type LoadBalancersClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancersClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancersClientDeleteResponse, error) { - respType := LoadBalancersClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancersClientDeletePollerResponse from the provided client and resume token. -func (l *LoadBalancersClientDeletePollerResponse) Resume(ctx context.Context, client *LoadBalancersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancersClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancersClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.Delete. type LoadBalancersClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // LoadBalancersClientGetResponse contains the response from method LoadBalancersClient.Get. type LoadBalancersClientGetResponse struct { - LoadBalancersClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientGetResult contains the result from method LoadBalancersClient.Get. -type LoadBalancersClientGetResult struct { LoadBalancer } // LoadBalancersClientListAllResponse contains the response from method LoadBalancersClient.ListAll. type LoadBalancersClientListAllResponse struct { - LoadBalancersClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientListAllResult contains the result from method LoadBalancersClient.ListAll. -type LoadBalancersClientListAllResult struct { LoadBalancerListResult } -// LoadBalancersClientListInboundNatRulePortMappingsPollerResponse contains the response from method LoadBalancersClient.ListInboundNatRulePortMappings. -type LoadBalancersClientListInboundNatRulePortMappingsPollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancersClientListInboundNatRulePortMappingsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancersClientListInboundNatRulePortMappingsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancersClientListInboundNatRulePortMappingsResponse, error) { - respType := LoadBalancersClientListInboundNatRulePortMappingsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BackendAddressInboundNatRulePortMappings) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancersClientListInboundNatRulePortMappingsPollerResponse from the provided client and resume -// token. -func (l *LoadBalancersClientListInboundNatRulePortMappingsPollerResponse) Resume(ctx context.Context, client *LoadBalancersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancersClient.ListInboundNatRulePortMappings", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancersClientListInboundNatRulePortMappingsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancersClientListInboundNatRulePortMappingsResponse contains the response from method LoadBalancersClient.ListInboundNatRulePortMappings. type LoadBalancersClientListInboundNatRulePortMappingsResponse struct { - LoadBalancersClientListInboundNatRulePortMappingsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientListInboundNatRulePortMappingsResult contains the result from method LoadBalancersClient.ListInboundNatRulePortMappings. -type LoadBalancersClientListInboundNatRulePortMappingsResult struct { BackendAddressInboundNatRulePortMappings } // LoadBalancersClientListResponse contains the response from method LoadBalancersClient.List. type LoadBalancersClientListResponse struct { - LoadBalancersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientListResult contains the result from method LoadBalancersClient.List. -type LoadBalancersClientListResult struct { LoadBalancerListResult } -// LoadBalancersClientSwapPublicIPAddressesPollerResponse contains the response from method LoadBalancersClient.SwapPublicIPAddresses. -type LoadBalancersClientSwapPublicIPAddressesPollerResponse struct { - // Poller contains an initialized poller. - Poller *LoadBalancersClientSwapPublicIPAddressesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LoadBalancersClientSwapPublicIPAddressesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LoadBalancersClientSwapPublicIPAddressesResponse, error) { - respType := LoadBalancersClientSwapPublicIPAddressesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LoadBalancersClientSwapPublicIPAddressesPollerResponse from the provided client and resume token. -func (l *LoadBalancersClientSwapPublicIPAddressesPollerResponse) Resume(ctx context.Context, client *LoadBalancersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LoadBalancersClient.SwapPublicIPAddresses", token, client.pl) - if err != nil { - return err - } - poller := &LoadBalancersClientSwapPublicIPAddressesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LoadBalancersClientSwapPublicIPAddressesResponse contains the response from method LoadBalancersClient.SwapPublicIPAddresses. type LoadBalancersClientSwapPublicIPAddressesResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // LoadBalancersClientUpdateTagsResponse contains the response from method LoadBalancersClient.UpdateTags. type LoadBalancersClientUpdateTagsResponse struct { - LoadBalancersClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LoadBalancersClientUpdateTagsResult contains the result from method LoadBalancersClient.UpdateTags. -type LoadBalancersClientUpdateTagsResult struct { LoadBalancer } -// LocalNetworkGatewaysClientCreateOrUpdatePollerResponse contains the response from method LocalNetworkGatewaysClient.CreateOrUpdate. -type LocalNetworkGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *LocalNetworkGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LocalNetworkGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LocalNetworkGatewaysClientCreateOrUpdateResponse, error) { - respType := LocalNetworkGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.LocalNetworkGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LocalNetworkGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *LocalNetworkGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *LocalNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LocalNetworkGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &LocalNetworkGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LocalNetworkGatewaysClientCreateOrUpdateResponse contains the response from method LocalNetworkGatewaysClient.CreateOrUpdate. type LocalNetworkGatewaysClientCreateOrUpdateResponse struct { - LocalNetworkGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LocalNetworkGatewaysClientCreateOrUpdateResult contains the result from method LocalNetworkGatewaysClient.CreateOrUpdate. -type LocalNetworkGatewaysClientCreateOrUpdateResult struct { LocalNetworkGateway } -// LocalNetworkGatewaysClientDeletePollerResponse contains the response from method LocalNetworkGatewaysClient.Delete. -type LocalNetworkGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *LocalNetworkGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l LocalNetworkGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (LocalNetworkGatewaysClientDeleteResponse, error) { - respType := LocalNetworkGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a LocalNetworkGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *LocalNetworkGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *LocalNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("LocalNetworkGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &LocalNetworkGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // LocalNetworkGatewaysClientDeleteResponse contains the response from method LocalNetworkGatewaysClient.Delete. type LocalNetworkGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // LocalNetworkGatewaysClientGetResponse contains the response from method LocalNetworkGatewaysClient.Get. type LocalNetworkGatewaysClientGetResponse struct { - LocalNetworkGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LocalNetworkGatewaysClientGetResult contains the result from method LocalNetworkGatewaysClient.Get. -type LocalNetworkGatewaysClientGetResult struct { LocalNetworkGateway } // LocalNetworkGatewaysClientListResponse contains the response from method LocalNetworkGatewaysClient.List. type LocalNetworkGatewaysClientListResponse struct { - LocalNetworkGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LocalNetworkGatewaysClientListResult contains the result from method LocalNetworkGatewaysClient.List. -type LocalNetworkGatewaysClientListResult struct { LocalNetworkGatewayListResult } // LocalNetworkGatewaysClientUpdateTagsResponse contains the response from method LocalNetworkGatewaysClient.UpdateTags. type LocalNetworkGatewaysClientUpdateTagsResponse struct { - LocalNetworkGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// LocalNetworkGatewaysClientUpdateTagsResult contains the result from method LocalNetworkGatewaysClient.UpdateTags. -type LocalNetworkGatewaysClientUpdateTagsResult struct { LocalNetworkGateway } // ManagementClientCheckDNSNameAvailabilityResponse contains the response from method ManagementClient.CheckDNSNameAvailability. type ManagementClientCheckDNSNameAvailabilityResponse struct { - ManagementClientCheckDNSNameAvailabilityResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientCheckDNSNameAvailabilityResult contains the result from method ManagementClient.CheckDNSNameAvailability. -type ManagementClientCheckDNSNameAvailabilityResult struct { DNSNameAvailabilityResult } -// ManagementClientDeleteBastionShareableLinkPollerResponse contains the response from method ManagementClient.DeleteBastionShareableLink. -type ManagementClientDeleteBastionShareableLinkPollerResponse struct { - // Poller contains an initialized poller. - Poller *ManagementClientDeleteBastionShareableLinkPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ManagementClientDeleteBastionShareableLinkPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ManagementClientDeleteBastionShareableLinkResponse, error) { - respType := ManagementClientDeleteBastionShareableLinkResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ManagementClientDeleteBastionShareableLinkPollerResponse from the provided client and resume token. -func (l *ManagementClientDeleteBastionShareableLinkPollerResponse) Resume(ctx context.Context, client *ManagementClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ManagementClient.DeleteBastionShareableLink", token, client.pl) - if err != nil { - return err - } - poller := &ManagementClientDeleteBastionShareableLinkPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ManagementClientDeleteBastionShareableLinkResponse contains the response from method ManagementClient.DeleteBastionShareableLink. type ManagementClientDeleteBastionShareableLinkResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ManagementClientDisconnectActiveSessionsResponse contains the response from method ManagementClient.DisconnectActiveSessions. type ManagementClientDisconnectActiveSessionsResponse struct { - ManagementClientDisconnectActiveSessionsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientDisconnectActiveSessionsResult contains the result from method ManagementClient.DisconnectActiveSessions. -type ManagementClientDisconnectActiveSessionsResult struct { BastionSessionDeleteResult } -// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse contains the response from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. -type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse struct { - // Poller contains an initialized poller. - Poller *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse, error) { - respType := ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNProfileResponse) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse from the provided -// client and resume token. -func (l *ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePollerResponse) Resume(ctx context.Context, client *ManagementClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile", token, client.pl) - if err != nil { - return err - } - poller := &ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofilePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse contains the response from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResponse struct { - ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult contains the result from method ManagementClient.Generatevirtualwanvpnserverconfigurationvpnprofile. -type ManagementClientGeneratevirtualwanvpnserverconfigurationvpnprofileResult struct { VPNProfileResponse } -// ManagementClientGetActiveSessionsPollerResponse contains the response from method ManagementClient.GetActiveSessions. -type ManagementClientGetActiveSessionsPollerResponse struct { - // Poller contains an initialized poller. - Poller *ManagementClientGetActiveSessionsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ManagementClientGetActiveSessionsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (*ManagementClientGetActiveSessionsPager, error) { - respType := &ManagementClientGetActiveSessionsPager{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.current.BastionActiveSessionListResult) - if err != nil { - return respType, err - } - respType.current.RawResponse = resp - respType.client = l.Poller.client - return respType, nil -} - -// Resume rehydrates a ManagementClientGetActiveSessionsPollerResponse from the provided client and resume token. -func (l *ManagementClientGetActiveSessionsPollerResponse) Resume(ctx context.Context, client *ManagementClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ManagementClient.GetActiveSessions", token, client.pl) - if err != nil { - return err - } - poller := &ManagementClientGetActiveSessionsPoller{ - pt: pt, - client: client, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ManagementClientGetActiveSessionsResponse contains the response from method ManagementClient.GetActiveSessions. type ManagementClientGetActiveSessionsResponse struct { - ManagementClientGetActiveSessionsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientGetActiveSessionsResult contains the result from method ManagementClient.GetActiveSessions. -type ManagementClientGetActiveSessionsResult struct { BastionActiveSessionListResult } // ManagementClientGetBastionShareableLinkResponse contains the response from method ManagementClient.GetBastionShareableLink. type ManagementClientGetBastionShareableLinkResponse struct { - ManagementClientGetBastionShareableLinkResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientGetBastionShareableLinkResult contains the result from method ManagementClient.GetBastionShareableLink. -type ManagementClientGetBastionShareableLinkResult struct { BastionShareableLinkListResult } -// ManagementClientPutBastionShareableLinkPollerResponse contains the response from method ManagementClient.PutBastionShareableLink. -type ManagementClientPutBastionShareableLinkPollerResponse struct { - // Poller contains an initialized poller. - Poller *ManagementClientPutBastionShareableLinkPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ManagementClientPutBastionShareableLinkPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (*ManagementClientPutBastionShareableLinkPager, error) { - respType := &ManagementClientPutBastionShareableLinkPager{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.current.BastionShareableLinkListResult) - if err != nil { - return respType, err - } - respType.current.RawResponse = resp - respType.client = l.Poller.client - return respType, nil -} - -// Resume rehydrates a ManagementClientPutBastionShareableLinkPollerResponse from the provided client and resume token. -func (l *ManagementClientPutBastionShareableLinkPollerResponse) Resume(ctx context.Context, client *ManagementClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ManagementClient.PutBastionShareableLink", token, client.pl) - if err != nil { - return err - } - poller := &ManagementClientPutBastionShareableLinkPoller{ - pt: pt, - client: client, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ManagementClientPutBastionShareableLinkResponse contains the response from method ManagementClient.PutBastionShareableLink. type ManagementClientPutBastionShareableLinkResponse struct { - ManagementClientPutBastionShareableLinkResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientPutBastionShareableLinkResult contains the result from method ManagementClient.PutBastionShareableLink. -type ManagementClientPutBastionShareableLinkResult struct { BastionShareableLinkListResult } // ManagementClientSupportedSecurityProvidersResponse contains the response from method ManagementClient.SupportedSecurityProviders. type ManagementClientSupportedSecurityProvidersResponse struct { - ManagementClientSupportedSecurityProvidersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ManagementClientSupportedSecurityProvidersResult contains the result from method ManagementClient.SupportedSecurityProviders. -type ManagementClientSupportedSecurityProvidersResult struct { VirtualWanSecurityProviders } -// NatGatewaysClientCreateOrUpdatePollerResponse contains the response from method NatGatewaysClient.CreateOrUpdate. -type NatGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *NatGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l NatGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (NatGatewaysClientCreateOrUpdateResponse, error) { - respType := NatGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.NatGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a NatGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *NatGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *NatGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("NatGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &NatGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // NatGatewaysClientCreateOrUpdateResponse contains the response from method NatGatewaysClient.CreateOrUpdate. type NatGatewaysClientCreateOrUpdateResponse struct { - NatGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatGatewaysClientCreateOrUpdateResult contains the result from method NatGatewaysClient.CreateOrUpdate. -type NatGatewaysClientCreateOrUpdateResult struct { NatGateway } -// NatGatewaysClientDeletePollerResponse contains the response from method NatGatewaysClient.Delete. -type NatGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *NatGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l NatGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (NatGatewaysClientDeleteResponse, error) { - respType := NatGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a NatGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *NatGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *NatGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("NatGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &NatGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // NatGatewaysClientDeleteResponse contains the response from method NatGatewaysClient.Delete. type NatGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // NatGatewaysClientGetResponse contains the response from method NatGatewaysClient.Get. type NatGatewaysClientGetResponse struct { - NatGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatGatewaysClientGetResult contains the result from method NatGatewaysClient.Get. -type NatGatewaysClientGetResult struct { NatGateway } // NatGatewaysClientListAllResponse contains the response from method NatGatewaysClient.ListAll. type NatGatewaysClientListAllResponse struct { - NatGatewaysClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatGatewaysClientListAllResult contains the result from method NatGatewaysClient.ListAll. -type NatGatewaysClientListAllResult struct { NatGatewayListResult } // NatGatewaysClientListResponse contains the response from method NatGatewaysClient.List. type NatGatewaysClientListResponse struct { - NatGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatGatewaysClientListResult contains the result from method NatGatewaysClient.List. -type NatGatewaysClientListResult struct { NatGatewayListResult } // NatGatewaysClientUpdateTagsResponse contains the response from method NatGatewaysClient.UpdateTags. type NatGatewaysClientUpdateTagsResponse struct { - NatGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatGatewaysClientUpdateTagsResult contains the result from method NatGatewaysClient.UpdateTags. -type NatGatewaysClientUpdateTagsResult struct { NatGateway } -// NatRulesClientCreateOrUpdatePollerResponse contains the response from method NatRulesClient.CreateOrUpdate. -type NatRulesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *NatRulesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l NatRulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (NatRulesClientCreateOrUpdateResponse, error) { - respType := NatRulesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNGatewayNatRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a NatRulesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *NatRulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *NatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("NatRulesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &NatRulesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // NatRulesClientCreateOrUpdateResponse contains the response from method NatRulesClient.CreateOrUpdate. type NatRulesClientCreateOrUpdateResponse struct { - NatRulesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatRulesClientCreateOrUpdateResult contains the result from method NatRulesClient.CreateOrUpdate. -type NatRulesClientCreateOrUpdateResult struct { VPNGatewayNatRule } -// NatRulesClientDeletePollerResponse contains the response from method NatRulesClient.Delete. -type NatRulesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *NatRulesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l NatRulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (NatRulesClientDeleteResponse, error) { - respType := NatRulesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a NatRulesClientDeletePollerResponse from the provided client and resume token. -func (l *NatRulesClientDeletePollerResponse) Resume(ctx context.Context, client *NatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("NatRulesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &NatRulesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // NatRulesClientDeleteResponse contains the response from method NatRulesClient.Delete. type NatRulesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // NatRulesClientGetResponse contains the response from method NatRulesClient.Get. type NatRulesClientGetResponse struct { - NatRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatRulesClientGetResult contains the result from method NatRulesClient.Get. -type NatRulesClientGetResult struct { VPNGatewayNatRule } // NatRulesClientListByVPNGatewayResponse contains the response from method NatRulesClient.ListByVPNGateway. type NatRulesClientListByVPNGatewayResponse struct { - NatRulesClientListByVPNGatewayResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// NatRulesClientListByVPNGatewayResult contains the result from method NatRulesClient.ListByVPNGateway. -type NatRulesClientListByVPNGatewayResult struct { ListVPNGatewayNatRulesResult } // OperationsClientListResponse contains the response from method OperationsClient.List. type OperationsClientListResponse struct { - OperationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// OperationsClientListResult contains the result from method OperationsClient.List. -type OperationsClientListResult struct { OperationListResult } -// P2SVPNGatewaysClientCreateOrUpdatePollerResponse contains the response from method P2SVPNGatewaysClient.CreateOrUpdate. -type P2SVPNGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientCreateOrUpdateResponse, error) { - respType := P2SVPNGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.P2SVPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientCreateOrUpdateResponse contains the response from method P2SVPNGatewaysClient.CreateOrUpdate. type P2SVPNGatewaysClientCreateOrUpdateResponse struct { - P2SVPNGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientCreateOrUpdateResult contains the result from method P2SVPNGatewaysClient.CreateOrUpdate. -type P2SVPNGatewaysClientCreateOrUpdateResult struct { P2SVPNGateway } -// P2SVPNGatewaysClientDeletePollerResponse contains the response from method P2SVPNGatewaysClient.Delete. -type P2SVPNGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientDeleteResponse, error) { - respType := P2SVPNGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientDeleteResponse contains the response from method P2SVPNGatewaysClient.Delete. type P2SVPNGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse contains the response from method P2SVPNGatewaysClient.DisconnectP2SVPNConnections. -type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse, error) { - respType := P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.DisconnectP2SVPNConnections", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientDisconnectP2SVPNConnectionsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse contains the response from method P2SVPNGatewaysClient.DisconnectP2SVPNConnections. type P2SVPNGatewaysClientDisconnectP2SVPNConnectionsResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientGenerateVPNProfilePollerResponse contains the response from method P2SVPNGatewaysClient.GenerateVPNProfile. -type P2SVPNGatewaysClientGenerateVPNProfilePollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientGenerateVPNProfilePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientGenerateVPNProfilePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientGenerateVPNProfileResponse, error) { - respType := P2SVPNGatewaysClientGenerateVPNProfileResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNProfileResponse) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientGenerateVPNProfilePollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientGenerateVPNProfilePollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.GenerateVPNProfile", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientGenerateVPNProfilePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // P2SVPNGatewaysClientGenerateVPNProfileResponse contains the response from method P2SVPNGatewaysClient.GenerateVPNProfile. type P2SVPNGatewaysClientGenerateVPNProfileResponse struct { - P2SVPNGatewaysClientGenerateVPNProfileResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientGenerateVPNProfileResult contains the result from method P2SVPNGatewaysClient.GenerateVPNProfile. -type P2SVPNGatewaysClientGenerateVPNProfileResult struct { VPNProfileResponse } -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse, error) { - respType := P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.P2SVPNConnectionHealth) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse from the provided client and resume -// token. -func (l *P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResponse struct { - P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResult contains the result from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealthDetailed. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthDetailedResult struct { P2SVPNConnectionHealth } -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealth. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse, error) { - respType := P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.P2SVPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientGetP2SVPNConnectionHealthPollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.GetP2SVPNConnectionHealth", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientGetP2SVPNConnectionHealthPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse contains the response from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealth. type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResponse struct { - P2SVPNGatewaysClientGetP2SVPNConnectionHealthResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientGetP2SVPNConnectionHealthResult contains the result from method P2SVPNGatewaysClient.GetP2SVPNConnectionHealth. -type P2SVPNGatewaysClientGetP2SVPNConnectionHealthResult struct { P2SVPNGateway } // P2SVPNGatewaysClientGetResponse contains the response from method P2SVPNGatewaysClient.Get. type P2SVPNGatewaysClientGetResponse struct { - P2SVPNGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientGetResult contains the result from method P2SVPNGatewaysClient.Get. -type P2SVPNGatewaysClientGetResult struct { P2SVPNGateway } // P2SVPNGatewaysClientListByResourceGroupResponse contains the response from method P2SVPNGatewaysClient.ListByResourceGroup. type P2SVPNGatewaysClientListByResourceGroupResponse struct { - P2SVPNGatewaysClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientListByResourceGroupResult contains the result from method P2SVPNGatewaysClient.ListByResourceGroup. -type P2SVPNGatewaysClientListByResourceGroupResult struct { ListP2SVPNGatewaysResult } // P2SVPNGatewaysClientListResponse contains the response from method P2SVPNGatewaysClient.List. type P2SVPNGatewaysClientListResponse struct { - P2SVPNGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientListResult contains the result from method P2SVPNGatewaysClient.List. -type P2SVPNGatewaysClientListResult struct { ListP2SVPNGatewaysResult } -// P2SVPNGatewaysClientResetPollerResponse contains the response from method P2SVPNGatewaysClient.Reset. -type P2SVPNGatewaysClientResetPollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientResetPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientResetPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientResetResponse, error) { - respType := P2SVPNGatewaysClientResetResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.P2SVPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientResetPollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientResetPollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.Reset", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientResetPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientResetResponse contains the response from method P2SVPNGatewaysClient.Reset. type P2SVPNGatewaysClientResetResponse struct { - P2SVPNGatewaysClientResetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientResetResult contains the result from method P2SVPNGatewaysClient.Reset. -type P2SVPNGatewaysClientResetResult struct { P2SVPNGateway } -// P2SVPNGatewaysClientUpdateTagsPollerResponse contains the response from method P2SVPNGatewaysClient.UpdateTags. -type P2SVPNGatewaysClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *P2SVPNGatewaysClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l P2SVPNGatewaysClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (P2SVPNGatewaysClientUpdateTagsResponse, error) { - respType := P2SVPNGatewaysClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.P2SVPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a P2SVPNGatewaysClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *P2SVPNGatewaysClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *P2SVPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("P2SVPNGatewaysClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &P2SVPNGatewaysClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // P2SVPNGatewaysClientUpdateTagsResponse contains the response from method P2SVPNGatewaysClient.UpdateTags. type P2SVPNGatewaysClientUpdateTagsResponse struct { - P2SVPNGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// P2SVPNGatewaysClientUpdateTagsResult contains the result from method P2SVPNGatewaysClient.UpdateTags. -type P2SVPNGatewaysClientUpdateTagsResult struct { P2SVPNGateway } -// PacketCapturesClientCreatePollerResponse contains the response from method PacketCapturesClient.Create. -type PacketCapturesClientCreatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PacketCapturesClientCreatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PacketCapturesClientCreatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PacketCapturesClientCreateResponse, error) { - respType := PacketCapturesClientCreateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PacketCaptureResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PacketCapturesClientCreatePollerResponse from the provided client and resume token. -func (l *PacketCapturesClientCreatePollerResponse) Resume(ctx context.Context, client *PacketCapturesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PacketCapturesClient.Create", token, client.pl) - if err != nil { - return err - } - poller := &PacketCapturesClientCreatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PacketCapturesClientCreateResponse contains the response from method PacketCapturesClient.Create. type PacketCapturesClientCreateResponse struct { - PacketCapturesClientCreateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PacketCapturesClientCreateResult contains the result from method PacketCapturesClient.Create. -type PacketCapturesClientCreateResult struct { PacketCaptureResult } -// PacketCapturesClientDeletePollerResponse contains the response from method PacketCapturesClient.Delete. -type PacketCapturesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PacketCapturesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PacketCapturesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PacketCapturesClientDeleteResponse, error) { - respType := PacketCapturesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PacketCapturesClientDeletePollerResponse from the provided client and resume token. -func (l *PacketCapturesClientDeletePollerResponse) Resume(ctx context.Context, client *PacketCapturesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PacketCapturesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PacketCapturesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PacketCapturesClientDeleteResponse contains the response from method PacketCapturesClient.Delete. type PacketCapturesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PacketCapturesClientGetResponse contains the response from method PacketCapturesClient.Get. type PacketCapturesClientGetResponse struct { - PacketCapturesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PacketCapturesClientGetResult contains the result from method PacketCapturesClient.Get. -type PacketCapturesClientGetResult struct { PacketCaptureResult } -// PacketCapturesClientGetStatusPollerResponse contains the response from method PacketCapturesClient.GetStatus. -type PacketCapturesClientGetStatusPollerResponse struct { - // Poller contains an initialized poller. - Poller *PacketCapturesClientGetStatusPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PacketCapturesClientGetStatusPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PacketCapturesClientGetStatusResponse, error) { - respType := PacketCapturesClientGetStatusResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PacketCaptureQueryStatusResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PacketCapturesClientGetStatusPollerResponse from the provided client and resume token. -func (l *PacketCapturesClientGetStatusPollerResponse) Resume(ctx context.Context, client *PacketCapturesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PacketCapturesClient.GetStatus", token, client.pl) - if err != nil { - return err - } - poller := &PacketCapturesClientGetStatusPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PacketCapturesClientGetStatusResponse contains the response from method PacketCapturesClient.GetStatus. type PacketCapturesClientGetStatusResponse struct { - PacketCapturesClientGetStatusResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PacketCapturesClientGetStatusResult contains the result from method PacketCapturesClient.GetStatus. -type PacketCapturesClientGetStatusResult struct { PacketCaptureQueryStatusResult } // PacketCapturesClientListResponse contains the response from method PacketCapturesClient.List. type PacketCapturesClientListResponse struct { - PacketCapturesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PacketCapturesClientListResult contains the result from method PacketCapturesClient.List. -type PacketCapturesClientListResult struct { PacketCaptureListResult } -// PacketCapturesClientStopPollerResponse contains the response from method PacketCapturesClient.Stop. -type PacketCapturesClientStopPollerResponse struct { - // Poller contains an initialized poller. - Poller *PacketCapturesClientStopPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PacketCapturesClientStopPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PacketCapturesClientStopResponse, error) { - respType := PacketCapturesClientStopResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PacketCapturesClientStopPollerResponse from the provided client and resume token. -func (l *PacketCapturesClientStopPollerResponse) Resume(ctx context.Context, client *PacketCapturesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PacketCapturesClient.Stop", token, client.pl) - if err != nil { - return err - } - poller := &PacketCapturesClientStopPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PacketCapturesClientStopResponse contains the response from method PacketCapturesClient.Stop. type PacketCapturesClientStopResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PeerExpressRouteCircuitConnectionsClientGetResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.Get. type PeerExpressRouteCircuitConnectionsClientGetResponse struct { - PeerExpressRouteCircuitConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PeerExpressRouteCircuitConnectionsClientGetResult contains the result from method PeerExpressRouteCircuitConnectionsClient.Get. -type PeerExpressRouteCircuitConnectionsClientGetResult struct { PeerExpressRouteCircuitConnection } // PeerExpressRouteCircuitConnectionsClientListResponse contains the response from method PeerExpressRouteCircuitConnectionsClient.List. type PeerExpressRouteCircuitConnectionsClientListResponse struct { - PeerExpressRouteCircuitConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PeerExpressRouteCircuitConnectionsClientListResult contains the result from method PeerExpressRouteCircuitConnectionsClient.List. -type PeerExpressRouteCircuitConnectionsClientListResult struct { PeerExpressRouteCircuitConnectionListResult } -// PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse contains the response from method PrivateDNSZoneGroupsClient.CreateOrUpdate. -type PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateDNSZoneGroupsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateDNSZoneGroupsClientCreateOrUpdateResponse, error) { - respType := PrivateDNSZoneGroupsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PrivateDNSZoneGroup) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *PrivateDNSZoneGroupsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *PrivateDNSZoneGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateDNSZoneGroupsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &PrivateDNSZoneGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateDNSZoneGroupsClientCreateOrUpdateResponse contains the response from method PrivateDNSZoneGroupsClient.CreateOrUpdate. type PrivateDNSZoneGroupsClientCreateOrUpdateResponse struct { - PrivateDNSZoneGroupsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateDNSZoneGroupsClientCreateOrUpdateResult contains the result from method PrivateDNSZoneGroupsClient.CreateOrUpdate. -type PrivateDNSZoneGroupsClientCreateOrUpdateResult struct { PrivateDNSZoneGroup } -// PrivateDNSZoneGroupsClientDeletePollerResponse contains the response from method PrivateDNSZoneGroupsClient.Delete. -type PrivateDNSZoneGroupsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateDNSZoneGroupsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateDNSZoneGroupsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateDNSZoneGroupsClientDeleteResponse, error) { - respType := PrivateDNSZoneGroupsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateDNSZoneGroupsClientDeletePollerResponse from the provided client and resume token. -func (l *PrivateDNSZoneGroupsClientDeletePollerResponse) Resume(ctx context.Context, client *PrivateDNSZoneGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateDNSZoneGroupsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PrivateDNSZoneGroupsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateDNSZoneGroupsClientDeleteResponse contains the response from method PrivateDNSZoneGroupsClient.Delete. type PrivateDNSZoneGroupsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PrivateDNSZoneGroupsClientGetResponse contains the response from method PrivateDNSZoneGroupsClient.Get. type PrivateDNSZoneGroupsClientGetResponse struct { - PrivateDNSZoneGroupsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateDNSZoneGroupsClientGetResult contains the result from method PrivateDNSZoneGroupsClient.Get. -type PrivateDNSZoneGroupsClientGetResult struct { PrivateDNSZoneGroup } // PrivateDNSZoneGroupsClientListResponse contains the response from method PrivateDNSZoneGroupsClient.List. type PrivateDNSZoneGroupsClientListResponse struct { - PrivateDNSZoneGroupsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateDNSZoneGroupsClientListResult contains the result from method PrivateDNSZoneGroupsClient.List. -type PrivateDNSZoneGroupsClientListResult struct { PrivateDNSZoneGroupListResult } -// PrivateEndpointsClientCreateOrUpdatePollerResponse contains the response from method PrivateEndpointsClient.CreateOrUpdate. -type PrivateEndpointsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateEndpointsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateEndpointsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateEndpointsClientCreateOrUpdateResponse, error) { - respType := PrivateEndpointsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PrivateEndpoint) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateEndpointsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *PrivateEndpointsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *PrivateEndpointsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateEndpointsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &PrivateEndpointsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateEndpointsClientCreateOrUpdateResponse contains the response from method PrivateEndpointsClient.CreateOrUpdate. type PrivateEndpointsClientCreateOrUpdateResponse struct { - PrivateEndpointsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateEndpointsClientCreateOrUpdateResult contains the result from method PrivateEndpointsClient.CreateOrUpdate. -type PrivateEndpointsClientCreateOrUpdateResult struct { PrivateEndpoint } -// PrivateEndpointsClientDeletePollerResponse contains the response from method PrivateEndpointsClient.Delete. -type PrivateEndpointsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateEndpointsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateEndpointsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateEndpointsClientDeleteResponse, error) { - respType := PrivateEndpointsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateEndpointsClientDeletePollerResponse from the provided client and resume token. -func (l *PrivateEndpointsClientDeletePollerResponse) Resume(ctx context.Context, client *PrivateEndpointsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateEndpointsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PrivateEndpointsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateEndpointsClientDeleteResponse contains the response from method PrivateEndpointsClient.Delete. type PrivateEndpointsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PrivateEndpointsClientGetResponse contains the response from method PrivateEndpointsClient.Get. type PrivateEndpointsClientGetResponse struct { - PrivateEndpointsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateEndpointsClientGetResult contains the result from method PrivateEndpointsClient.Get. -type PrivateEndpointsClientGetResult struct { PrivateEndpoint } // PrivateEndpointsClientListBySubscriptionResponse contains the response from method PrivateEndpointsClient.ListBySubscription. type PrivateEndpointsClientListBySubscriptionResponse struct { - PrivateEndpointsClientListBySubscriptionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateEndpointsClientListBySubscriptionResult contains the result from method PrivateEndpointsClient.ListBySubscription. -type PrivateEndpointsClientListBySubscriptionResult struct { PrivateEndpointListResult } // PrivateEndpointsClientListResponse contains the response from method PrivateEndpointsClient.List. type PrivateEndpointsClientListResponse struct { - PrivateEndpointsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateEndpointsClientListResult contains the result from method PrivateEndpointsClient.List. -type PrivateEndpointsClientListResult struct { PrivateEndpointListResult } -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse contains the response from method -// PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse, error) { - respType := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PrivateLinkServiceVisibility) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse from the provided -// client and resume token. -func (l *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPollerResponse) Resume(ctx context.Context, client *PrivateLinkServicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup", token, client.pl) - if err != nil { - return err - } - poller := &PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResponse struct { - PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult contains the result from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibilityByResourceGroup. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityByResourceGroupResult struct { PrivateLinkServiceVisibility } -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse, error) { - respType := PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PrivateLinkServiceVisibility) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse from the provided client and -// resume token. -func (l *PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPollerResponse) Resume(ctx context.Context, client *PrivateLinkServicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility", token, client.pl) - if err != nil { - return err - } - poller := &PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse contains the response from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility. type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResponse struct { - PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult contains the result from method PrivateLinkServicesClient.CheckPrivateLinkServiceVisibility. -type PrivateLinkServicesClientCheckPrivateLinkServiceVisibilityResult struct { PrivateLinkServiceVisibility } -// PrivateLinkServicesClientCreateOrUpdatePollerResponse contains the response from method PrivateLinkServicesClient.CreateOrUpdate. -type PrivateLinkServicesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateLinkServicesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateLinkServicesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServicesClientCreateOrUpdateResponse, error) { - respType := PrivateLinkServicesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PrivateLinkService) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateLinkServicesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *PrivateLinkServicesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *PrivateLinkServicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateLinkServicesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &PrivateLinkServicesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateLinkServicesClientCreateOrUpdateResponse contains the response from method PrivateLinkServicesClient.CreateOrUpdate. type PrivateLinkServicesClientCreateOrUpdateResponse struct { - PrivateLinkServicesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientCreateOrUpdateResult contains the result from method PrivateLinkServicesClient.CreateOrUpdate. -type PrivateLinkServicesClientCreateOrUpdateResult struct { PrivateLinkService } -// PrivateLinkServicesClientDeletePollerResponse contains the response from method PrivateLinkServicesClient.Delete. -type PrivateLinkServicesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateLinkServicesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateLinkServicesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServicesClientDeleteResponse, error) { - respType := PrivateLinkServicesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateLinkServicesClientDeletePollerResponse from the provided client and resume token. -func (l *PrivateLinkServicesClientDeletePollerResponse) Resume(ctx context.Context, client *PrivateLinkServicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateLinkServicesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PrivateLinkServicesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - -// PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse contains the response from method PrivateLinkServicesClient.DeletePrivateEndpointConnection. -type PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse struct { - // Poller contains an initialized poller. - Poller *PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse, error) { - respType := PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse from the provided client and -// resume token. -func (l *PrivateLinkServicesClientDeletePrivateEndpointConnectionPollerResponse) Resume(ctx context.Context, client *PrivateLinkServicesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PrivateLinkServicesClient.DeletePrivateEndpointConnection", token, client.pl) - if err != nil { - return err - } - poller := &PrivateLinkServicesClientDeletePrivateEndpointConnectionPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.DeletePrivateEndpointConnection. type PrivateLinkServicesClientDeletePrivateEndpointConnectionResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PrivateLinkServicesClientDeleteResponse contains the response from method PrivateLinkServicesClient.Delete. type PrivateLinkServicesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PrivateLinkServicesClientGetPrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.GetPrivateEndpointConnection. type PrivateLinkServicesClientGetPrivateEndpointConnectionResponse struct { - PrivateLinkServicesClientGetPrivateEndpointConnectionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientGetPrivateEndpointConnectionResult contains the result from method PrivateLinkServicesClient.GetPrivateEndpointConnection. -type PrivateLinkServicesClientGetPrivateEndpointConnectionResult struct { PrivateEndpointConnection } // PrivateLinkServicesClientGetResponse contains the response from method PrivateLinkServicesClient.Get. type PrivateLinkServicesClientGetResponse struct { - PrivateLinkServicesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientGetResult contains the result from method PrivateLinkServicesClient.Get. -type PrivateLinkServicesClientGetResult struct { PrivateLinkService } // PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResponse struct { - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResult contains the result from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServicesByResourceGroup. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesByResourceGroupResult struct { AutoApprovedPrivateLinkServicesResult } // PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse contains the response from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices. type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResponse struct { - PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResult contains the result from method PrivateLinkServicesClient.ListAutoApprovedPrivateLinkServices. -type PrivateLinkServicesClientListAutoApprovedPrivateLinkServicesResult struct { AutoApprovedPrivateLinkServicesResult } // PrivateLinkServicesClientListBySubscriptionResponse contains the response from method PrivateLinkServicesClient.ListBySubscription. type PrivateLinkServicesClientListBySubscriptionResponse struct { - PrivateLinkServicesClientListBySubscriptionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientListBySubscriptionResult contains the result from method PrivateLinkServicesClient.ListBySubscription. -type PrivateLinkServicesClientListBySubscriptionResult struct { PrivateLinkServiceListResult } // PrivateLinkServicesClientListPrivateEndpointConnectionsResponse contains the response from method PrivateLinkServicesClient.ListPrivateEndpointConnections. type PrivateLinkServicesClientListPrivateEndpointConnectionsResponse struct { - PrivateLinkServicesClientListPrivateEndpointConnectionsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientListPrivateEndpointConnectionsResult contains the result from method PrivateLinkServicesClient.ListPrivateEndpointConnections. -type PrivateLinkServicesClientListPrivateEndpointConnectionsResult struct { PrivateEndpointConnectionListResult } // PrivateLinkServicesClientListResponse contains the response from method PrivateLinkServicesClient.List. type PrivateLinkServicesClientListResponse struct { - PrivateLinkServicesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientListResult contains the result from method PrivateLinkServicesClient.List. -type PrivateLinkServicesClientListResult struct { PrivateLinkServiceListResult } // PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse contains the response from method PrivateLinkServicesClient.UpdatePrivateEndpointConnection. type PrivateLinkServicesClientUpdatePrivateEndpointConnectionResponse struct { - PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult contains the result from method PrivateLinkServicesClient.UpdatePrivateEndpointConnection. -type PrivateLinkServicesClientUpdatePrivateEndpointConnectionResult struct { PrivateEndpointConnection } // ProfilesClientCreateOrUpdateResponse contains the response from method ProfilesClient.CreateOrUpdate. type ProfilesClientCreateOrUpdateResponse struct { - ProfilesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ProfilesClientCreateOrUpdateResult contains the result from method ProfilesClient.CreateOrUpdate. -type ProfilesClientCreateOrUpdateResult struct { Profile } -// ProfilesClientDeletePollerResponse contains the response from method ProfilesClient.Delete. -type ProfilesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ProfilesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ProfilesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ProfilesClientDeleteResponse, error) { - respType := ProfilesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ProfilesClientDeletePollerResponse from the provided client and resume token. -func (l *ProfilesClientDeletePollerResponse) Resume(ctx context.Context, client *ProfilesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ProfilesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ProfilesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ProfilesClientDeleteResponse contains the response from method ProfilesClient.Delete. type ProfilesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ProfilesClientGetResponse contains the response from method ProfilesClient.Get. type ProfilesClientGetResponse struct { - ProfilesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ProfilesClientGetResult contains the result from method ProfilesClient.Get. -type ProfilesClientGetResult struct { Profile } // ProfilesClientListAllResponse contains the response from method ProfilesClient.ListAll. type ProfilesClientListAllResponse struct { - ProfilesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ProfilesClientListAllResult contains the result from method ProfilesClient.ListAll. -type ProfilesClientListAllResult struct { ProfileListResult } // ProfilesClientListResponse contains the response from method ProfilesClient.List. type ProfilesClientListResponse struct { - ProfilesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ProfilesClientListResult contains the result from method ProfilesClient.List. -type ProfilesClientListResult struct { ProfileListResult } // ProfilesClientUpdateTagsResponse contains the response from method ProfilesClient.UpdateTags. type ProfilesClientUpdateTagsResponse struct { - ProfilesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ProfilesClientUpdateTagsResult contains the result from method ProfilesClient.UpdateTags. -type ProfilesClientUpdateTagsResult struct { Profile } -// PublicIPAddressesClientCreateOrUpdatePollerResponse contains the response from method PublicIPAddressesClient.CreateOrUpdate. -type PublicIPAddressesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PublicIPAddressesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PublicIPAddressesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PublicIPAddressesClientCreateOrUpdateResponse, error) { - respType := PublicIPAddressesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PublicIPAddress) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PublicIPAddressesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *PublicIPAddressesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *PublicIPAddressesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PublicIPAddressesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &PublicIPAddressesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PublicIPAddressesClientCreateOrUpdateResponse contains the response from method PublicIPAddressesClient.CreateOrUpdate. type PublicIPAddressesClientCreateOrUpdateResponse struct { - PublicIPAddressesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientCreateOrUpdateResult contains the result from method PublicIPAddressesClient.CreateOrUpdate. -type PublicIPAddressesClientCreateOrUpdateResult struct { PublicIPAddress } -// PublicIPAddressesClientDeletePollerResponse contains the response from method PublicIPAddressesClient.Delete. -type PublicIPAddressesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PublicIPAddressesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PublicIPAddressesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PublicIPAddressesClientDeleteResponse, error) { - respType := PublicIPAddressesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PublicIPAddressesClientDeletePollerResponse from the provided client and resume token. -func (l *PublicIPAddressesClientDeletePollerResponse) Resume(ctx context.Context, client *PublicIPAddressesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PublicIPAddressesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PublicIPAddressesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PublicIPAddressesClientDeleteResponse contains the response from method PublicIPAddressesClient.Delete. type PublicIPAddressesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PublicIPAddressesClientGetCloudServicePublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetCloudServicePublicIPAddress. type PublicIPAddressesClientGetCloudServicePublicIPAddressResponse struct { - PublicIPAddressesClientGetCloudServicePublicIPAddressResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientGetCloudServicePublicIPAddressResult contains the result from method PublicIPAddressesClient.GetCloudServicePublicIPAddress. -type PublicIPAddressesClientGetCloudServicePublicIPAddressResult struct { PublicIPAddress } // PublicIPAddressesClientGetResponse contains the response from method PublicIPAddressesClient.Get. type PublicIPAddressesClientGetResponse struct { - PublicIPAddressesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientGetResult contains the result from method PublicIPAddressesClient.Get. -type PublicIPAddressesClientGetResult struct { PublicIPAddress } // PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse contains the response from method PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress. type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResponse struct { - PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult contains the result from method PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress. -type PublicIPAddressesClientGetVirtualMachineScaleSetPublicIPAddressResult struct { PublicIPAddress } // PublicIPAddressesClientListAllResponse contains the response from method PublicIPAddressesClient.ListAll. type PublicIPAddressesClientListAllResponse struct { - PublicIPAddressesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListAllResult contains the result from method PublicIPAddressesClient.ListAll. -type PublicIPAddressesClientListAllResult struct { PublicIPAddressListResult } // PublicIPAddressesClientListCloudServicePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServicePublicIPAddresses. type PublicIPAddressesClientListCloudServicePublicIPAddressesResponse struct { - PublicIPAddressesClientListCloudServicePublicIPAddressesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListCloudServicePublicIPAddressesResult contains the result from method PublicIPAddressesClient.ListCloudServicePublicIPAddresses. -type PublicIPAddressesClientListCloudServicePublicIPAddressesResult struct { PublicIPAddressListResult } // PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses. type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResponse struct { - PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResult contains the result from method PublicIPAddressesClient.ListCloudServiceRoleInstancePublicIPAddresses. -type PublicIPAddressesClientListCloudServiceRoleInstancePublicIPAddressesResult struct { PublicIPAddressListResult } // PublicIPAddressesClientListResponse contains the response from method PublicIPAddressesClient.List. type PublicIPAddressesClientListResponse struct { - PublicIPAddressesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListResult contains the result from method PublicIPAddressesClient.List. -type PublicIPAddressesClientListResult struct { PublicIPAddressListResult } // PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses. type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResponse struct { - PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResult contains the result from method PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses. -type PublicIPAddressesClientListVirtualMachineScaleSetPublicIPAddressesResult struct { PublicIPAddressListResult } // PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse contains the response from method PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses. type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResponse struct { - PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResult contains the result from method PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses. -type PublicIPAddressesClientListVirtualMachineScaleSetVMPublicIPAddressesResult struct { PublicIPAddressListResult } // PublicIPAddressesClientUpdateTagsResponse contains the response from method PublicIPAddressesClient.UpdateTags. type PublicIPAddressesClientUpdateTagsResponse struct { - PublicIPAddressesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPAddressesClientUpdateTagsResult contains the result from method PublicIPAddressesClient.UpdateTags. -type PublicIPAddressesClientUpdateTagsResult struct { PublicIPAddress } -// PublicIPPrefixesClientCreateOrUpdatePollerResponse contains the response from method PublicIPPrefixesClient.CreateOrUpdate. -type PublicIPPrefixesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *PublicIPPrefixesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PublicIPPrefixesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PublicIPPrefixesClientCreateOrUpdateResponse, error) { - respType := PublicIPPrefixesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PublicIPPrefix) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PublicIPPrefixesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *PublicIPPrefixesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *PublicIPPrefixesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PublicIPPrefixesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &PublicIPPrefixesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PublicIPPrefixesClientCreateOrUpdateResponse contains the response from method PublicIPPrefixesClient.CreateOrUpdate. type PublicIPPrefixesClientCreateOrUpdateResponse struct { - PublicIPPrefixesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPPrefixesClientCreateOrUpdateResult contains the result from method PublicIPPrefixesClient.CreateOrUpdate. -type PublicIPPrefixesClientCreateOrUpdateResult struct { PublicIPPrefix } -// PublicIPPrefixesClientDeletePollerResponse contains the response from method PublicIPPrefixesClient.Delete. -type PublicIPPrefixesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *PublicIPPrefixesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l PublicIPPrefixesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (PublicIPPrefixesClientDeleteResponse, error) { - respType := PublicIPPrefixesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a PublicIPPrefixesClientDeletePollerResponse from the provided client and resume token. -func (l *PublicIPPrefixesClientDeletePollerResponse) Resume(ctx context.Context, client *PublicIPPrefixesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("PublicIPPrefixesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &PublicIPPrefixesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // PublicIPPrefixesClientDeleteResponse contains the response from method PublicIPPrefixesClient.Delete. type PublicIPPrefixesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // PublicIPPrefixesClientGetResponse contains the response from method PublicIPPrefixesClient.Get. type PublicIPPrefixesClientGetResponse struct { - PublicIPPrefixesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPPrefixesClientGetResult contains the result from method PublicIPPrefixesClient.Get. -type PublicIPPrefixesClientGetResult struct { PublicIPPrefix } // PublicIPPrefixesClientListAllResponse contains the response from method PublicIPPrefixesClient.ListAll. type PublicIPPrefixesClientListAllResponse struct { - PublicIPPrefixesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPPrefixesClientListAllResult contains the result from method PublicIPPrefixesClient.ListAll. -type PublicIPPrefixesClientListAllResult struct { PublicIPPrefixListResult } // PublicIPPrefixesClientListResponse contains the response from method PublicIPPrefixesClient.List. type PublicIPPrefixesClientListResponse struct { - PublicIPPrefixesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPPrefixesClientListResult contains the result from method PublicIPPrefixesClient.List. -type PublicIPPrefixesClientListResult struct { PublicIPPrefixListResult } // PublicIPPrefixesClientUpdateTagsResponse contains the response from method PublicIPPrefixesClient.UpdateTags. type PublicIPPrefixesClientUpdateTagsResponse struct { - PublicIPPrefixesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PublicIPPrefixesClientUpdateTagsResult contains the result from method PublicIPPrefixesClient.UpdateTags. -type PublicIPPrefixesClientUpdateTagsResult struct { PublicIPPrefix } // ResourceNavigationLinksClientListResponse contains the response from method ResourceNavigationLinksClient.List. type ResourceNavigationLinksClientListResponse struct { - ResourceNavigationLinksClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ResourceNavigationLinksClientListResult contains the result from method ResourceNavigationLinksClient.List. -type ResourceNavigationLinksClientListResult struct { ResourceNavigationLinksListResult } -// RouteFilterRulesClientCreateOrUpdatePollerResponse contains the response from method RouteFilterRulesClient.CreateOrUpdate. -type RouteFilterRulesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteFilterRulesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteFilterRulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteFilterRulesClientCreateOrUpdateResponse, error) { - respType := RouteFilterRulesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RouteFilterRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteFilterRulesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RouteFilterRulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RouteFilterRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteFilterRulesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &RouteFilterRulesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RouteFilterRulesClientCreateOrUpdateResponse contains the response from method RouteFilterRulesClient.CreateOrUpdate. type RouteFilterRulesClientCreateOrUpdateResponse struct { - RouteFilterRulesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFilterRulesClientCreateOrUpdateResult contains the result from method RouteFilterRulesClient.CreateOrUpdate. -type RouteFilterRulesClientCreateOrUpdateResult struct { RouteFilterRule } -// RouteFilterRulesClientDeletePollerResponse contains the response from method RouteFilterRulesClient.Delete. -type RouteFilterRulesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteFilterRulesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteFilterRulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteFilterRulesClientDeleteResponse, error) { - respType := RouteFilterRulesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteFilterRulesClientDeletePollerResponse from the provided client and resume token. -func (l *RouteFilterRulesClientDeletePollerResponse) Resume(ctx context.Context, client *RouteFilterRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteFilterRulesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &RouteFilterRulesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RouteFilterRulesClientDeleteResponse contains the response from method RouteFilterRulesClient.Delete. type RouteFilterRulesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // RouteFilterRulesClientGetResponse contains the response from method RouteFilterRulesClient.Get. type RouteFilterRulesClientGetResponse struct { - RouteFilterRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFilterRulesClientGetResult contains the result from method RouteFilterRulesClient.Get. -type RouteFilterRulesClientGetResult struct { RouteFilterRule } // RouteFilterRulesClientListByRouteFilterResponse contains the response from method RouteFilterRulesClient.ListByRouteFilter. type RouteFilterRulesClientListByRouteFilterResponse struct { - RouteFilterRulesClientListByRouteFilterResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFilterRulesClientListByRouteFilterResult contains the result from method RouteFilterRulesClient.ListByRouteFilter. -type RouteFilterRulesClientListByRouteFilterResult struct { - RouteFilterRuleListResult -} - -// RouteFiltersClientCreateOrUpdatePollerResponse contains the response from method RouteFiltersClient.CreateOrUpdate. -type RouteFiltersClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteFiltersClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteFiltersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteFiltersClientCreateOrUpdateResponse, error) { - respType := RouteFiltersClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RouteFilter) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteFiltersClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RouteFiltersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RouteFiltersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteFiltersClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &RouteFiltersClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + RouteFilterRuleListResult } // RouteFiltersClientCreateOrUpdateResponse contains the response from method RouteFiltersClient.CreateOrUpdate. type RouteFiltersClientCreateOrUpdateResponse struct { - RouteFiltersClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFiltersClientCreateOrUpdateResult contains the result from method RouteFiltersClient.CreateOrUpdate. -type RouteFiltersClientCreateOrUpdateResult struct { RouteFilter } -// RouteFiltersClientDeletePollerResponse contains the response from method RouteFiltersClient.Delete. -type RouteFiltersClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteFiltersClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteFiltersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteFiltersClientDeleteResponse, error) { - respType := RouteFiltersClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteFiltersClientDeletePollerResponse from the provided client and resume token. -func (l *RouteFiltersClientDeletePollerResponse) Resume(ctx context.Context, client *RouteFiltersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteFiltersClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &RouteFiltersClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RouteFiltersClientDeleteResponse contains the response from method RouteFiltersClient.Delete. type RouteFiltersClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // RouteFiltersClientGetResponse contains the response from method RouteFiltersClient.Get. type RouteFiltersClientGetResponse struct { - RouteFiltersClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFiltersClientGetResult contains the result from method RouteFiltersClient.Get. -type RouteFiltersClientGetResult struct { RouteFilter } // RouteFiltersClientListByResourceGroupResponse contains the response from method RouteFiltersClient.ListByResourceGroup. type RouteFiltersClientListByResourceGroupResponse struct { - RouteFiltersClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFiltersClientListByResourceGroupResult contains the result from method RouteFiltersClient.ListByResourceGroup. -type RouteFiltersClientListByResourceGroupResult struct { RouteFilterListResult } // RouteFiltersClientListResponse contains the response from method RouteFiltersClient.List. type RouteFiltersClientListResponse struct { - RouteFiltersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFiltersClientListResult contains the result from method RouteFiltersClient.List. -type RouteFiltersClientListResult struct { RouteFilterListResult } // RouteFiltersClientUpdateTagsResponse contains the response from method RouteFiltersClient.UpdateTags. type RouteFiltersClientUpdateTagsResponse struct { - RouteFiltersClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteFiltersClientUpdateTagsResult contains the result from method RouteFiltersClient.UpdateTags. -type RouteFiltersClientUpdateTagsResult struct { RouteFilter } -// RouteTablesClientCreateOrUpdatePollerResponse contains the response from method RouteTablesClient.CreateOrUpdate. -type RouteTablesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteTablesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteTablesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteTablesClientCreateOrUpdateResponse, error) { - respType := RouteTablesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RouteTable) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteTablesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RouteTablesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RouteTablesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteTablesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &RouteTablesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RouteTablesClientCreateOrUpdateResponse contains the response from method RouteTablesClient.CreateOrUpdate. type RouteTablesClientCreateOrUpdateResponse struct { - RouteTablesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteTablesClientCreateOrUpdateResult contains the result from method RouteTablesClient.CreateOrUpdate. -type RouteTablesClientCreateOrUpdateResult struct { RouteTable } -// RouteTablesClientDeletePollerResponse contains the response from method RouteTablesClient.Delete. -type RouteTablesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *RouteTablesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RouteTablesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RouteTablesClientDeleteResponse, error) { - respType := RouteTablesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RouteTablesClientDeletePollerResponse from the provided client and resume token. -func (l *RouteTablesClientDeletePollerResponse) Resume(ctx context.Context, client *RouteTablesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RouteTablesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &RouteTablesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RouteTablesClientDeleteResponse contains the response from method RouteTablesClient.Delete. type RouteTablesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // RouteTablesClientGetResponse contains the response from method RouteTablesClient.Get. type RouteTablesClientGetResponse struct { - RouteTablesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteTablesClientGetResult contains the result from method RouteTablesClient.Get. -type RouteTablesClientGetResult struct { RouteTable } // RouteTablesClientListAllResponse contains the response from method RouteTablesClient.ListAll. type RouteTablesClientListAllResponse struct { - RouteTablesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteTablesClientListAllResult contains the result from method RouteTablesClient.ListAll. -type RouteTablesClientListAllResult struct { RouteTableListResult } // RouteTablesClientListResponse contains the response from method RouteTablesClient.List. type RouteTablesClientListResponse struct { - RouteTablesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteTablesClientListResult contains the result from method RouteTablesClient.List. -type RouteTablesClientListResult struct { RouteTableListResult } // RouteTablesClientUpdateTagsResponse contains the response from method RouteTablesClient.UpdateTags. type RouteTablesClientUpdateTagsResponse struct { - RouteTablesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RouteTablesClientUpdateTagsResult contains the result from method RouteTablesClient.UpdateTags. -type RouteTablesClientUpdateTagsResult struct { RouteTable } -// RoutesClientCreateOrUpdatePollerResponse contains the response from method RoutesClient.CreateOrUpdate. -type RoutesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *RoutesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RoutesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RoutesClientCreateOrUpdateResponse, error) { - respType := RoutesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Route) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RoutesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RoutesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RoutesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RoutesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &RoutesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RoutesClientCreateOrUpdateResponse contains the response from method RoutesClient.CreateOrUpdate. type RoutesClientCreateOrUpdateResponse struct { - RoutesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutesClientCreateOrUpdateResult contains the result from method RoutesClient.CreateOrUpdate. -type RoutesClientCreateOrUpdateResult struct { Route } -// RoutesClientDeletePollerResponse contains the response from method RoutesClient.Delete. -type RoutesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *RoutesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RoutesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RoutesClientDeleteResponse, error) { - respType := RoutesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RoutesClientDeletePollerResponse from the provided client and resume token. -func (l *RoutesClientDeletePollerResponse) Resume(ctx context.Context, client *RoutesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RoutesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &RoutesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RoutesClientDeleteResponse contains the response from method RoutesClient.Delete. type RoutesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // RoutesClientGetResponse contains the response from method RoutesClient.Get. type RoutesClientGetResponse struct { - RoutesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutesClientGetResult contains the result from method RoutesClient.Get. -type RoutesClientGetResult struct { Route } // RoutesClientListResponse contains the response from method RoutesClient.List. type RoutesClientListResponse struct { - RoutesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutesClientListResult contains the result from method RoutesClient.List. -type RoutesClientListResult struct { RouteListResult } -// RoutingIntentClientCreateOrUpdatePollerResponse contains the response from method RoutingIntentClient.CreateOrUpdate. -type RoutingIntentClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *RoutingIntentClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RoutingIntentClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RoutingIntentClientCreateOrUpdateResponse, error) { - respType := RoutingIntentClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.RoutingIntent) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RoutingIntentClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *RoutingIntentClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *RoutingIntentClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RoutingIntentClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &RoutingIntentClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RoutingIntentClientCreateOrUpdateResponse contains the response from method RoutingIntentClient.CreateOrUpdate. type RoutingIntentClientCreateOrUpdateResponse struct { - RoutingIntentClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutingIntentClientCreateOrUpdateResult contains the result from method RoutingIntentClient.CreateOrUpdate. -type RoutingIntentClientCreateOrUpdateResult struct { RoutingIntent } -// RoutingIntentClientDeletePollerResponse contains the response from method RoutingIntentClient.Delete. -type RoutingIntentClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *RoutingIntentClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l RoutingIntentClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (RoutingIntentClientDeleteResponse, error) { - respType := RoutingIntentClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a RoutingIntentClientDeletePollerResponse from the provided client and resume token. -func (l *RoutingIntentClientDeletePollerResponse) Resume(ctx context.Context, client *RoutingIntentClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("RoutingIntentClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &RoutingIntentClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // RoutingIntentClientDeleteResponse contains the response from method RoutingIntentClient.Delete. type RoutingIntentClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // RoutingIntentClientGetResponse contains the response from method RoutingIntentClient.Get. type RoutingIntentClientGetResponse struct { - RoutingIntentClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutingIntentClientGetResult contains the result from method RoutingIntentClient.Get. -type RoutingIntentClientGetResult struct { RoutingIntent } // RoutingIntentClientListResponse contains the response from method RoutingIntentClient.List. type RoutingIntentClientListResponse struct { - RoutingIntentClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// RoutingIntentClientListResult contains the result from method RoutingIntentClient.List. -type RoutingIntentClientListResult struct { ListRoutingIntentResult } -// SecurityGroupsClientCreateOrUpdatePollerResponse contains the response from method SecurityGroupsClient.CreateOrUpdate. -type SecurityGroupsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityGroupsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityGroupsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityGroupsClientCreateOrUpdateResponse, error) { - respType := SecurityGroupsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.SecurityGroup) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityGroupsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *SecurityGroupsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SecurityGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityGroupsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &SecurityGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityGroupsClientCreateOrUpdateResponse contains the response from method SecurityGroupsClient.CreateOrUpdate. type SecurityGroupsClientCreateOrUpdateResponse struct { - SecurityGroupsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityGroupsClientCreateOrUpdateResult contains the result from method SecurityGroupsClient.CreateOrUpdate. -type SecurityGroupsClientCreateOrUpdateResult struct { SecurityGroup } -// SecurityGroupsClientDeletePollerResponse contains the response from method SecurityGroupsClient.Delete. -type SecurityGroupsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityGroupsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityGroupsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityGroupsClientDeleteResponse, error) { - respType := SecurityGroupsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityGroupsClientDeletePollerResponse from the provided client and resume token. -func (l *SecurityGroupsClientDeletePollerResponse) Resume(ctx context.Context, client *SecurityGroupsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityGroupsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &SecurityGroupsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityGroupsClientDeleteResponse contains the response from method SecurityGroupsClient.Delete. type SecurityGroupsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // SecurityGroupsClientGetResponse contains the response from method SecurityGroupsClient.Get. type SecurityGroupsClientGetResponse struct { - SecurityGroupsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityGroupsClientGetResult contains the result from method SecurityGroupsClient.Get. -type SecurityGroupsClientGetResult struct { SecurityGroup } // SecurityGroupsClientListAllResponse contains the response from method SecurityGroupsClient.ListAll. type SecurityGroupsClientListAllResponse struct { - SecurityGroupsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityGroupsClientListAllResult contains the result from method SecurityGroupsClient.ListAll. -type SecurityGroupsClientListAllResult struct { SecurityGroupListResult } // SecurityGroupsClientListResponse contains the response from method SecurityGroupsClient.List. type SecurityGroupsClientListResponse struct { - SecurityGroupsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityGroupsClientListResult contains the result from method SecurityGroupsClient.List. -type SecurityGroupsClientListResult struct { SecurityGroupListResult } // SecurityGroupsClientUpdateTagsResponse contains the response from method SecurityGroupsClient.UpdateTags. type SecurityGroupsClientUpdateTagsResponse struct { - SecurityGroupsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityGroupsClientUpdateTagsResult contains the result from method SecurityGroupsClient.UpdateTags. -type SecurityGroupsClientUpdateTagsResult struct { SecurityGroup } -// SecurityPartnerProvidersClientCreateOrUpdatePollerResponse contains the response from method SecurityPartnerProvidersClient.CreateOrUpdate. -type SecurityPartnerProvidersClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityPartnerProvidersClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityPartnerProvidersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityPartnerProvidersClientCreateOrUpdateResponse, error) { - respType := SecurityPartnerProvidersClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.SecurityPartnerProvider) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityPartnerProvidersClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *SecurityPartnerProvidersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SecurityPartnerProvidersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityPartnerProvidersClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &SecurityPartnerProvidersClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityPartnerProvidersClientCreateOrUpdateResponse contains the response from method SecurityPartnerProvidersClient.CreateOrUpdate. type SecurityPartnerProvidersClientCreateOrUpdateResponse struct { - SecurityPartnerProvidersClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityPartnerProvidersClientCreateOrUpdateResult contains the result from method SecurityPartnerProvidersClient.CreateOrUpdate. -type SecurityPartnerProvidersClientCreateOrUpdateResult struct { SecurityPartnerProvider } -// SecurityPartnerProvidersClientDeletePollerResponse contains the response from method SecurityPartnerProvidersClient.Delete. -type SecurityPartnerProvidersClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityPartnerProvidersClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityPartnerProvidersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityPartnerProvidersClientDeleteResponse, error) { - respType := SecurityPartnerProvidersClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityPartnerProvidersClientDeletePollerResponse from the provided client and resume token. -func (l *SecurityPartnerProvidersClientDeletePollerResponse) Resume(ctx context.Context, client *SecurityPartnerProvidersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityPartnerProvidersClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &SecurityPartnerProvidersClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityPartnerProvidersClientDeleteResponse contains the response from method SecurityPartnerProvidersClient.Delete. type SecurityPartnerProvidersClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // SecurityPartnerProvidersClientGetResponse contains the response from method SecurityPartnerProvidersClient.Get. type SecurityPartnerProvidersClientGetResponse struct { - SecurityPartnerProvidersClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityPartnerProvidersClientGetResult contains the result from method SecurityPartnerProvidersClient.Get. -type SecurityPartnerProvidersClientGetResult struct { SecurityPartnerProvider } // SecurityPartnerProvidersClientListByResourceGroupResponse contains the response from method SecurityPartnerProvidersClient.ListByResourceGroup. type SecurityPartnerProvidersClientListByResourceGroupResponse struct { - SecurityPartnerProvidersClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityPartnerProvidersClientListByResourceGroupResult contains the result from method SecurityPartnerProvidersClient.ListByResourceGroup. -type SecurityPartnerProvidersClientListByResourceGroupResult struct { SecurityPartnerProviderListResult } // SecurityPartnerProvidersClientListResponse contains the response from method SecurityPartnerProvidersClient.List. type SecurityPartnerProvidersClientListResponse struct { - SecurityPartnerProvidersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityPartnerProvidersClientListResult contains the result from method SecurityPartnerProvidersClient.List. -type SecurityPartnerProvidersClientListResult struct { SecurityPartnerProviderListResult } // SecurityPartnerProvidersClientUpdateTagsResponse contains the response from method SecurityPartnerProvidersClient.UpdateTags. type SecurityPartnerProvidersClientUpdateTagsResponse struct { - SecurityPartnerProvidersClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityPartnerProvidersClientUpdateTagsResult contains the result from method SecurityPartnerProvidersClient.UpdateTags. -type SecurityPartnerProvidersClientUpdateTagsResult struct { SecurityPartnerProvider } -// SecurityRulesClientCreateOrUpdatePollerResponse contains the response from method SecurityRulesClient.CreateOrUpdate. -type SecurityRulesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityRulesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityRulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityRulesClientCreateOrUpdateResponse, error) { - respType := SecurityRulesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.SecurityRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityRulesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *SecurityRulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SecurityRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityRulesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &SecurityRulesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityRulesClientCreateOrUpdateResponse contains the response from method SecurityRulesClient.CreateOrUpdate. type SecurityRulesClientCreateOrUpdateResponse struct { - SecurityRulesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityRulesClientCreateOrUpdateResult contains the result from method SecurityRulesClient.CreateOrUpdate. -type SecurityRulesClientCreateOrUpdateResult struct { SecurityRule } -// SecurityRulesClientDeletePollerResponse contains the response from method SecurityRulesClient.Delete. -type SecurityRulesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *SecurityRulesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SecurityRulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SecurityRulesClientDeleteResponse, error) { - respType := SecurityRulesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SecurityRulesClientDeletePollerResponse from the provided client and resume token. -func (l *SecurityRulesClientDeletePollerResponse) Resume(ctx context.Context, client *SecurityRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SecurityRulesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &SecurityRulesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SecurityRulesClientDeleteResponse contains the response from method SecurityRulesClient.Delete. type SecurityRulesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // SecurityRulesClientGetResponse contains the response from method SecurityRulesClient.Get. type SecurityRulesClientGetResponse struct { - SecurityRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityRulesClientGetResult contains the result from method SecurityRulesClient.Get. -type SecurityRulesClientGetResult struct { SecurityRule } // SecurityRulesClientListResponse contains the response from method SecurityRulesClient.List. type SecurityRulesClientListResponse struct { - SecurityRulesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SecurityRulesClientListResult contains the result from method SecurityRulesClient.List. -type SecurityRulesClientListResult struct { SecurityRuleListResult } // ServiceAssociationLinksClientListResponse contains the response from method ServiceAssociationLinksClient.List. type ServiceAssociationLinksClientListResponse struct { - ServiceAssociationLinksClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceAssociationLinksClientListResult contains the result from method ServiceAssociationLinksClient.List. -type ServiceAssociationLinksClientListResult struct { ServiceAssociationLinksListResult } -// ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse contains the response from method ServiceEndpointPoliciesClient.CreateOrUpdate. -type ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ServiceEndpointPoliciesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPoliciesClientCreateOrUpdateResponse, error) { - respType := ServiceEndpointPoliciesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ServiceEndpointPolicy) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ServiceEndpointPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ServiceEndpointPoliciesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ServiceEndpointPoliciesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ServiceEndpointPoliciesClientCreateOrUpdateResponse contains the response from method ServiceEndpointPoliciesClient.CreateOrUpdate. type ServiceEndpointPoliciesClientCreateOrUpdateResponse struct { - ServiceEndpointPoliciesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPoliciesClientCreateOrUpdateResult contains the result from method ServiceEndpointPoliciesClient.CreateOrUpdate. -type ServiceEndpointPoliciesClientCreateOrUpdateResult struct { ServiceEndpointPolicy } -// ServiceEndpointPoliciesClientDeletePollerResponse contains the response from method ServiceEndpointPoliciesClient.Delete. -type ServiceEndpointPoliciesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ServiceEndpointPoliciesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ServiceEndpointPoliciesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPoliciesClientDeleteResponse, error) { - respType := ServiceEndpointPoliciesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ServiceEndpointPoliciesClientDeletePollerResponse from the provided client and resume token. -func (l *ServiceEndpointPoliciesClientDeletePollerResponse) Resume(ctx context.Context, client *ServiceEndpointPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ServiceEndpointPoliciesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ServiceEndpointPoliciesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ServiceEndpointPoliciesClientDeleteResponse contains the response from method ServiceEndpointPoliciesClient.Delete. type ServiceEndpointPoliciesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ServiceEndpointPoliciesClientGetResponse contains the response from method ServiceEndpointPoliciesClient.Get. type ServiceEndpointPoliciesClientGetResponse struct { - ServiceEndpointPoliciesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPoliciesClientGetResult contains the result from method ServiceEndpointPoliciesClient.Get. -type ServiceEndpointPoliciesClientGetResult struct { ServiceEndpointPolicy } // ServiceEndpointPoliciesClientListByResourceGroupResponse contains the response from method ServiceEndpointPoliciesClient.ListByResourceGroup. type ServiceEndpointPoliciesClientListByResourceGroupResponse struct { - ServiceEndpointPoliciesClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPoliciesClientListByResourceGroupResult contains the result from method ServiceEndpointPoliciesClient.ListByResourceGroup. -type ServiceEndpointPoliciesClientListByResourceGroupResult struct { ServiceEndpointPolicyListResult } // ServiceEndpointPoliciesClientListResponse contains the response from method ServiceEndpointPoliciesClient.List. type ServiceEndpointPoliciesClientListResponse struct { - ServiceEndpointPoliciesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPoliciesClientListResult contains the result from method ServiceEndpointPoliciesClient.List. -type ServiceEndpointPoliciesClientListResult struct { ServiceEndpointPolicyListResult } // ServiceEndpointPoliciesClientUpdateTagsResponse contains the response from method ServiceEndpointPoliciesClient.UpdateTags. type ServiceEndpointPoliciesClientUpdateTagsResponse struct { - ServiceEndpointPoliciesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPoliciesClientUpdateTagsResult contains the result from method ServiceEndpointPoliciesClient.UpdateTags. -type ServiceEndpointPoliciesClientUpdateTagsResult struct { ServiceEndpointPolicy } -// ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate. -type ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse, error) { - respType := ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ServiceEndpointPolicyDefinition) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *ServiceEndpointPolicyDefinitionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate. type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse struct { - ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult contains the result from method ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate. -type ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResult struct { ServiceEndpointPolicyDefinition } -// ServiceEndpointPolicyDefinitionsClientDeletePollerResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Delete. -type ServiceEndpointPolicyDefinitionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *ServiceEndpointPolicyDefinitionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l ServiceEndpointPolicyDefinitionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (ServiceEndpointPolicyDefinitionsClientDeleteResponse, error) { - respType := ServiceEndpointPolicyDefinitionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a ServiceEndpointPolicyDefinitionsClientDeletePollerResponse from the provided client and resume token. -func (l *ServiceEndpointPolicyDefinitionsClientDeletePollerResponse) Resume(ctx context.Context, client *ServiceEndpointPolicyDefinitionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("ServiceEndpointPolicyDefinitionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &ServiceEndpointPolicyDefinitionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // ServiceEndpointPolicyDefinitionsClientDeleteResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Delete. type ServiceEndpointPolicyDefinitionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // ServiceEndpointPolicyDefinitionsClientGetResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.Get. type ServiceEndpointPolicyDefinitionsClientGetResponse struct { - ServiceEndpointPolicyDefinitionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPolicyDefinitionsClientGetResult contains the result from method ServiceEndpointPolicyDefinitionsClient.Get. -type ServiceEndpointPolicyDefinitionsClientGetResult struct { ServiceEndpointPolicyDefinition } // ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse contains the response from method ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup. type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse struct { - ServiceEndpointPolicyDefinitionsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceEndpointPolicyDefinitionsClientListByResourceGroupResult contains the result from method ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup. -type ServiceEndpointPolicyDefinitionsClientListByResourceGroupResult struct { ServiceEndpointPolicyDefinitionListResult } // ServiceTagInformationClientListResponse contains the response from method ServiceTagInformationClient.List. type ServiceTagInformationClientListResponse struct { - ServiceTagInformationClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceTagInformationClientListResult contains the result from method ServiceTagInformationClient.List. -type ServiceTagInformationClientListResult struct { ServiceTagInformationListResult } // ServiceTagsClientListResponse contains the response from method ServiceTagsClient.List. type ServiceTagsClientListResponse struct { - ServiceTagsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// ServiceTagsClientListResult contains the result from method ServiceTagsClient.List. -type ServiceTagsClientListResult struct { ServiceTagsListResult } -// SubnetsClientCreateOrUpdatePollerResponse contains the response from method SubnetsClient.CreateOrUpdate. -type SubnetsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *SubnetsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SubnetsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SubnetsClientCreateOrUpdateResponse, error) { - respType := SubnetsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Subnet) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SubnetsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *SubnetsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *SubnetsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SubnetsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &SubnetsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SubnetsClientCreateOrUpdateResponse contains the response from method SubnetsClient.CreateOrUpdate. type SubnetsClientCreateOrUpdateResponse struct { - SubnetsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SubnetsClientCreateOrUpdateResult contains the result from method SubnetsClient.CreateOrUpdate. -type SubnetsClientCreateOrUpdateResult struct { Subnet } -// SubnetsClientDeletePollerResponse contains the response from method SubnetsClient.Delete. -type SubnetsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *SubnetsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SubnetsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SubnetsClientDeleteResponse, error) { - respType := SubnetsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SubnetsClientDeletePollerResponse from the provided client and resume token. -func (l *SubnetsClientDeletePollerResponse) Resume(ctx context.Context, client *SubnetsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SubnetsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &SubnetsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SubnetsClientDeleteResponse contains the response from method SubnetsClient.Delete. type SubnetsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // SubnetsClientGetResponse contains the response from method SubnetsClient.Get. type SubnetsClientGetResponse struct { - SubnetsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SubnetsClientGetResult contains the result from method SubnetsClient.Get. -type SubnetsClientGetResult struct { Subnet } // SubnetsClientListResponse contains the response from method SubnetsClient.List. type SubnetsClientListResponse struct { - SubnetsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SubnetsClientListResult contains the result from method SubnetsClient.List. -type SubnetsClientListResult struct { SubnetListResult } -// SubnetsClientPrepareNetworkPoliciesPollerResponse contains the response from method SubnetsClient.PrepareNetworkPolicies. -type SubnetsClientPrepareNetworkPoliciesPollerResponse struct { - // Poller contains an initialized poller. - Poller *SubnetsClientPrepareNetworkPoliciesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SubnetsClientPrepareNetworkPoliciesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SubnetsClientPrepareNetworkPoliciesResponse, error) { - respType := SubnetsClientPrepareNetworkPoliciesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SubnetsClientPrepareNetworkPoliciesPollerResponse from the provided client and resume token. -func (l *SubnetsClientPrepareNetworkPoliciesPollerResponse) Resume(ctx context.Context, client *SubnetsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SubnetsClient.PrepareNetworkPolicies", token, client.pl) - if err != nil { - return err - } - poller := &SubnetsClientPrepareNetworkPoliciesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // SubnetsClientPrepareNetworkPoliciesResponse contains the response from method SubnetsClient.PrepareNetworkPolicies. type SubnetsClientPrepareNetworkPoliciesResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// SubnetsClientUnprepareNetworkPoliciesPollerResponse contains the response from method SubnetsClient.UnprepareNetworkPolicies. -type SubnetsClientUnprepareNetworkPoliciesPollerResponse struct { - // Poller contains an initialized poller. - Poller *SubnetsClientUnprepareNetworkPoliciesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l SubnetsClientUnprepareNetworkPoliciesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (SubnetsClientUnprepareNetworkPoliciesResponse, error) { - respType := SubnetsClientUnprepareNetworkPoliciesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a SubnetsClientUnprepareNetworkPoliciesPollerResponse from the provided client and resume token. -func (l *SubnetsClientUnprepareNetworkPoliciesPollerResponse) Resume(ctx context.Context, client *SubnetsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("SubnetsClient.UnprepareNetworkPolicies", token, client.pl) - if err != nil { - return err - } - poller := &SubnetsClientUnprepareNetworkPoliciesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // SubnetsClientUnprepareNetworkPoliciesResponse contains the response from method SubnetsClient.UnprepareNetworkPolicies. type SubnetsClientUnprepareNetworkPoliciesResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // UsagesClientListResponse contains the response from method UsagesClient.List. type UsagesClientListResponse struct { - UsagesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// UsagesClientListResult contains the result from method UsagesClient.List. -type UsagesClientListResult struct { UsagesListResult } -// VPNConnectionsClientCreateOrUpdatePollerResponse contains the response from method VPNConnectionsClient.CreateOrUpdate. -type VPNConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNConnectionsClientCreateOrUpdateResponse, error) { - respType := VPNConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VPNConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VPNConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VPNConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNConnectionsClientCreateOrUpdateResponse contains the response from method VPNConnectionsClient.CreateOrUpdate. type VPNConnectionsClientCreateOrUpdateResponse struct { - VPNConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNConnectionsClientCreateOrUpdateResult contains the result from method VPNConnectionsClient.CreateOrUpdate. -type VPNConnectionsClientCreateOrUpdateResult struct { VPNConnection } -// VPNConnectionsClientDeletePollerResponse contains the response from method VPNConnectionsClient.Delete. -type VPNConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNConnectionsClientDeleteResponse, error) { - respType := VPNConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNConnectionsClientDeletePollerResponse from the provided client and resume token. -func (l *VPNConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *VPNConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VPNConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNConnectionsClientDeleteResponse contains the response from method VPNConnectionsClient.Delete. type VPNConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VPNConnectionsClientGetResponse contains the response from method VPNConnectionsClient.Get. type VPNConnectionsClientGetResponse struct { - VPNConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNConnectionsClientGetResult contains the result from method VPNConnectionsClient.Get. -type VPNConnectionsClientGetResult struct { VPNConnection } // VPNConnectionsClientListByVPNGatewayResponse contains the response from method VPNConnectionsClient.ListByVPNGateway. type VPNConnectionsClientListByVPNGatewayResponse struct { - VPNConnectionsClientListByVPNGatewayResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNConnectionsClientListByVPNGatewayResult contains the result from method VPNConnectionsClient.ListByVPNGateway. -type VPNConnectionsClientListByVPNGatewayResult struct { ListVPNConnectionsResult } -// VPNConnectionsClientStartPacketCapturePollerResponse contains the response from method VPNConnectionsClient.StartPacketCapture. -type VPNConnectionsClientStartPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNConnectionsClientStartPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNConnectionsClientStartPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNConnectionsClientStartPacketCaptureResponse, error) { - respType := VPNConnectionsClientStartPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNConnectionsClientStartPacketCapturePollerResponse from the provided client and resume token. -func (l *VPNConnectionsClientStartPacketCapturePollerResponse) Resume(ctx context.Context, client *VPNConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNConnectionsClient.StartPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VPNConnectionsClientStartPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNConnectionsClientStartPacketCaptureResponse contains the response from method VPNConnectionsClient.StartPacketCapture. type VPNConnectionsClientStartPacketCaptureResponse struct { - VPNConnectionsClientStartPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNConnectionsClientStartPacketCaptureResult contains the result from method VPNConnectionsClient.StartPacketCapture. -type VPNConnectionsClientStartPacketCaptureResult struct { Value *string } -// VPNConnectionsClientStopPacketCapturePollerResponse contains the response from method VPNConnectionsClient.StopPacketCapture. -type VPNConnectionsClientStopPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNConnectionsClientStopPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNConnectionsClientStopPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNConnectionsClientStopPacketCaptureResponse, error) { - respType := VPNConnectionsClientStopPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNConnectionsClientStopPacketCapturePollerResponse from the provided client and resume token. -func (l *VPNConnectionsClientStopPacketCapturePollerResponse) Resume(ctx context.Context, client *VPNConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNConnectionsClient.StopPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VPNConnectionsClientStopPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStartPacketCaptureResponse. +func (v *VPNConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VPNConnectionsClientStopPacketCaptureResponse contains the response from method VPNConnectionsClient.StopPacketCapture. type VPNConnectionsClientStopPacketCaptureResponse struct { - VPNConnectionsClientStopPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNConnectionsClientStopPacketCaptureResult contains the result from method VPNConnectionsClient.StopPacketCapture. -type VPNConnectionsClientStopPacketCaptureResult struct { Value *string } -// VPNGatewaysClientCreateOrUpdatePollerResponse contains the response from method VPNGatewaysClient.CreateOrUpdate. -type VPNGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientCreateOrUpdateResponse, error) { - respType := VPNGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNConnectionsClientStopPacketCaptureResponse. +func (v *VPNConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VPNGatewaysClientCreateOrUpdateResponse contains the response from method VPNGatewaysClient.CreateOrUpdate. type VPNGatewaysClientCreateOrUpdateResponse struct { - VPNGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientCreateOrUpdateResult contains the result from method VPNGatewaysClient.CreateOrUpdate. -type VPNGatewaysClientCreateOrUpdateResult struct { VPNGateway } -// VPNGatewaysClientDeletePollerResponse contains the response from method VPNGatewaysClient.Delete. -type VPNGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientDeleteResponse, error) { - respType := VPNGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNGatewaysClientDeleteResponse contains the response from method VPNGatewaysClient.Delete. type VPNGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VPNGatewaysClientGetResponse contains the response from method VPNGatewaysClient.Get. type VPNGatewaysClientGetResponse struct { - VPNGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientGetResult contains the result from method VPNGatewaysClient.Get. -type VPNGatewaysClientGetResult struct { VPNGateway } // VPNGatewaysClientListByResourceGroupResponse contains the response from method VPNGatewaysClient.ListByResourceGroup. type VPNGatewaysClientListByResourceGroupResponse struct { - VPNGatewaysClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientListByResourceGroupResult contains the result from method VPNGatewaysClient.ListByResourceGroup. -type VPNGatewaysClientListByResourceGroupResult struct { ListVPNGatewaysResult } // VPNGatewaysClientListResponse contains the response from method VPNGatewaysClient.List. type VPNGatewaysClientListResponse struct { - VPNGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientListResult contains the result from method VPNGatewaysClient.List. -type VPNGatewaysClientListResult struct { ListVPNGatewaysResult } -// VPNGatewaysClientResetPollerResponse contains the response from method VPNGatewaysClient.Reset. -type VPNGatewaysClientResetPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientResetPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientResetPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientResetResponse, error) { - respType := VPNGatewaysClientResetResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientResetPollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientResetPollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.Reset", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientResetPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNGatewaysClientResetResponse contains the response from method VPNGatewaysClient.Reset. type VPNGatewaysClientResetResponse struct { - VPNGatewaysClientResetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientResetResult contains the result from method VPNGatewaysClient.Reset. -type VPNGatewaysClientResetResult struct { VPNGateway } -// VPNGatewaysClientStartPacketCapturePollerResponse contains the response from method VPNGatewaysClient.StartPacketCapture. -type VPNGatewaysClientStartPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientStartPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientStartPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientStartPacketCaptureResponse, error) { - respType := VPNGatewaysClientStartPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientStartPacketCapturePollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientStartPacketCapturePollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.StartPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientStartPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNGatewaysClientStartPacketCaptureResponse contains the response from method VPNGatewaysClient.StartPacketCapture. type VPNGatewaysClientStartPacketCaptureResponse struct { - VPNGatewaysClientStartPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientStartPacketCaptureResult contains the result from method VPNGatewaysClient.StartPacketCapture. -type VPNGatewaysClientStartPacketCaptureResult struct { Value *string } -// VPNGatewaysClientStopPacketCapturePollerResponse contains the response from method VPNGatewaysClient.StopPacketCapture. -type VPNGatewaysClientStopPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientStopPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientStopPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientStopPacketCaptureResponse, error) { - respType := VPNGatewaysClientStopPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientStopPacketCapturePollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientStopPacketCapturePollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.StopPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientStopPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStartPacketCaptureResponse. +func (v *VPNGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VPNGatewaysClientStopPacketCaptureResponse contains the response from method VPNGatewaysClient.StopPacketCapture. type VPNGatewaysClientStopPacketCaptureResponse struct { - VPNGatewaysClientStopPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientStopPacketCaptureResult contains the result from method VPNGatewaysClient.StopPacketCapture. -type VPNGatewaysClientStopPacketCaptureResult struct { Value *string } -// VPNGatewaysClientUpdateTagsPollerResponse contains the response from method VPNGatewaysClient.UpdateTags. -type VPNGatewaysClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNGatewaysClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNGatewaysClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNGatewaysClientUpdateTagsResponse, error) { - respType := VPNGatewaysClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNGatewaysClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *VPNGatewaysClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *VPNGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNGatewaysClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &VPNGatewaysClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNGatewaysClientStopPacketCaptureResponse. +func (v *VPNGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VPNGatewaysClientUpdateTagsResponse contains the response from method VPNGatewaysClient.UpdateTags. type VPNGatewaysClientUpdateTagsResponse struct { - VPNGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNGatewaysClientUpdateTagsResult contains the result from method VPNGatewaysClient.UpdateTags. -type VPNGatewaysClientUpdateTagsResult struct { VPNGateway } -// VPNLinkConnectionsClientGetIkeSasPollerResponse contains the response from method VPNLinkConnectionsClient.GetIkeSas. -type VPNLinkConnectionsClientGetIkeSasPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNLinkConnectionsClientGetIkeSasPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNLinkConnectionsClientGetIkeSasPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNLinkConnectionsClientGetIkeSasResponse, error) { - respType := VPNLinkConnectionsClientGetIkeSasResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNLinkConnectionsClientGetIkeSasPollerResponse from the provided client and resume token. -func (l *VPNLinkConnectionsClientGetIkeSasPollerResponse) Resume(ctx context.Context, client *VPNLinkConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNLinkConnectionsClient.GetIkeSas", token, client.pl) - if err != nil { - return err - } - poller := &VPNLinkConnectionsClientGetIkeSasPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNLinkConnectionsClientGetIkeSasResponse contains the response from method VPNLinkConnectionsClient.GetIkeSas. type VPNLinkConnectionsClientGetIkeSasResponse struct { - VPNLinkConnectionsClientGetIkeSasResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + Value *string } -// VPNLinkConnectionsClientGetIkeSasResult contains the result from method VPNLinkConnectionsClient.GetIkeSas. -type VPNLinkConnectionsClientGetIkeSasResult struct { - Value *string +// UnmarshalJSON implements the json.Unmarshaller interface for type VPNLinkConnectionsClientGetIkeSasResponse. +func (v *VPNLinkConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VPNLinkConnectionsClientListByVPNConnectionResponse contains the response from method VPNLinkConnectionsClient.ListByVPNConnection. type VPNLinkConnectionsClientListByVPNConnectionResponse struct { - VPNLinkConnectionsClientListByVPNConnectionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNLinkConnectionsClientListByVPNConnectionResult contains the result from method VPNLinkConnectionsClient.ListByVPNConnection. -type VPNLinkConnectionsClientListByVPNConnectionResult struct { ListVPNSiteLinkConnectionsResult } -// VPNLinkConnectionsClientResetConnectionPollerResponse contains the response from method VPNLinkConnectionsClient.ResetConnection. -type VPNLinkConnectionsClientResetConnectionPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNLinkConnectionsClientResetConnectionPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNLinkConnectionsClientResetConnectionPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNLinkConnectionsClientResetConnectionResponse, error) { - respType := VPNLinkConnectionsClientResetConnectionResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNLinkConnectionsClientResetConnectionPollerResponse from the provided client and resume token. -func (l *VPNLinkConnectionsClientResetConnectionPollerResponse) Resume(ctx context.Context, client *VPNLinkConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNLinkConnectionsClient.ResetConnection", token, client.pl) - if err != nil { - return err - } - poller := &VPNLinkConnectionsClientResetConnectionPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNLinkConnectionsClientResetConnectionResponse contains the response from method VPNLinkConnectionsClient.ResetConnection. type VPNLinkConnectionsClientResetConnectionResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.List. -type VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse, error) { - respType := VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNServerConfigurationsResponse) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse from the provided client and -// resume token. -func (l *VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse) Resume(ctx context.Context, client *VPNServerConfigurationsAssociatedWithVirtualWanClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNServerConfigurationsAssociatedWithVirtualWanClient.List", token, client.pl) - if err != nil { - return err - } - poller := &VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse contains the response from method VPNServerConfigurationsAssociatedWithVirtualWanClient.List. type VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse struct { - VPNServerConfigurationsAssociatedWithVirtualWanClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsAssociatedWithVirtualWanClientListResult contains the result from method VPNServerConfigurationsAssociatedWithVirtualWanClient.List. -type VPNServerConfigurationsAssociatedWithVirtualWanClientListResult struct { VPNServerConfigurationsResponse } -// VPNServerConfigurationsClientCreateOrUpdatePollerResponse contains the response from method VPNServerConfigurationsClient.CreateOrUpdate. -type VPNServerConfigurationsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNServerConfigurationsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNServerConfigurationsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNServerConfigurationsClientCreateOrUpdateResponse, error) { - respType := VPNServerConfigurationsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNServerConfiguration) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNServerConfigurationsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VPNServerConfigurationsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VPNServerConfigurationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNServerConfigurationsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VPNServerConfigurationsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNServerConfigurationsClientCreateOrUpdateResponse contains the response from method VPNServerConfigurationsClient.CreateOrUpdate. type VPNServerConfigurationsClientCreateOrUpdateResponse struct { - VPNServerConfigurationsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsClientCreateOrUpdateResult contains the result from method VPNServerConfigurationsClient.CreateOrUpdate. -type VPNServerConfigurationsClientCreateOrUpdateResult struct { VPNServerConfiguration } -// VPNServerConfigurationsClientDeletePollerResponse contains the response from method VPNServerConfigurationsClient.Delete. -type VPNServerConfigurationsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNServerConfigurationsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNServerConfigurationsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNServerConfigurationsClientDeleteResponse, error) { - respType := VPNServerConfigurationsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNServerConfigurationsClientDeletePollerResponse from the provided client and resume token. -func (l *VPNServerConfigurationsClientDeletePollerResponse) Resume(ctx context.Context, client *VPNServerConfigurationsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNServerConfigurationsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VPNServerConfigurationsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNServerConfigurationsClientDeleteResponse contains the response from method VPNServerConfigurationsClient.Delete. type VPNServerConfigurationsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VPNServerConfigurationsClientGetResponse contains the response from method VPNServerConfigurationsClient.Get. type VPNServerConfigurationsClientGetResponse struct { - VPNServerConfigurationsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsClientGetResult contains the result from method VPNServerConfigurationsClient.Get. -type VPNServerConfigurationsClientGetResult struct { VPNServerConfiguration } // VPNServerConfigurationsClientListByResourceGroupResponse contains the response from method VPNServerConfigurationsClient.ListByResourceGroup. type VPNServerConfigurationsClientListByResourceGroupResponse struct { - VPNServerConfigurationsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsClientListByResourceGroupResult contains the result from method VPNServerConfigurationsClient.ListByResourceGroup. -type VPNServerConfigurationsClientListByResourceGroupResult struct { ListVPNServerConfigurationsResult } // VPNServerConfigurationsClientListResponse contains the response from method VPNServerConfigurationsClient.List. type VPNServerConfigurationsClientListResponse struct { - VPNServerConfigurationsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsClientListResult contains the result from method VPNServerConfigurationsClient.List. -type VPNServerConfigurationsClientListResult struct { ListVPNServerConfigurationsResult } // VPNServerConfigurationsClientUpdateTagsResponse contains the response from method VPNServerConfigurationsClient.UpdateTags. type VPNServerConfigurationsClientUpdateTagsResponse struct { - VPNServerConfigurationsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNServerConfigurationsClientUpdateTagsResult contains the result from method VPNServerConfigurationsClient.UpdateTags. -type VPNServerConfigurationsClientUpdateTagsResult struct { VPNServerConfiguration } // VPNSiteLinkConnectionsClientGetResponse contains the response from method VPNSiteLinkConnectionsClient.Get. type VPNSiteLinkConnectionsClientGetResponse struct { - VPNSiteLinkConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSiteLinkConnectionsClientGetResult contains the result from method VPNSiteLinkConnectionsClient.Get. -type VPNSiteLinkConnectionsClientGetResult struct { VPNSiteLinkConnection } // VPNSiteLinksClientGetResponse contains the response from method VPNSiteLinksClient.Get. type VPNSiteLinksClientGetResponse struct { - VPNSiteLinksClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSiteLinksClientGetResult contains the result from method VPNSiteLinksClient.Get. -type VPNSiteLinksClientGetResult struct { VPNSiteLink } // VPNSiteLinksClientListByVPNSiteResponse contains the response from method VPNSiteLinksClient.ListByVPNSite. type VPNSiteLinksClientListByVPNSiteResponse struct { - VPNSiteLinksClientListByVPNSiteResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSiteLinksClientListByVPNSiteResult contains the result from method VPNSiteLinksClient.ListByVPNSite. -type VPNSiteLinksClientListByVPNSiteResult struct { ListVPNSiteLinksResult } -// VPNSitesClientCreateOrUpdatePollerResponse contains the response from method VPNSitesClient.CreateOrUpdate. -type VPNSitesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNSitesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNSitesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNSitesClientCreateOrUpdateResponse, error) { - respType := VPNSitesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNSite) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNSitesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VPNSitesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VPNSitesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNSitesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VPNSitesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNSitesClientCreateOrUpdateResponse contains the response from method VPNSitesClient.CreateOrUpdate. type VPNSitesClientCreateOrUpdateResponse struct { - VPNSitesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSitesClientCreateOrUpdateResult contains the result from method VPNSitesClient.CreateOrUpdate. -type VPNSitesClientCreateOrUpdateResult struct { VPNSite } -// VPNSitesClientDeletePollerResponse contains the response from method VPNSitesClient.Delete. -type VPNSitesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNSitesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNSitesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNSitesClientDeleteResponse, error) { - respType := VPNSitesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNSitesClientDeletePollerResponse from the provided client and resume token. -func (l *VPNSitesClientDeletePollerResponse) Resume(ctx context.Context, client *VPNSitesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNSitesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VPNSitesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNSitesClientDeleteResponse contains the response from method VPNSitesClient.Delete. type VPNSitesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VPNSitesClientGetResponse contains the response from method VPNSitesClient.Get. type VPNSitesClientGetResponse struct { - VPNSitesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSitesClientGetResult contains the result from method VPNSitesClient.Get. -type VPNSitesClientGetResult struct { VPNSite } // VPNSitesClientListByResourceGroupResponse contains the response from method VPNSitesClient.ListByResourceGroup. type VPNSitesClientListByResourceGroupResponse struct { - VPNSitesClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSitesClientListByResourceGroupResult contains the result from method VPNSitesClient.ListByResourceGroup. -type VPNSitesClientListByResourceGroupResult struct { ListVPNSitesResult } // VPNSitesClientListResponse contains the response from method VPNSitesClient.List. type VPNSitesClientListResponse struct { - VPNSitesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSitesClientListResult contains the result from method VPNSitesClient.List. -type VPNSitesClientListResult struct { ListVPNSitesResult } // VPNSitesClientUpdateTagsResponse contains the response from method VPNSitesClient.UpdateTags. type VPNSitesClientUpdateTagsResponse struct { - VPNSitesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VPNSitesClientUpdateTagsResult contains the result from method VPNSitesClient.UpdateTags. -type VPNSitesClientUpdateTagsResult struct { VPNSite } -// VPNSitesConfigurationClientDownloadPollerResponse contains the response from method VPNSitesConfigurationClient.Download. -type VPNSitesConfigurationClientDownloadPollerResponse struct { - // Poller contains an initialized poller. - Poller *VPNSitesConfigurationClientDownloadPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VPNSitesConfigurationClientDownloadPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VPNSitesConfigurationClientDownloadResponse, error) { - respType := VPNSitesConfigurationClientDownloadResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VPNSitesConfigurationClientDownloadPollerResponse from the provided client and resume token. -func (l *VPNSitesConfigurationClientDownloadPollerResponse) Resume(ctx context.Context, client *VPNSitesConfigurationClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VPNSitesConfigurationClient.Download", token, client.pl) - if err != nil { - return err - } - poller := &VPNSitesConfigurationClientDownloadPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VPNSitesConfigurationClientDownloadResponse contains the response from method VPNSitesConfigurationClient.Download. type VPNSitesConfigurationClientDownloadResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualApplianceSKUsClientGetResponse contains the response from method VirtualApplianceSKUsClient.Get. type VirtualApplianceSKUsClientGetResponse struct { - VirtualApplianceSKUsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualApplianceSKUsClientGetResult contains the result from method VirtualApplianceSKUsClient.Get. -type VirtualApplianceSKUsClientGetResult struct { VirtualApplianceSKU } // VirtualApplianceSKUsClientListResponse contains the response from method VirtualApplianceSKUsClient.List. type VirtualApplianceSKUsClientListResponse struct { - VirtualApplianceSKUsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualApplianceSKUsClientListResult contains the result from method VirtualApplianceSKUsClient.List. -type VirtualApplianceSKUsClientListResult struct { VirtualApplianceSKUListResult } -// VirtualApplianceSitesClientCreateOrUpdatePollerResponse contains the response from method VirtualApplianceSitesClient.CreateOrUpdate. -type VirtualApplianceSitesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualApplianceSitesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualApplianceSitesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualApplianceSitesClientCreateOrUpdateResponse, error) { - respType := VirtualApplianceSitesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualApplianceSite) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualApplianceSitesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualApplianceSitesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualApplianceSitesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualApplianceSitesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualApplianceSitesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualApplianceSitesClientCreateOrUpdateResponse contains the response from method VirtualApplianceSitesClient.CreateOrUpdate. type VirtualApplianceSitesClientCreateOrUpdateResponse struct { - VirtualApplianceSitesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualApplianceSitesClientCreateOrUpdateResult contains the result from method VirtualApplianceSitesClient.CreateOrUpdate. -type VirtualApplianceSitesClientCreateOrUpdateResult struct { VirtualApplianceSite } -// VirtualApplianceSitesClientDeletePollerResponse contains the response from method VirtualApplianceSitesClient.Delete. -type VirtualApplianceSitesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualApplianceSitesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualApplianceSitesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualApplianceSitesClientDeleteResponse, error) { - respType := VirtualApplianceSitesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualApplianceSitesClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualApplianceSitesClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualApplianceSitesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualApplianceSitesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualApplianceSitesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualApplianceSitesClientDeleteResponse contains the response from method VirtualApplianceSitesClient.Delete. type VirtualApplianceSitesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualApplianceSitesClientGetResponse contains the response from method VirtualApplianceSitesClient.Get. type VirtualApplianceSitesClientGetResponse struct { - VirtualApplianceSitesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualApplianceSitesClientGetResult contains the result from method VirtualApplianceSitesClient.Get. -type VirtualApplianceSitesClientGetResult struct { VirtualApplianceSite } // VirtualApplianceSitesClientListResponse contains the response from method VirtualApplianceSitesClient.List. type VirtualApplianceSitesClientListResponse struct { - VirtualApplianceSitesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualApplianceSitesClientListResult contains the result from method VirtualApplianceSitesClient.List. -type VirtualApplianceSitesClientListResult struct { VirtualApplianceSiteListResult } -// VirtualAppliancesClientCreateOrUpdatePollerResponse contains the response from method VirtualAppliancesClient.CreateOrUpdate. -type VirtualAppliancesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualAppliancesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualAppliancesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualAppliancesClientCreateOrUpdateResponse, error) { - respType := VirtualAppliancesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualAppliance) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualAppliancesClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualAppliancesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualAppliancesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualAppliancesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualAppliancesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualAppliancesClientCreateOrUpdateResponse contains the response from method VirtualAppliancesClient.CreateOrUpdate. type VirtualAppliancesClientCreateOrUpdateResponse struct { - VirtualAppliancesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualAppliancesClientCreateOrUpdateResult contains the result from method VirtualAppliancesClient.CreateOrUpdate. -type VirtualAppliancesClientCreateOrUpdateResult struct { VirtualAppliance } -// VirtualAppliancesClientDeletePollerResponse contains the response from method VirtualAppliancesClient.Delete. -type VirtualAppliancesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualAppliancesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualAppliancesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualAppliancesClientDeleteResponse, error) { - respType := VirtualAppliancesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualAppliancesClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualAppliancesClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualAppliancesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualAppliancesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualAppliancesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualAppliancesClientDeleteResponse contains the response from method VirtualAppliancesClient.Delete. type VirtualAppliancesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualAppliancesClientGetResponse contains the response from method VirtualAppliancesClient.Get. type VirtualAppliancesClientGetResponse struct { - VirtualAppliancesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualAppliancesClientGetResult contains the result from method VirtualAppliancesClient.Get. -type VirtualAppliancesClientGetResult struct { VirtualAppliance } // VirtualAppliancesClientListByResourceGroupResponse contains the response from method VirtualAppliancesClient.ListByResourceGroup. type VirtualAppliancesClientListByResourceGroupResponse struct { - VirtualAppliancesClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualAppliancesClientListByResourceGroupResult contains the result from method VirtualAppliancesClient.ListByResourceGroup. -type VirtualAppliancesClientListByResourceGroupResult struct { VirtualApplianceListResult } // VirtualAppliancesClientListResponse contains the response from method VirtualAppliancesClient.List. type VirtualAppliancesClientListResponse struct { - VirtualAppliancesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualAppliancesClientListResult contains the result from method VirtualAppliancesClient.List. -type VirtualAppliancesClientListResult struct { VirtualApplianceListResult } // VirtualAppliancesClientUpdateTagsResponse contains the response from method VirtualAppliancesClient.UpdateTags. type VirtualAppliancesClientUpdateTagsResponse struct { - VirtualAppliancesClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualAppliancesClientUpdateTagsResult contains the result from method VirtualAppliancesClient.UpdateTags. -type VirtualAppliancesClientUpdateTagsResult struct { VirtualAppliance } -// VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse contains the response from method VirtualHubBgpConnectionClient.CreateOrUpdate. -type VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubBgpConnectionClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubBgpConnectionClientCreateOrUpdateResponse, error) { - respType := VirtualHubBgpConnectionClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BgpConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualHubBgpConnectionClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubBgpConnectionClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubBgpConnectionClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubBgpConnectionClientCreateOrUpdateResponse contains the response from method VirtualHubBgpConnectionClient.CreateOrUpdate. type VirtualHubBgpConnectionClientCreateOrUpdateResponse struct { - VirtualHubBgpConnectionClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubBgpConnectionClientCreateOrUpdateResult contains the result from method VirtualHubBgpConnectionClient.CreateOrUpdate. -type VirtualHubBgpConnectionClientCreateOrUpdateResult struct { BgpConnection } -// VirtualHubBgpConnectionClientDeletePollerResponse contains the response from method VirtualHubBgpConnectionClient.Delete. -type VirtualHubBgpConnectionClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubBgpConnectionClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubBgpConnectionClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubBgpConnectionClientDeleteResponse, error) { - respType := VirtualHubBgpConnectionClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubBgpConnectionClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualHubBgpConnectionClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualHubBgpConnectionClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubBgpConnectionClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubBgpConnectionClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubBgpConnectionClientDeleteResponse contains the response from method VirtualHubBgpConnectionClient.Delete. type VirtualHubBgpConnectionClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualHubBgpConnectionClientGetResponse contains the response from method VirtualHubBgpConnectionClient.Get. type VirtualHubBgpConnectionClientGetResponse struct { - VirtualHubBgpConnectionClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubBgpConnectionClientGetResult contains the result from method VirtualHubBgpConnectionClient.Get. -type VirtualHubBgpConnectionClientGetResult struct { BgpConnection } -// VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse contains the response from method VirtualHubBgpConnectionsClient.ListAdvertisedRoutes. -type VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse, error) { - respType := VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PeerRouteList) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse from the provided client and resume -// token. -func (l *VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse) Resume(ctx context.Context, client *VirtualHubBgpConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubBgpConnectionsClient.ListAdvertisedRoutes", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListAdvertisedRoutes. type VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse struct { - VirtualHubBgpConnectionsClientListAdvertisedRoutesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubBgpConnectionsClientListAdvertisedRoutesResult contains the result from method VirtualHubBgpConnectionsClient.ListAdvertisedRoutes. -type VirtualHubBgpConnectionsClientListAdvertisedRoutesResult struct { - PeerRouteList -} - -// VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse contains the response from method VirtualHubBgpConnectionsClient.ListLearnedRoutes. -type VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubBgpConnectionsClientListLearnedRoutesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubBgpConnectionsClientListLearnedRoutesResponse, error) { - respType := VirtualHubBgpConnectionsClientListLearnedRoutesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.PeerRouteList) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse from the provided client and resume token. -func (l *VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse) Resume(ctx context.Context, client *VirtualHubBgpConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubBgpConnectionsClient.ListLearnedRoutes", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubBgpConnectionsClientListLearnedRoutesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + PeerRouteList } // VirtualHubBgpConnectionsClientListLearnedRoutesResponse contains the response from method VirtualHubBgpConnectionsClient.ListLearnedRoutes. type VirtualHubBgpConnectionsClientListLearnedRoutesResponse struct { - VirtualHubBgpConnectionsClientListLearnedRoutesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubBgpConnectionsClientListLearnedRoutesResult contains the result from method VirtualHubBgpConnectionsClient.ListLearnedRoutes. -type VirtualHubBgpConnectionsClientListLearnedRoutesResult struct { PeerRouteList } // VirtualHubBgpConnectionsClientListResponse contains the response from method VirtualHubBgpConnectionsClient.List. type VirtualHubBgpConnectionsClientListResponse struct { - VirtualHubBgpConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubBgpConnectionsClientListResult contains the result from method VirtualHubBgpConnectionsClient.List. -type VirtualHubBgpConnectionsClientListResult struct { ListVirtualHubBgpConnectionResults } -// VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse contains the response from method VirtualHubIPConfigurationClient.CreateOrUpdate. -type VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubIPConfigurationClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubIPConfigurationClientCreateOrUpdateResponse, error) { - respType := VirtualHubIPConfigurationClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.HubIPConfiguration) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualHubIPConfigurationClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubIPConfigurationClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubIPConfigurationClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubIPConfigurationClientCreateOrUpdateResponse contains the response from method VirtualHubIPConfigurationClient.CreateOrUpdate. type VirtualHubIPConfigurationClientCreateOrUpdateResponse struct { - VirtualHubIPConfigurationClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubIPConfigurationClientCreateOrUpdateResult contains the result from method VirtualHubIPConfigurationClient.CreateOrUpdate. -type VirtualHubIPConfigurationClientCreateOrUpdateResult struct { HubIPConfiguration } -// VirtualHubIPConfigurationClientDeletePollerResponse contains the response from method VirtualHubIPConfigurationClient.Delete. -type VirtualHubIPConfigurationClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubIPConfigurationClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubIPConfigurationClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubIPConfigurationClientDeleteResponse, error) { - respType := VirtualHubIPConfigurationClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubIPConfigurationClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualHubIPConfigurationClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualHubIPConfigurationClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubIPConfigurationClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubIPConfigurationClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubIPConfigurationClientDeleteResponse contains the response from method VirtualHubIPConfigurationClient.Delete. type VirtualHubIPConfigurationClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualHubIPConfigurationClientGetResponse contains the response from method VirtualHubIPConfigurationClient.Get. type VirtualHubIPConfigurationClientGetResponse struct { - VirtualHubIPConfigurationClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubIPConfigurationClientGetResult contains the result from method VirtualHubIPConfigurationClient.Get. -type VirtualHubIPConfigurationClientGetResult struct { HubIPConfiguration } // VirtualHubIPConfigurationClientListResponse contains the response from method VirtualHubIPConfigurationClient.List. type VirtualHubIPConfigurationClientListResponse struct { - VirtualHubIPConfigurationClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubIPConfigurationClientListResult contains the result from method VirtualHubIPConfigurationClient.List. -type VirtualHubIPConfigurationClientListResult struct { ListVirtualHubIPConfigurationResults } -// VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse contains the response from method VirtualHubRouteTableV2SClient.CreateOrUpdate. -type VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubRouteTableV2SClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubRouteTableV2SClientCreateOrUpdateResponse, error) { - respType := VirtualHubRouteTableV2SClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualHubRouteTableV2) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualHubRouteTableV2SClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubRouteTableV2SClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubRouteTableV2SClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubRouteTableV2SClientCreateOrUpdateResponse contains the response from method VirtualHubRouteTableV2SClient.CreateOrUpdate. type VirtualHubRouteTableV2SClientCreateOrUpdateResponse struct { - VirtualHubRouteTableV2SClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubRouteTableV2SClientCreateOrUpdateResult contains the result from method VirtualHubRouteTableV2SClient.CreateOrUpdate. -type VirtualHubRouteTableV2SClientCreateOrUpdateResult struct { VirtualHubRouteTableV2 } -// VirtualHubRouteTableV2SClientDeletePollerResponse contains the response from method VirtualHubRouteTableV2SClient.Delete. -type VirtualHubRouteTableV2SClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubRouteTableV2SClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubRouteTableV2SClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubRouteTableV2SClientDeleteResponse, error) { - respType := VirtualHubRouteTableV2SClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubRouteTableV2SClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualHubRouteTableV2SClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualHubRouteTableV2SClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubRouteTableV2SClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubRouteTableV2SClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubRouteTableV2SClientDeleteResponse contains the response from method VirtualHubRouteTableV2SClient.Delete. type VirtualHubRouteTableV2SClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualHubRouteTableV2SClientGetResponse contains the response from method VirtualHubRouteTableV2SClient.Get. type VirtualHubRouteTableV2SClientGetResponse struct { - VirtualHubRouteTableV2SClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubRouteTableV2SClientGetResult contains the result from method VirtualHubRouteTableV2SClient.Get. -type VirtualHubRouteTableV2SClientGetResult struct { VirtualHubRouteTableV2 } // VirtualHubRouteTableV2SClientListResponse contains the response from method VirtualHubRouteTableV2SClient.List. type VirtualHubRouteTableV2SClientListResponse struct { - VirtualHubRouteTableV2SClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubRouteTableV2SClientListResult contains the result from method VirtualHubRouteTableV2SClient.List. -type VirtualHubRouteTableV2SClientListResult struct { ListVirtualHubRouteTableV2SResult } -// VirtualHubsClientCreateOrUpdatePollerResponse contains the response from method VirtualHubsClient.CreateOrUpdate. -type VirtualHubsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubsClientCreateOrUpdateResponse, error) { - respType := VirtualHubsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualHub) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualHubsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualHubsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubsClientCreateOrUpdateResponse contains the response from method VirtualHubsClient.CreateOrUpdate. type VirtualHubsClientCreateOrUpdateResponse struct { - VirtualHubsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientCreateOrUpdateResult contains the result from method VirtualHubsClient.CreateOrUpdate. -type VirtualHubsClientCreateOrUpdateResult struct { VirtualHub } -// VirtualHubsClientDeletePollerResponse contains the response from method VirtualHubsClient.Delete. -type VirtualHubsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubsClientDeleteResponse, error) { - respType := VirtualHubsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubsClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualHubsClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualHubsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualHubsClientDeleteResponse contains the response from method VirtualHubsClient.Delete. type VirtualHubsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse contains the response from method VirtualHubsClient.GetEffectiveVirtualHubRoutes. -type VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualHubsClientGetEffectiveVirtualHubRoutesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualHubsClientGetEffectiveVirtualHubRoutesResponse, error) { - respType := VirtualHubsClientGetEffectiveVirtualHubRoutesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse from the provided client and resume token. -func (l *VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse) Resume(ctx context.Context, client *VirtualHubsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualHubsClient.GetEffectiveVirtualHubRoutes", token, client.pl) - if err != nil { - return err - } - poller := &VirtualHubsClientGetEffectiveVirtualHubRoutesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualHubsClientGetEffectiveVirtualHubRoutesResponse contains the response from method VirtualHubsClient.GetEffectiveVirtualHubRoutes. type VirtualHubsClientGetEffectiveVirtualHubRoutesResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualHubsClientGetResponse contains the response from method VirtualHubsClient.Get. type VirtualHubsClientGetResponse struct { - VirtualHubsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientGetResult contains the result from method VirtualHubsClient.Get. -type VirtualHubsClientGetResult struct { VirtualHub } // VirtualHubsClientListByResourceGroupResponse contains the response from method VirtualHubsClient.ListByResourceGroup. type VirtualHubsClientListByResourceGroupResponse struct { - VirtualHubsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientListByResourceGroupResult contains the result from method VirtualHubsClient.ListByResourceGroup. -type VirtualHubsClientListByResourceGroupResult struct { ListVirtualHubsResult } // VirtualHubsClientListResponse contains the response from method VirtualHubsClient.List. type VirtualHubsClientListResponse struct { - VirtualHubsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientListResult contains the result from method VirtualHubsClient.List. -type VirtualHubsClientListResult struct { ListVirtualHubsResult } // VirtualHubsClientUpdateTagsResponse contains the response from method VirtualHubsClient.UpdateTags. type VirtualHubsClientUpdateTagsResponse struct { - VirtualHubsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualHubsClientUpdateTagsResult contains the result from method VirtualHubsClient.UpdateTags. -type VirtualHubsClientUpdateTagsResult struct { VirtualHub } -// VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.CreateOrUpdate. -type VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGatewayConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayConnectionsClient.CreateOrUpdate. type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse struct { - VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult contains the result from method VirtualNetworkGatewayConnectionsClient.CreateOrUpdate. -type VirtualNetworkGatewayConnectionsClientCreateOrUpdateResult struct { VirtualNetworkGatewayConnection } -// VirtualNetworkGatewayConnectionsClientDeletePollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Delete. -type VirtualNetworkGatewayConnectionsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientDeleteResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewayConnectionsClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayConnectionsClientDeleteResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Delete. type VirtualNetworkGatewayConnectionsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetIkeSas. -type VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientGetIkeSasPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientGetIkeSasResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientGetIkeSasResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.GetIkeSas", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientGetIkeSasPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualNetworkGatewayConnectionsClientGetIkeSasResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetIkeSas. type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse struct { - VirtualNetworkGatewayConnectionsClientGetIkeSasResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + Value *string } -// VirtualNetworkGatewayConnectionsClientGetIkeSasResult contains the result from method VirtualNetworkGatewayConnectionsClient.GetIkeSas. -type VirtualNetworkGatewayConnectionsClientGetIkeSasResult struct { - Value *string +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientGetIkeSasResponse. +func (v *VirtualNetworkGatewayConnectionsClientGetIkeSasResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewayConnectionsClientGetResponse contains the response from method VirtualNetworkGatewayConnectionsClient.Get. type VirtualNetworkGatewayConnectionsClientGetResponse struct { - VirtualNetworkGatewayConnectionsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientGetResult contains the result from method VirtualNetworkGatewayConnectionsClient.Get. -type VirtualNetworkGatewayConnectionsClientGetResult struct { VirtualNetworkGatewayConnection } // VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.GetSharedKey. type VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse struct { - VirtualNetworkGatewayConnectionsClientGetSharedKeyResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientGetSharedKeyResult contains the result from method VirtualNetworkGatewayConnectionsClient.GetSharedKey. -type VirtualNetworkGatewayConnectionsClientGetSharedKeyResult struct { ConnectionSharedKey } // VirtualNetworkGatewayConnectionsClientListResponse contains the response from method VirtualNetworkGatewayConnectionsClient.List. type VirtualNetworkGatewayConnectionsClientListResponse struct { - VirtualNetworkGatewayConnectionsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientListResult contains the result from method VirtualNetworkGatewayConnectionsClient.List. -type VirtualNetworkGatewayConnectionsClientListResult struct { VirtualNetworkGatewayConnectionListResult } -// VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetConnection. -type VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientResetConnectionPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientResetConnectionResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientResetConnectionResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.ResetConnection", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientResetConnectionPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayConnectionsClientResetConnectionResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetConnection. type VirtualNetworkGatewayConnectionsClientResetConnectionResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetSharedKey. -type VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConnectionResetSharedKey) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.ResetSharedKey", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.ResetSharedKey. type VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse struct { - VirtualNetworkGatewayConnectionsClientResetSharedKeyResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientResetSharedKeyResult contains the result from method VirtualNetworkGatewayConnectionsClient.ResetSharedKey. -type VirtualNetworkGatewayConnectionsClientResetSharedKeyResult struct { ConnectionResetSharedKey } -// VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.SetSharedKey. -type VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConnectionSharedKey) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.SetSharedKey", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse contains the response from method VirtualNetworkGatewayConnectionsClient.SetSharedKey. type VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse struct { - VirtualNetworkGatewayConnectionsClientSetSharedKeyResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientSetSharedKeyResult contains the result from method VirtualNetworkGatewayConnectionsClient.SetSharedKey. -type VirtualNetworkGatewayConnectionsClientSetSharedKeyResult struct { ConnectionSharedKey } -// VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StartPacketCapture. -type VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse from the provided client and -// resume token. -func (l *VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.StartPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StartPacketCapture. type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse struct { - VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult contains the result from method VirtualNetworkGatewayConnectionsClient.StartPacketCapture. -type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResult struct { Value *string } -// VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StopPacketCapture. -type VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse from the provided client and -// resume token. -func (l *VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.StopPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse. +func (v *VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewayConnectionsClient.StopPacketCapture. type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse struct { - VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult contains the result from method VirtualNetworkGatewayConnectionsClient.StopPacketCapture. -type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResult struct { Value *string } -// VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse contains the response from method VirtualNetworkGatewayConnectionsClient.UpdateTags. -type VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayConnectionsClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayConnectionsClientUpdateTagsResponse, error) { - respType := VirtualNetworkGatewayConnectionsClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGatewayConnection) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayConnectionsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayConnectionsClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayConnectionsClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse. +func (v *VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewayConnectionsClientUpdateTagsResponse contains the response from method VirtualNetworkGatewayConnectionsClient.UpdateTags. type VirtualNetworkGatewayConnectionsClientUpdateTagsResponse struct { - VirtualNetworkGatewayConnectionsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayConnectionsClientUpdateTagsResult contains the result from method VirtualNetworkGatewayConnectionsClient.UpdateTags. -type VirtualNetworkGatewayConnectionsClientUpdateTagsResult struct { VirtualNetworkGatewayConnection } -// VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworkGatewayNatRulesClient.CreateOrUpdate. -type VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGatewayNatRule) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayNatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayNatRulesClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewayNatRulesClient.CreateOrUpdate. type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse struct { - VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult contains the result from method VirtualNetworkGatewayNatRulesClient.CreateOrUpdate. -type VirtualNetworkGatewayNatRulesClientCreateOrUpdateResult struct { VirtualNetworkGatewayNatRule } -// VirtualNetworkGatewayNatRulesClientDeletePollerResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Delete. -type VirtualNetworkGatewayNatRulesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewayNatRulesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewayNatRulesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewayNatRulesClientDeleteResponse, error) { - respType := VirtualNetworkGatewayNatRulesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewayNatRulesClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewayNatRulesClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewayNatRulesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewayNatRulesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewayNatRulesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewayNatRulesClientDeleteResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Delete. type VirtualNetworkGatewayNatRulesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualNetworkGatewayNatRulesClientGetResponse contains the response from method VirtualNetworkGatewayNatRulesClient.Get. type VirtualNetworkGatewayNatRulesClientGetResponse struct { - VirtualNetworkGatewayNatRulesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayNatRulesClientGetResult contains the result from method VirtualNetworkGatewayNatRulesClient.Get. -type VirtualNetworkGatewayNatRulesClientGetResult struct { VirtualNetworkGatewayNatRule } // VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse contains the response from method VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway. type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse struct { - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResult contains the result from method VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway. -type VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResult struct { ListVirtualNetworkGatewayNatRulesResult } -// VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworkGatewaysClient.CreateOrUpdate. -type VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkGatewaysClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientCreateOrUpdateResponse contains the response from method VirtualNetworkGatewaysClient.CreateOrUpdate. type VirtualNetworkGatewaysClientCreateOrUpdateResponse struct { - VirtualNetworkGatewaysClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientCreateOrUpdateResult contains the result from method VirtualNetworkGatewaysClient.CreateOrUpdate. -type VirtualNetworkGatewaysClientCreateOrUpdateResult struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientDeletePollerResponse contains the response from method VirtualNetworkGatewaysClient.Delete. -type VirtualNetworkGatewaysClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientDeleteResponse, error) { - respType := VirtualNetworkGatewaysClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientDeleteResponse contains the response from method VirtualNetworkGatewaysClient.Delete. type VirtualNetworkGatewaysClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse contains the response from method -// VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections. -type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse, error) { - respType := VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse from the provided -// client and resume token. -func (l *VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections. type VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse contains the response from method VirtualNetworkGatewaysClient.GenerateVPNProfile. -type VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGenerateVPNProfilePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGenerateVPNProfileResponse, error) { - respType := VirtualNetworkGatewaysClientGenerateVPNProfileResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GenerateVPNProfile", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGenerateVPNProfilePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualNetworkGatewaysClientGenerateVPNProfileResponse contains the response from method VirtualNetworkGatewaysClient.GenerateVPNProfile. type VirtualNetworkGatewaysClientGenerateVPNProfileResponse struct { - VirtualNetworkGatewaysClientGenerateVPNProfileResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGenerateVPNProfileResult contains the result from method VirtualNetworkGatewaysClient.GenerateVPNProfile. -type VirtualNetworkGatewaysClientGenerateVPNProfileResult struct { Value *string } -// VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse contains the response from method VirtualNetworkGatewaysClient.Generatevpnclientpackage. -type VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse, error) { - respType := VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.Generatevpnclientpackage", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGenerateVPNProfileResponse. +func (v *VirtualNetworkGatewaysClientGenerateVPNProfileResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse contains the response from method VirtualNetworkGatewaysClient.Generatevpnclientpackage. type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse struct { - VirtualNetworkGatewaysClientGeneratevpnclientpackageResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGeneratevpnclientpackageResult contains the result from method VirtualNetworkGatewaysClient.Generatevpnclientpackage. -type VirtualNetworkGatewaysClientGeneratevpnclientpackageResult struct { Value *string } -// VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetAdvertisedRoutes. -type VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse, error) { - respType := VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.GatewayRouteListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetAdvertisedRoutes", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse. +func (v *VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetAdvertisedRoutes. type VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse struct { - VirtualNetworkGatewaysClientGetAdvertisedRoutesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetAdvertisedRoutesResult contains the result from method VirtualNetworkGatewaysClient.GetAdvertisedRoutes. -type VirtualNetworkGatewaysClientGetAdvertisedRoutesResult struct { GatewayRouteListResult } -// VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetBgpPeerStatus. -type VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetBgpPeerStatusPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetBgpPeerStatusResponse, error) { - respType := VirtualNetworkGatewaysClientGetBgpPeerStatusResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.BgpPeerStatusListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetBgpPeerStatus", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetBgpPeerStatusPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientGetBgpPeerStatusResponse contains the response from method VirtualNetworkGatewaysClient.GetBgpPeerStatus. type VirtualNetworkGatewaysClientGetBgpPeerStatusResponse struct { - VirtualNetworkGatewaysClientGetBgpPeerStatusResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetBgpPeerStatusResult contains the result from method VirtualNetworkGatewaysClient.GetBgpPeerStatus. -type VirtualNetworkGatewaysClientGetBgpPeerStatusResult struct { BgpPeerStatusListResult } -// VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetLearnedRoutes. -type VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetLearnedRoutesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetLearnedRoutesResponse, error) { - respType := VirtualNetworkGatewaysClientGetLearnedRoutesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.GatewayRouteListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetLearnedRoutes", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetLearnedRoutesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientGetLearnedRoutesResponse contains the response from method VirtualNetworkGatewaysClient.GetLearnedRoutes. type VirtualNetworkGatewaysClientGetLearnedRoutesResponse struct { - VirtualNetworkGatewaysClientGetLearnedRoutesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetLearnedRoutesResult contains the result from method VirtualNetworkGatewaysClient.GetLearnedRoutes. -type VirtualNetworkGatewaysClientGetLearnedRoutesResult struct { GatewayRouteListResult } // VirtualNetworkGatewaysClientGetResponse contains the response from method VirtualNetworkGatewaysClient.Get. type VirtualNetworkGatewaysClientGetResponse struct { - VirtualNetworkGatewaysClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetResult contains the result from method VirtualNetworkGatewaysClient.Get. -type VirtualNetworkGatewaysClientGetResult struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetVPNProfilePackageURL. -type VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse, error) { - respType := VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetVPNProfilePackageURL", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse contains the response from method VirtualNetworkGatewaysClient.GetVPNProfilePackageURL. type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse struct { - VirtualNetworkGatewaysClientGetVPNProfilePackageURLResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetVPNProfilePackageURLResult contains the result from method VirtualNetworkGatewaysClient.GetVPNProfilePackageURL. -type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResult struct { Value *string } -// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth. -type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse, error) { - respType := VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNClientConnectionHealthDetailListResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse from the provided client and -// resume token. -func (l *VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse. +func (v *VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth. type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse struct { - VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult contains the result from method VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth. -type VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResult struct { VPNClientConnectionHealthDetailListResult } -// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse, error) { - respType := VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNClientIPsecParameters) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse from the provided client and -// resume token. -func (l *VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse struct { - VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResult contains the result from method VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResult struct { VPNClientIPsecParameters } // VirtualNetworkGatewaysClientListConnectionsResponse contains the response from method VirtualNetworkGatewaysClient.ListConnections. type VirtualNetworkGatewaysClientListConnectionsResponse struct { - VirtualNetworkGatewaysClientListConnectionsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientListConnectionsResult contains the result from method VirtualNetworkGatewaysClient.ListConnections. -type VirtualNetworkGatewaysClientListConnectionsResult struct { VirtualNetworkGatewayListConnectionsResult } // VirtualNetworkGatewaysClientListResponse contains the response from method VirtualNetworkGatewaysClient.List. type VirtualNetworkGatewaysClientListResponse struct { - VirtualNetworkGatewaysClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientListResult contains the result from method VirtualNetworkGatewaysClient.List. -type VirtualNetworkGatewaysClientListResult struct { VirtualNetworkGatewayListResult } -// VirtualNetworkGatewaysClientResetPollerResponse contains the response from method VirtualNetworkGatewaysClient.Reset. -type VirtualNetworkGatewaysClientResetPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientResetPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientResetPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientResetResponse, error) { - respType := VirtualNetworkGatewaysClientResetResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientResetPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientResetPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.Reset", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientResetPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientResetResponse contains the response from method VirtualNetworkGatewaysClient.Reset. type VirtualNetworkGatewaysClientResetResponse struct { - VirtualNetworkGatewaysClientResetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientResetResult contains the result from method VirtualNetworkGatewaysClient.Reset. -type VirtualNetworkGatewaysClientResetResult struct { VirtualNetworkGateway } -// VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse contains the response from method VirtualNetworkGatewaysClient.ResetVPNClientSharedKey. -type VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse, error) { - respType := VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse from the provided client and resume -// token. -func (l *VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.ResetVPNClientSharedKey", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse contains the response from method VirtualNetworkGatewaysClient.ResetVPNClientSharedKey. type VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse contains the response from method VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse, error) { - respType := VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VPNClientIPsecParameters) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse from the provided client and -// resume token. -func (l *VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse contains the response from method VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters. type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse struct { - VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResult contains the result from method VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters. -type VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResult struct { VPNClientIPsecParameters } -// VirtualNetworkGatewaysClientStartPacketCapturePollerResponse contains the response from method VirtualNetworkGatewaysClient.StartPacketCapture. -type VirtualNetworkGatewaysClientStartPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientStartPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientStartPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientStartPacketCaptureResponse, error) { - respType := VirtualNetworkGatewaysClientStartPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientStartPacketCapturePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientStartPacketCapturePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.StartPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientStartPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientStartPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StartPacketCapture. type VirtualNetworkGatewaysClientStartPacketCaptureResponse struct { - VirtualNetworkGatewaysClientStartPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientStartPacketCaptureResult contains the result from method VirtualNetworkGatewaysClient.StartPacketCapture. -type VirtualNetworkGatewaysClientStartPacketCaptureResult struct { Value *string } -// VirtualNetworkGatewaysClientStopPacketCapturePollerResponse contains the response from method VirtualNetworkGatewaysClient.StopPacketCapture. -type VirtualNetworkGatewaysClientStopPacketCapturePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientStopPacketCapturePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientStopPacketCapturePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientStopPacketCaptureResponse, error) { - respType := VirtualNetworkGatewaysClientStopPacketCaptureResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.Value) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientStopPacketCapturePollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientStopPacketCapturePollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.StopPacketCapture", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientStopPacketCapturePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStartPacketCaptureResponse. +func (v *VirtualNetworkGatewaysClientStartPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewaysClientStopPacketCaptureResponse contains the response from method VirtualNetworkGatewaysClient.StopPacketCapture. type VirtualNetworkGatewaysClientStopPacketCaptureResponse struct { - VirtualNetworkGatewaysClientStopPacketCaptureResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + Value *string } -// VirtualNetworkGatewaysClientStopPacketCaptureResult contains the result from method VirtualNetworkGatewaysClient.StopPacketCapture. -type VirtualNetworkGatewaysClientStopPacketCaptureResult struct { - Value *string +// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkGatewaysClientStopPacketCaptureResponse. +func (v *VirtualNetworkGatewaysClientStopPacketCaptureResponse) UnmarshalJSON(data []byte) error { + return json.Unmarshal(data, &v.Value) } // VirtualNetworkGatewaysClientSupportedVPNDevicesResponse contains the response from method VirtualNetworkGatewaysClient.SupportedVPNDevices. type VirtualNetworkGatewaysClientSupportedVPNDevicesResponse struct { - VirtualNetworkGatewaysClientSupportedVPNDevicesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientSupportedVPNDevicesResult contains the result from method VirtualNetworkGatewaysClient.SupportedVPNDevices. -type VirtualNetworkGatewaysClientSupportedVPNDevicesResult struct { Value *string } -// VirtualNetworkGatewaysClientUpdateTagsPollerResponse contains the response from method VirtualNetworkGatewaysClient.UpdateTags. -type VirtualNetworkGatewaysClientUpdateTagsPollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkGatewaysClientUpdateTagsPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkGatewaysClientUpdateTagsPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkGatewaysClientUpdateTagsResponse, error) { - respType := VirtualNetworkGatewaysClientUpdateTagsResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkGateway) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkGatewaysClientUpdateTagsPollerResponse from the provided client and resume token. -func (l *VirtualNetworkGatewaysClientUpdateTagsPollerResponse) Resume(ctx context.Context, client *VirtualNetworkGatewaysClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkGatewaysClient.UpdateTags", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkGatewaysClientUpdateTagsPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkGatewaysClientUpdateTagsResponse contains the response from method VirtualNetworkGatewaysClient.UpdateTags. type VirtualNetworkGatewaysClientUpdateTagsResponse struct { - VirtualNetworkGatewaysClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientUpdateTagsResult contains the result from method VirtualNetworkGatewaysClient.UpdateTags. -type VirtualNetworkGatewaysClientUpdateTagsResult struct { VirtualNetworkGateway } // VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse contains the response from method VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript. type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse struct { - VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResult contains the result from method VirtualNetworkGatewaysClient.VPNDeviceConfigurationScript. -type VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResult struct { Value *string } -// VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworkPeeringsClient.CreateOrUpdate. -type VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkPeeringsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkPeeringsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkPeeringsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkPeering) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworkPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkPeeringsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkPeeringsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkPeeringsClientCreateOrUpdateResponse contains the response from method VirtualNetworkPeeringsClient.CreateOrUpdate. type VirtualNetworkPeeringsClientCreateOrUpdateResponse struct { - VirtualNetworkPeeringsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkPeeringsClientCreateOrUpdateResult contains the result from method VirtualNetworkPeeringsClient.CreateOrUpdate. -type VirtualNetworkPeeringsClientCreateOrUpdateResult struct { VirtualNetworkPeering } -// VirtualNetworkPeeringsClientDeletePollerResponse contains the response from method VirtualNetworkPeeringsClient.Delete. -type VirtualNetworkPeeringsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkPeeringsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkPeeringsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkPeeringsClientDeleteResponse, error) { - respType := VirtualNetworkPeeringsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkPeeringsClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworkPeeringsClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworkPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkPeeringsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkPeeringsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkPeeringsClientDeleteResponse contains the response from method VirtualNetworkPeeringsClient.Delete. type VirtualNetworkPeeringsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualNetworkPeeringsClientGetResponse contains the response from method VirtualNetworkPeeringsClient.Get. type VirtualNetworkPeeringsClientGetResponse struct { - VirtualNetworkPeeringsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkPeeringsClientGetResult contains the result from method VirtualNetworkPeeringsClient.Get. -type VirtualNetworkPeeringsClientGetResult struct { VirtualNetworkPeering } // VirtualNetworkPeeringsClientListResponse contains the response from method VirtualNetworkPeeringsClient.List. type VirtualNetworkPeeringsClientListResponse struct { - VirtualNetworkPeeringsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkPeeringsClientListResult contains the result from method VirtualNetworkPeeringsClient.List. -type VirtualNetworkPeeringsClientListResult struct { VirtualNetworkPeeringListResult } -// VirtualNetworkTapsClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworkTapsClient.CreateOrUpdate. -type VirtualNetworkTapsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkTapsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkTapsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkTapsClientCreateOrUpdateResponse, error) { - respType := VirtualNetworkTapsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetworkTap) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkTapsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualNetworkTapsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworkTapsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkTapsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkTapsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkTapsClientCreateOrUpdateResponse contains the response from method VirtualNetworkTapsClient.CreateOrUpdate. type VirtualNetworkTapsClientCreateOrUpdateResponse struct { - VirtualNetworkTapsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkTapsClientCreateOrUpdateResult contains the result from method VirtualNetworkTapsClient.CreateOrUpdate. -type VirtualNetworkTapsClientCreateOrUpdateResult struct { VirtualNetworkTap } -// VirtualNetworkTapsClientDeletePollerResponse contains the response from method VirtualNetworkTapsClient.Delete. -type VirtualNetworkTapsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworkTapsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworkTapsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworkTapsClientDeleteResponse, error) { - respType := VirtualNetworkTapsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworkTapsClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworkTapsClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworkTapsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworkTapsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworkTapsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworkTapsClientDeleteResponse contains the response from method VirtualNetworkTapsClient.Delete. type VirtualNetworkTapsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualNetworkTapsClientGetResponse contains the response from method VirtualNetworkTapsClient.Get. type VirtualNetworkTapsClientGetResponse struct { - VirtualNetworkTapsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkTapsClientGetResult contains the result from method VirtualNetworkTapsClient.Get. -type VirtualNetworkTapsClientGetResult struct { VirtualNetworkTap } // VirtualNetworkTapsClientListAllResponse contains the response from method VirtualNetworkTapsClient.ListAll. type VirtualNetworkTapsClientListAllResponse struct { - VirtualNetworkTapsClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkTapsClientListAllResult contains the result from method VirtualNetworkTapsClient.ListAll. -type VirtualNetworkTapsClientListAllResult struct { VirtualNetworkTapListResult } // VirtualNetworkTapsClientListByResourceGroupResponse contains the response from method VirtualNetworkTapsClient.ListByResourceGroup. type VirtualNetworkTapsClientListByResourceGroupResponse struct { - VirtualNetworkTapsClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkTapsClientListByResourceGroupResult contains the result from method VirtualNetworkTapsClient.ListByResourceGroup. -type VirtualNetworkTapsClientListByResourceGroupResult struct { VirtualNetworkTapListResult } // VirtualNetworkTapsClientUpdateTagsResponse contains the response from method VirtualNetworkTapsClient.UpdateTags. type VirtualNetworkTapsClientUpdateTagsResponse struct { - VirtualNetworkTapsClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworkTapsClientUpdateTagsResult contains the result from method VirtualNetworkTapsClient.UpdateTags. -type VirtualNetworkTapsClientUpdateTagsResult struct { VirtualNetworkTap } // VirtualNetworksClientCheckIPAddressAvailabilityResponse contains the response from method VirtualNetworksClient.CheckIPAddressAvailability. type VirtualNetworksClientCheckIPAddressAvailabilityResponse struct { - VirtualNetworksClientCheckIPAddressAvailabilityResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientCheckIPAddressAvailabilityResult contains the result from method VirtualNetworksClient.CheckIPAddressAvailability. -type VirtualNetworksClientCheckIPAddressAvailabilityResult struct { IPAddressAvailabilityResult } -// VirtualNetworksClientCreateOrUpdatePollerResponse contains the response from method VirtualNetworksClient.CreateOrUpdate. -type VirtualNetworksClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworksClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworksClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworksClientCreateOrUpdateResponse, error) { - respType := VirtualNetworksClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualNetwork) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworksClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualNetworksClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualNetworksClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworksClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworksClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.CreateOrUpdate. type VirtualNetworksClientCreateOrUpdateResponse struct { - VirtualNetworksClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientCreateOrUpdateResult contains the result from method VirtualNetworksClient.CreateOrUpdate. -type VirtualNetworksClientCreateOrUpdateResult struct { VirtualNetwork } -// VirtualNetworksClientDeletePollerResponse contains the response from method VirtualNetworksClient.Delete. -type VirtualNetworksClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualNetworksClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualNetworksClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualNetworksClientDeleteResponse, error) { - respType := VirtualNetworksClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualNetworksClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualNetworksClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualNetworksClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualNetworksClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualNetworksClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.Delete. type VirtualNetworksClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get. type VirtualNetworksClientGetResponse struct { - VirtualNetworksClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientGetResult contains the result from method VirtualNetworksClient.Get. -type VirtualNetworksClientGetResult struct { VirtualNetwork } // VirtualNetworksClientListAllResponse contains the response from method VirtualNetworksClient.ListAll. type VirtualNetworksClientListAllResponse struct { - VirtualNetworksClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientListAllResult contains the result from method VirtualNetworksClient.ListAll. -type VirtualNetworksClientListAllResult struct { VirtualNetworkListResult } // VirtualNetworksClientListResponse contains the response from method VirtualNetworksClient.List. type VirtualNetworksClientListResponse struct { - VirtualNetworksClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientListResult contains the result from method VirtualNetworksClient.List. -type VirtualNetworksClientListResult struct { VirtualNetworkListResult } // VirtualNetworksClientListUsageResponse contains the response from method VirtualNetworksClient.ListUsage. type VirtualNetworksClientListUsageResponse struct { - VirtualNetworksClientListUsageResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientListUsageResult contains the result from method VirtualNetworksClient.ListUsage. -type VirtualNetworksClientListUsageResult struct { VirtualNetworkListUsageResult } // VirtualNetworksClientUpdateTagsResponse contains the response from method VirtualNetworksClient.UpdateTags. type VirtualNetworksClientUpdateTagsResponse struct { - VirtualNetworksClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualNetworksClientUpdateTagsResult contains the result from method VirtualNetworksClient.UpdateTags. -type VirtualNetworksClientUpdateTagsResult struct { VirtualNetwork } -// VirtualRouterPeeringsClientCreateOrUpdatePollerResponse contains the response from method VirtualRouterPeeringsClient.CreateOrUpdate. -type VirtualRouterPeeringsClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualRouterPeeringsClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualRouterPeeringsClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualRouterPeeringsClientCreateOrUpdateResponse, error) { - respType := VirtualRouterPeeringsClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualRouterPeering) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualRouterPeeringsClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualRouterPeeringsClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualRouterPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualRouterPeeringsClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualRouterPeeringsClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualRouterPeeringsClientCreateOrUpdateResponse contains the response from method VirtualRouterPeeringsClient.CreateOrUpdate. type VirtualRouterPeeringsClientCreateOrUpdateResponse struct { - VirtualRouterPeeringsClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRouterPeeringsClientCreateOrUpdateResult contains the result from method VirtualRouterPeeringsClient.CreateOrUpdate. -type VirtualRouterPeeringsClientCreateOrUpdateResult struct { VirtualRouterPeering } -// VirtualRouterPeeringsClientDeletePollerResponse contains the response from method VirtualRouterPeeringsClient.Delete. -type VirtualRouterPeeringsClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualRouterPeeringsClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualRouterPeeringsClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualRouterPeeringsClientDeleteResponse, error) { - respType := VirtualRouterPeeringsClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualRouterPeeringsClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualRouterPeeringsClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualRouterPeeringsClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualRouterPeeringsClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualRouterPeeringsClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualRouterPeeringsClientDeleteResponse contains the response from method VirtualRouterPeeringsClient.Delete. type VirtualRouterPeeringsClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualRouterPeeringsClientGetResponse contains the response from method VirtualRouterPeeringsClient.Get. type VirtualRouterPeeringsClientGetResponse struct { - VirtualRouterPeeringsClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRouterPeeringsClientGetResult contains the result from method VirtualRouterPeeringsClient.Get. -type VirtualRouterPeeringsClientGetResult struct { VirtualRouterPeering } // VirtualRouterPeeringsClientListResponse contains the response from method VirtualRouterPeeringsClient.List. type VirtualRouterPeeringsClientListResponse struct { - VirtualRouterPeeringsClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRouterPeeringsClientListResult contains the result from method VirtualRouterPeeringsClient.List. -type VirtualRouterPeeringsClientListResult struct { VirtualRouterPeeringListResult } -// VirtualRoutersClientCreateOrUpdatePollerResponse contains the response from method VirtualRoutersClient.CreateOrUpdate. -type VirtualRoutersClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualRoutersClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualRoutersClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualRoutersClientCreateOrUpdateResponse, error) { - respType := VirtualRoutersClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualRouter) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualRoutersClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualRoutersClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualRoutersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualRoutersClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualRoutersClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualRoutersClientCreateOrUpdateResponse contains the response from method VirtualRoutersClient.CreateOrUpdate. type VirtualRoutersClientCreateOrUpdateResponse struct { - VirtualRoutersClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRoutersClientCreateOrUpdateResult contains the result from method VirtualRoutersClient.CreateOrUpdate. -type VirtualRoutersClientCreateOrUpdateResult struct { VirtualRouter } -// VirtualRoutersClientDeletePollerResponse contains the response from method VirtualRoutersClient.Delete. -type VirtualRoutersClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualRoutersClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualRoutersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualRoutersClientDeleteResponse, error) { - respType := VirtualRoutersClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualRoutersClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualRoutersClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualRoutersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualRoutersClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualRoutersClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualRoutersClientDeleteResponse contains the response from method VirtualRoutersClient.Delete. type VirtualRoutersClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualRoutersClientGetResponse contains the response from method VirtualRoutersClient.Get. type VirtualRoutersClientGetResponse struct { - VirtualRoutersClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRoutersClientGetResult contains the result from method VirtualRoutersClient.Get. -type VirtualRoutersClientGetResult struct { VirtualRouter } // VirtualRoutersClientListByResourceGroupResponse contains the response from method VirtualRoutersClient.ListByResourceGroup. type VirtualRoutersClientListByResourceGroupResponse struct { - VirtualRoutersClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRoutersClientListByResourceGroupResult contains the result from method VirtualRoutersClient.ListByResourceGroup. -type VirtualRoutersClientListByResourceGroupResult struct { VirtualRouterListResult } // VirtualRoutersClientListResponse contains the response from method VirtualRoutersClient.List. type VirtualRoutersClientListResponse struct { - VirtualRoutersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualRoutersClientListResult contains the result from method VirtualRoutersClient.List. -type VirtualRoutersClientListResult struct { VirtualRouterListResult } -// VirtualWansClientCreateOrUpdatePollerResponse contains the response from method VirtualWansClient.CreateOrUpdate. -type VirtualWansClientCreateOrUpdatePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualWansClientCreateOrUpdatePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualWansClientCreateOrUpdatePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualWansClientCreateOrUpdateResponse, error) { - respType := VirtualWansClientCreateOrUpdateResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VirtualWAN) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualWansClientCreateOrUpdatePollerResponse from the provided client and resume token. -func (l *VirtualWansClientCreateOrUpdatePollerResponse) Resume(ctx context.Context, client *VirtualWansClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualWansClient.CreateOrUpdate", token, client.pl) - if err != nil { - return err - } - poller := &VirtualWansClientCreateOrUpdatePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualWansClientCreateOrUpdateResponse contains the response from method VirtualWansClient.CreateOrUpdate. type VirtualWansClientCreateOrUpdateResponse struct { - VirtualWansClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualWansClientCreateOrUpdateResult contains the result from method VirtualWansClient.CreateOrUpdate. -type VirtualWansClientCreateOrUpdateResult struct { VirtualWAN } -// VirtualWansClientDeletePollerResponse contains the response from method VirtualWansClient.Delete. -type VirtualWansClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *VirtualWansClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l VirtualWansClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (VirtualWansClientDeleteResponse, error) { - respType := VirtualWansClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a VirtualWansClientDeletePollerResponse from the provided client and resume token. -func (l *VirtualWansClientDeletePollerResponse) Resume(ctx context.Context, client *VirtualWansClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("VirtualWansClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &VirtualWansClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // VirtualWansClientDeleteResponse contains the response from method VirtualWansClient.Delete. type VirtualWansClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // VirtualWansClientGetResponse contains the response from method VirtualWansClient.Get. type VirtualWansClientGetResponse struct { - VirtualWansClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualWansClientGetResult contains the result from method VirtualWansClient.Get. -type VirtualWansClientGetResult struct { VirtualWAN } // VirtualWansClientListByResourceGroupResponse contains the response from method VirtualWansClient.ListByResourceGroup. type VirtualWansClientListByResourceGroupResponse struct { - VirtualWansClientListByResourceGroupResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualWansClientListByResourceGroupResult contains the result from method VirtualWansClient.ListByResourceGroup. -type VirtualWansClientListByResourceGroupResult struct { ListVirtualWANsResult } // VirtualWansClientListResponse contains the response from method VirtualWansClient.List. type VirtualWansClientListResponse struct { - VirtualWansClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualWansClientListResult contains the result from method VirtualWansClient.List. -type VirtualWansClientListResult struct { ListVirtualWANsResult } // VirtualWansClientUpdateTagsResponse contains the response from method VirtualWansClient.UpdateTags. type VirtualWansClientUpdateTagsResponse struct { - VirtualWansClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// VirtualWansClientUpdateTagsResult contains the result from method VirtualWansClient.UpdateTags. -type VirtualWansClientUpdateTagsResult struct { VirtualWAN } -// WatchersClientCheckConnectivityPollerResponse contains the response from method WatchersClient.CheckConnectivity. -type WatchersClientCheckConnectivityPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientCheckConnectivityPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientCheckConnectivityPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientCheckConnectivityResponse, error) { - respType := WatchersClientCheckConnectivityResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConnectivityInformation) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientCheckConnectivityPollerResponse from the provided client and resume token. -func (l *WatchersClientCheckConnectivityPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.CheckConnectivity", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientCheckConnectivityPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientCheckConnectivityResponse contains the response from method WatchersClient.CheckConnectivity. type WatchersClientCheckConnectivityResponse struct { - WatchersClientCheckConnectivityResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientCheckConnectivityResult contains the result from method WatchersClient.CheckConnectivity. -type WatchersClientCheckConnectivityResult struct { ConnectivityInformation } // WatchersClientCreateOrUpdateResponse contains the response from method WatchersClient.CreateOrUpdate. type WatchersClientCreateOrUpdateResponse struct { - WatchersClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientCreateOrUpdateResult contains the result from method WatchersClient.CreateOrUpdate. -type WatchersClientCreateOrUpdateResult struct { Watcher } -// WatchersClientDeletePollerResponse contains the response from method WatchersClient.Delete. -type WatchersClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientDeleteResponse, error) { - respType := WatchersClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientDeletePollerResponse from the provided client and resume token. -func (l *WatchersClientDeletePollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientDeleteResponse contains the response from method WatchersClient.Delete. type WatchersClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetAzureReachabilityReportPollerResponse contains the response from method WatchersClient.GetAzureReachabilityReport. -type WatchersClientGetAzureReachabilityReportPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetAzureReachabilityReportPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetAzureReachabilityReportPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetAzureReachabilityReportResponse, error) { - respType := WatchersClientGetAzureReachabilityReportResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AzureReachabilityReport) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetAzureReachabilityReportPollerResponse from the provided client and resume token. -func (l *WatchersClientGetAzureReachabilityReportPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetAzureReachabilityReport", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetAzureReachabilityReportPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil + // placeholder for future response values } // WatchersClientGetAzureReachabilityReportResponse contains the response from method WatchersClient.GetAzureReachabilityReport. type WatchersClientGetAzureReachabilityReportResponse struct { - WatchersClientGetAzureReachabilityReportResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetAzureReachabilityReportResult contains the result from method WatchersClient.GetAzureReachabilityReport. -type WatchersClientGetAzureReachabilityReportResult struct { AzureReachabilityReport } -// WatchersClientGetFlowLogStatusPollerResponse contains the response from method WatchersClient.GetFlowLogStatus. -type WatchersClientGetFlowLogStatusPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetFlowLogStatusPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetFlowLogStatusPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetFlowLogStatusResponse, error) { - respType := WatchersClientGetFlowLogStatusResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.FlowLogInformation) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetFlowLogStatusPollerResponse from the provided client and resume token. -func (l *WatchersClientGetFlowLogStatusPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetFlowLogStatus", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetFlowLogStatusPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetFlowLogStatusResponse contains the response from method WatchersClient.GetFlowLogStatus. type WatchersClientGetFlowLogStatusResponse struct { - WatchersClientGetFlowLogStatusResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetFlowLogStatusResult contains the result from method WatchersClient.GetFlowLogStatus. -type WatchersClientGetFlowLogStatusResult struct { FlowLogInformation } -// WatchersClientGetNetworkConfigurationDiagnosticPollerResponse contains the response from method WatchersClient.GetNetworkConfigurationDiagnostic. -type WatchersClientGetNetworkConfigurationDiagnosticPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetNetworkConfigurationDiagnosticPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetNetworkConfigurationDiagnosticPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetNetworkConfigurationDiagnosticResponse, error) { - respType := WatchersClientGetNetworkConfigurationDiagnosticResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.ConfigurationDiagnosticResponse) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetNetworkConfigurationDiagnosticPollerResponse from the provided client and resume token. -func (l *WatchersClientGetNetworkConfigurationDiagnosticPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetNetworkConfigurationDiagnostic", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetNetworkConfigurationDiagnosticPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetNetworkConfigurationDiagnosticResponse contains the response from method WatchersClient.GetNetworkConfigurationDiagnostic. type WatchersClientGetNetworkConfigurationDiagnosticResponse struct { - WatchersClientGetNetworkConfigurationDiagnosticResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetNetworkConfigurationDiagnosticResult contains the result from method WatchersClient.GetNetworkConfigurationDiagnostic. -type WatchersClientGetNetworkConfigurationDiagnosticResult struct { ConfigurationDiagnosticResponse } -// WatchersClientGetNextHopPollerResponse contains the response from method WatchersClient.GetNextHop. -type WatchersClientGetNextHopPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetNextHopPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetNextHopPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetNextHopResponse, error) { - respType := WatchersClientGetNextHopResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.NextHopResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetNextHopPollerResponse from the provided client and resume token. -func (l *WatchersClientGetNextHopPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetNextHop", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetNextHopPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetNextHopResponse contains the response from method WatchersClient.GetNextHop. type WatchersClientGetNextHopResponse struct { - WatchersClientGetNextHopResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetNextHopResult contains the result from method WatchersClient.GetNextHop. -type WatchersClientGetNextHopResult struct { NextHopResult } // WatchersClientGetResponse contains the response from method WatchersClient.Get. type WatchersClientGetResponse struct { - WatchersClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetResult contains the result from method WatchersClient.Get. -type WatchersClientGetResult struct { Watcher } // WatchersClientGetTopologyResponse contains the response from method WatchersClient.GetTopology. type WatchersClientGetTopologyResponse struct { - WatchersClientGetTopologyResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetTopologyResult contains the result from method WatchersClient.GetTopology. -type WatchersClientGetTopologyResult struct { Topology } -// WatchersClientGetTroubleshootingPollerResponse contains the response from method WatchersClient.GetTroubleshooting. -type WatchersClientGetTroubleshootingPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetTroubleshootingPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetTroubleshootingPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetTroubleshootingResponse, error) { - respType := WatchersClientGetTroubleshootingResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.TroubleshootingResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetTroubleshootingPollerResponse from the provided client and resume token. -func (l *WatchersClientGetTroubleshootingPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetTroubleshooting", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetTroubleshootingPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetTroubleshootingResponse contains the response from method WatchersClient.GetTroubleshooting. type WatchersClientGetTroubleshootingResponse struct { - WatchersClientGetTroubleshootingResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetTroubleshootingResult contains the result from method WatchersClient.GetTroubleshooting. -type WatchersClientGetTroubleshootingResult struct { TroubleshootingResult } -// WatchersClientGetTroubleshootingResultPollerResponse contains the response from method WatchersClient.GetTroubleshootingResult. -type WatchersClientGetTroubleshootingResultPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetTroubleshootingResultPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetTroubleshootingResultPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetTroubleshootingResultResponse, error) { - respType := WatchersClientGetTroubleshootingResultResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.TroubleshootingResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetTroubleshootingResultPollerResponse from the provided client and resume token. -func (l *WatchersClientGetTroubleshootingResultPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetTroubleshootingResult", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetTroubleshootingResultPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetTroubleshootingResultResponse contains the response from method WatchersClient.GetTroubleshootingResult. type WatchersClientGetTroubleshootingResultResponse struct { - WatchersClientGetTroubleshootingResultResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetTroubleshootingResultResult contains the result from method WatchersClient.GetTroubleshootingResult. -type WatchersClientGetTroubleshootingResultResult struct { TroubleshootingResult } -// WatchersClientGetVMSecurityRulesPollerResponse contains the response from method WatchersClient.GetVMSecurityRules. -type WatchersClientGetVMSecurityRulesPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientGetVMSecurityRulesPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientGetVMSecurityRulesPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientGetVMSecurityRulesResponse, error) { - respType := WatchersClientGetVMSecurityRulesResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.SecurityGroupViewResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientGetVMSecurityRulesPollerResponse from the provided client and resume token. -func (l *WatchersClientGetVMSecurityRulesPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.GetVMSecurityRules", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientGetVMSecurityRulesPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientGetVMSecurityRulesResponse contains the response from method WatchersClient.GetVMSecurityRules. type WatchersClientGetVMSecurityRulesResponse struct { - WatchersClientGetVMSecurityRulesResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientGetVMSecurityRulesResult contains the result from method WatchersClient.GetVMSecurityRules. -type WatchersClientGetVMSecurityRulesResult struct { SecurityGroupViewResult } // WatchersClientListAllResponse contains the response from method WatchersClient.ListAll. type WatchersClientListAllResponse struct { - WatchersClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientListAllResult contains the result from method WatchersClient.ListAll. -type WatchersClientListAllResult struct { WatcherListResult } -// WatchersClientListAvailableProvidersPollerResponse contains the response from method WatchersClient.ListAvailableProviders. -type WatchersClientListAvailableProvidersPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientListAvailableProvidersPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientListAvailableProvidersPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientListAvailableProvidersResponse, error) { - respType := WatchersClientListAvailableProvidersResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.AvailableProvidersList) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientListAvailableProvidersPollerResponse from the provided client and resume token. -func (l *WatchersClientListAvailableProvidersPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.ListAvailableProviders", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientListAvailableProvidersPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientListAvailableProvidersResponse contains the response from method WatchersClient.ListAvailableProviders. type WatchersClientListAvailableProvidersResponse struct { - WatchersClientListAvailableProvidersResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientListAvailableProvidersResult contains the result from method WatchersClient.ListAvailableProviders. -type WatchersClientListAvailableProvidersResult struct { AvailableProvidersList } // WatchersClientListResponse contains the response from method WatchersClient.List. type WatchersClientListResponse struct { - WatchersClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientListResult contains the result from method WatchersClient.List. -type WatchersClientListResult struct { WatcherListResult } -// WatchersClientSetFlowLogConfigurationPollerResponse contains the response from method WatchersClient.SetFlowLogConfiguration. -type WatchersClientSetFlowLogConfigurationPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientSetFlowLogConfigurationPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientSetFlowLogConfigurationPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientSetFlowLogConfigurationResponse, error) { - respType := WatchersClientSetFlowLogConfigurationResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.FlowLogInformation) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientSetFlowLogConfigurationPollerResponse from the provided client and resume token. -func (l *WatchersClientSetFlowLogConfigurationPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.SetFlowLogConfiguration", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientSetFlowLogConfigurationPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientSetFlowLogConfigurationResponse contains the response from method WatchersClient.SetFlowLogConfiguration. type WatchersClientSetFlowLogConfigurationResponse struct { - WatchersClientSetFlowLogConfigurationResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientSetFlowLogConfigurationResult contains the result from method WatchersClient.SetFlowLogConfiguration. -type WatchersClientSetFlowLogConfigurationResult struct { FlowLogInformation } // WatchersClientUpdateTagsResponse contains the response from method WatchersClient.UpdateTags. type WatchersClientUpdateTagsResponse struct { - WatchersClientUpdateTagsResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientUpdateTagsResult contains the result from method WatchersClient.UpdateTags. -type WatchersClientUpdateTagsResult struct { Watcher } -// WatchersClientVerifyIPFlowPollerResponse contains the response from method WatchersClient.VerifyIPFlow. -type WatchersClientVerifyIPFlowPollerResponse struct { - // Poller contains an initialized poller. - Poller *WatchersClientVerifyIPFlowPoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WatchersClientVerifyIPFlowPollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WatchersClientVerifyIPFlowResponse, error) { - respType := WatchersClientVerifyIPFlowResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, &respType.VerificationIPFlowResult) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WatchersClientVerifyIPFlowPollerResponse from the provided client and resume token. -func (l *WatchersClientVerifyIPFlowPollerResponse) Resume(ctx context.Context, client *WatchersClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WatchersClient.VerifyIPFlow", token, client.pl) - if err != nil { - return err - } - poller := &WatchersClientVerifyIPFlowPoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WatchersClientVerifyIPFlowResponse contains the response from method WatchersClient.VerifyIPFlow. type WatchersClientVerifyIPFlowResponse struct { - WatchersClientVerifyIPFlowResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WatchersClientVerifyIPFlowResult contains the result from method WatchersClient.VerifyIPFlow. -type WatchersClientVerifyIPFlowResult struct { VerificationIPFlowResult } // WebApplicationFirewallPoliciesClientCreateOrUpdateResponse contains the response from method WebApplicationFirewallPoliciesClient.CreateOrUpdate. type WebApplicationFirewallPoliciesClientCreateOrUpdateResponse struct { - WebApplicationFirewallPoliciesClientCreateOrUpdateResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebApplicationFirewallPoliciesClientCreateOrUpdateResult contains the result from method WebApplicationFirewallPoliciesClient.CreateOrUpdate. -type WebApplicationFirewallPoliciesClientCreateOrUpdateResult struct { WebApplicationFirewallPolicy } -// WebApplicationFirewallPoliciesClientDeletePollerResponse contains the response from method WebApplicationFirewallPoliciesClient.Delete. -type WebApplicationFirewallPoliciesClientDeletePollerResponse struct { - // Poller contains an initialized poller. - Poller *WebApplicationFirewallPoliciesClientDeletePoller - - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// PollUntilDone will poll the service endpoint until a terminal state is reached or an error is received. -// freq: the time to wait between intervals in absence of a Retry-After header. Allowed minimum is one second. -// A good starting value is 30 seconds. Note that some resources might benefit from a different value. -func (l WebApplicationFirewallPoliciesClientDeletePollerResponse) PollUntilDone(ctx context.Context, freq time.Duration) (WebApplicationFirewallPoliciesClientDeleteResponse, error) { - respType := WebApplicationFirewallPoliciesClientDeleteResponse{} - resp, err := l.Poller.pt.PollUntilDone(ctx, freq, nil) - if err != nil { - return respType, err - } - respType.RawResponse = resp - return respType, nil -} - -// Resume rehydrates a WebApplicationFirewallPoliciesClientDeletePollerResponse from the provided client and resume token. -func (l *WebApplicationFirewallPoliciesClientDeletePollerResponse) Resume(ctx context.Context, client *WebApplicationFirewallPoliciesClient, token string) error { - pt, err := armruntime.NewPollerFromResumeToken("WebApplicationFirewallPoliciesClient.Delete", token, client.pl) - if err != nil { - return err - } - poller := &WebApplicationFirewallPoliciesClientDeletePoller{ - pt: pt, - } - resp, err := poller.Poll(ctx) - if err != nil { - return err - } - l.Poller = poller - l.RawResponse = resp - return nil -} - // WebApplicationFirewallPoliciesClientDeleteResponse contains the response from method WebApplicationFirewallPoliciesClient.Delete. type WebApplicationFirewallPoliciesClientDeleteResponse struct { - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response + // placeholder for future response values } // WebApplicationFirewallPoliciesClientGetResponse contains the response from method WebApplicationFirewallPoliciesClient.Get. type WebApplicationFirewallPoliciesClientGetResponse struct { - WebApplicationFirewallPoliciesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebApplicationFirewallPoliciesClientGetResult contains the result from method WebApplicationFirewallPoliciesClient.Get. -type WebApplicationFirewallPoliciesClientGetResult struct { WebApplicationFirewallPolicy } // WebApplicationFirewallPoliciesClientListAllResponse contains the response from method WebApplicationFirewallPoliciesClient.ListAll. type WebApplicationFirewallPoliciesClientListAllResponse struct { - WebApplicationFirewallPoliciesClientListAllResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebApplicationFirewallPoliciesClientListAllResult contains the result from method WebApplicationFirewallPoliciesClient.ListAll. -type WebApplicationFirewallPoliciesClientListAllResult struct { WebApplicationFirewallPolicyListResult } // WebApplicationFirewallPoliciesClientListResponse contains the response from method WebApplicationFirewallPoliciesClient.List. type WebApplicationFirewallPoliciesClientListResponse struct { - WebApplicationFirewallPoliciesClientListResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebApplicationFirewallPoliciesClientListResult contains the result from method WebApplicationFirewallPoliciesClient.List. -type WebApplicationFirewallPoliciesClientListResult struct { WebApplicationFirewallPolicyListResult } // WebCategoriesClientGetResponse contains the response from method WebCategoriesClient.Get. type WebCategoriesClientGetResponse struct { - WebCategoriesClientGetResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebCategoriesClientGetResult contains the result from method WebCategoriesClient.Get. -type WebCategoriesClientGetResult struct { AzureWebCategory } // WebCategoriesClientListBySubscriptionResponse contains the response from method WebCategoriesClient.ListBySubscription. type WebCategoriesClientListBySubscriptionResponse struct { - WebCategoriesClientListBySubscriptionResult - // RawResponse contains the underlying HTTP response. - RawResponse *http.Response -} - -// WebCategoriesClientListBySubscriptionResult contains the result from method WebCategoriesClient.ListBySubscription. -type WebCategoriesClientListBySubscriptionResult struct { AzureWebCategoryListResult } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go index fb5e8d663a95..652507061d9f 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilterrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type RouteFilterRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RouteFilterRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFilterRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &RouteFilterRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a route in the specified route filter. @@ -58,22 +63,18 @@ func NewRouteFilterRulesClient(subscriptionID string, credential azcore.TokenCre // routeFilterRuleParameters - Parameters supplied to the create or update route filter rule operation. // options - RouteFilterRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFilterRulesClient.BeginCreateOrUpdate // method. -func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (RouteFilterRulesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) - if err != nil { - return RouteFilterRulesClientCreateOrUpdatePollerResponse{}, err - } - result := RouteFilterRulesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RouteFilterRulesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return RouteFilterRulesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &RouteFilterRulesClientCreateOrUpdatePoller{ - pt: pt, +func (client *RouteFilterRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, options *RouteFilterRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[RouteFilterRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteFilterRulesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteFilterRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a route in the specified route filter. @@ -130,22 +131,18 @@ func (client *RouteFilterRulesClient) createOrUpdateCreateRequest(ctx context.Co // ruleName - The name of the rule. // options - RouteFilterRulesClientBeginDeleteOptions contains the optional parameters for the RouteFilterRulesClient.BeginDelete // method. -func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (RouteFilterRulesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, ruleName, options) - if err != nil { - return RouteFilterRulesClientDeletePollerResponse{}, err - } - result := RouteFilterRulesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RouteFilterRulesClient.Delete", "location", resp, client.pl) - if err != nil { - return RouteFilterRulesClientDeletePollerResponse{}, err - } - result.Poller = &RouteFilterRulesClientDeletePoller{ - pt: pt, +func (client *RouteFilterRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, options *RouteFilterRulesClientBeginDeleteOptions) (*armruntime.Poller[RouteFilterRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, ruleName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteFilterRulesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteFilterRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified rule from a route filter. @@ -248,7 +245,7 @@ func (client *RouteFilterRulesClient) getCreateRequest(ctx context.Context, reso // getHandleResponse handles the Get response. func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (RouteFilterRulesClientGetResponse, error) { - result := RouteFilterRulesClientGetResponse{RawResponse: resp} + result := RouteFilterRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRule); err != nil { return RouteFilterRulesClientGetResponse{}, err } @@ -261,16 +258,32 @@ func (client *RouteFilterRulesClient) getHandleResponse(resp *http.Response) (Ro // routeFilterName - The name of the route filter. // options - RouteFilterRulesClientListByRouteFilterOptions contains the optional parameters for the RouteFilterRulesClient.ListByRouteFilter // method. -func (client *RouteFilterRulesClient) ListByRouteFilter(resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) *RouteFilterRulesClientListByRouteFilterPager { - return &RouteFilterRulesClientListByRouteFilterPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) +func (client *RouteFilterRulesClient) ListByRouteFilter(resourceGroupName string, routeFilterName string, options *RouteFilterRulesClientListByRouteFilterOptions) *runtime.Pager[RouteFilterRulesClientListByRouteFilterResponse] { + return runtime.NewPager(runtime.PageProcessor[RouteFilterRulesClientListByRouteFilterResponse]{ + More: func(page RouteFilterRulesClientListByRouteFilterResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RouteFilterRulesClientListByRouteFilterResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteFilterRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *RouteFilterRulesClientListByRouteFilterResponse) (RouteFilterRulesClientListByRouteFilterResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByRouteFilterCreateRequest(ctx, resourceGroupName, routeFilterName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RouteFilterRulesClientListByRouteFilterResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RouteFilterRulesClientListByRouteFilterResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RouteFilterRulesClientListByRouteFilterResponse{}, runtime.NewResponseError(resp) + } + return client.listByRouteFilterHandleResponse(resp) }, - } + }) } // listByRouteFilterCreateRequest creates the ListByRouteFilter request. @@ -301,7 +314,7 @@ func (client *RouteFilterRulesClient) listByRouteFilterCreateRequest(ctx context // listByRouteFilterHandleResponse handles the ListByRouteFilter response. func (client *RouteFilterRulesClient) listByRouteFilterHandleResponse(resp *http.Response) (RouteFilterRulesClientListByRouteFilterResponse, error) { - result := RouteFilterRulesClientListByRouteFilterResponse{RawResponse: resp} + result := RouteFilterRulesClientListByRouteFilterResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterRuleListResult); err != nil { return RouteFilterRulesClientListByRouteFilterResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go index cbfcb265391d..777b77b41a42 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routefilters_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type RouteFiltersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RouteFiltersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteFiltersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &RouteFiltersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a route filter in a specified resource group. @@ -57,22 +62,18 @@ func NewRouteFiltersClient(subscriptionID string, credential azcore.TokenCredent // routeFilterParameters - Parameters supplied to the create or update route filter operation. // options - RouteFiltersClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteFiltersClient.BeginCreateOrUpdate // method. -func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (RouteFiltersClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) - if err != nil { - return RouteFiltersClientCreateOrUpdatePollerResponse{}, err - } - result := RouteFiltersClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *RouteFiltersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, options *RouteFiltersClientBeginCreateOrUpdateOptions) (*armruntime.Poller[RouteFiltersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeFilterName, routeFilterParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteFiltersClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteFiltersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("RouteFiltersClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return RouteFiltersClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &RouteFiltersClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a route filter in a specified resource group. @@ -124,22 +125,18 @@ func (client *RouteFiltersClient) createOrUpdateCreateRequest(ctx context.Contex // routeFilterName - The name of the route filter. // options - RouteFiltersClientBeginDeleteOptions contains the optional parameters for the RouteFiltersClient.BeginDelete // method. -func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (RouteFiltersClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, options) - if err != nil { - return RouteFiltersClientDeletePollerResponse{}, err - } - result := RouteFiltersClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RouteFiltersClient.Delete", "location", resp, client.pl) - if err != nil { - return RouteFiltersClientDeletePollerResponse{}, err +func (client *RouteFiltersClient) BeginDelete(ctx context.Context, resourceGroupName string, routeFilterName string, options *RouteFiltersClientBeginDeleteOptions) (*armruntime.Poller[RouteFiltersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeFilterName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteFiltersClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteFiltersClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &RouteFiltersClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified route filter. @@ -236,7 +233,7 @@ func (client *RouteFiltersClient) getCreateRequest(ctx context.Context, resource // getHandleResponse handles the Get response. func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteFiltersClientGetResponse, error) { - result := RouteFiltersClientGetResponse{RawResponse: resp} + result := RouteFiltersClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { return RouteFiltersClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *RouteFiltersClient) getHandleResponse(resp *http.Response) (RouteF // List - Gets all route filters in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - RouteFiltersClientListOptions contains the optional parameters for the RouteFiltersClient.List method. -func (client *RouteFiltersClient) List(options *RouteFiltersClientListOptions) *RouteFiltersClientListPager { - return &RouteFiltersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *RouteFiltersClient) List(options *RouteFiltersClientListOptions) *runtime.Pager[RouteFiltersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[RouteFiltersClientListResponse]{ + More: func(page RouteFiltersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RouteFiltersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteFilterListResult.NextLink) + Fetcher: func(ctx context.Context, page *RouteFiltersClientListResponse) (RouteFiltersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RouteFiltersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RouteFiltersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RouteFiltersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -278,7 +291,7 @@ func (client *RouteFiltersClient) listCreateRequest(ctx context.Context, options // listHandleResponse handles the List response. func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (RouteFiltersClientListResponse, error) { - result := RouteFiltersClientListResponse{RawResponse: resp} + result := RouteFiltersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { return RouteFiltersClientListResponse{}, err } @@ -290,16 +303,32 @@ func (client *RouteFiltersClient) listHandleResponse(resp *http.Response) (Route // resourceGroupName - The name of the resource group. // options - RouteFiltersClientListByResourceGroupOptions contains the optional parameters for the RouteFiltersClient.ListByResourceGroup // method. -func (client *RouteFiltersClient) ListByResourceGroup(resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) *RouteFiltersClientListByResourceGroupPager { - return &RouteFiltersClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *RouteFiltersClient) ListByResourceGroup(resourceGroupName string, options *RouteFiltersClientListByResourceGroupOptions) *runtime.Pager[RouteFiltersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[RouteFiltersClientListByResourceGroupResponse]{ + More: func(page RouteFiltersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RouteFiltersClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteFilterListResult.NextLink) + Fetcher: func(ctx context.Context, page *RouteFiltersClientListByResourceGroupResponse) (RouteFiltersClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RouteFiltersClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RouteFiltersClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RouteFiltersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -326,7 +355,7 @@ func (client *RouteFiltersClient) listByResourceGroupCreateRequest(ctx context.C // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *RouteFiltersClient) listByResourceGroupHandleResponse(resp *http.Response) (RouteFiltersClientListByResourceGroupResponse, error) { - result := RouteFiltersClientListByResourceGroupResponse{RawResponse: resp} + result := RouteFiltersClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilterListResult); err != nil { return RouteFiltersClientListByResourceGroupResponse{}, err } @@ -382,7 +411,7 @@ func (client *RouteFiltersClient) updateTagsCreateRequest(ctx context.Context, r // updateTagsHandleResponse handles the UpdateTags response. func (client *RouteFiltersClient) updateTagsHandleResponse(resp *http.Response) (RouteFiltersClientUpdateTagsResponse, error) { - result := RouteFiltersClientUpdateTagsResponse{RawResponse: resp} + result := RouteFiltersClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteFilter); err != nil { return RouteFiltersClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go index 7dc2516943a3..34770bad33f2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routes_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type RoutesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RoutesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &RoutesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a route in the specified route table. @@ -58,22 +63,18 @@ func NewRoutesClient(subscriptionID string, credential azcore.TokenCredential, o // routeParameters - Parameters supplied to the create or update route operation. // options - RoutesClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutesClient.BeginCreateOrUpdate // method. -func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (RoutesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) - if err != nil { - return RoutesClientCreateOrUpdatePollerResponse{}, err - } - result := RoutesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RoutesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return RoutesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &RoutesClientCreateOrUpdatePoller{ - pt: pt, +func (client *RoutesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route, options *RoutesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[RoutesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, routeName, routeParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RoutesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[RoutesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a route in the specified route table. @@ -129,22 +130,18 @@ func (client *RoutesClient) createOrUpdateCreateRequest(ctx context.Context, res // routeTableName - The name of the route table. // routeName - The name of the route. // options - RoutesClientBeginDeleteOptions contains the optional parameters for the RoutesClient.BeginDelete method. -func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (RoutesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, routeName, options) - if err != nil { - return RoutesClientDeletePollerResponse{}, err - } - result := RoutesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RoutesClient.Delete", "location", resp, client.pl) - if err != nil { - return RoutesClientDeletePollerResponse{}, err - } - result.Poller = &RoutesClientDeletePoller{ - pt: pt, +func (client *RoutesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, options *RoutesClientBeginDeleteOptions) (*armruntime.Poller[RoutesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, routeName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RoutesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[RoutesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified route from a route table. @@ -247,7 +244,7 @@ func (client *RoutesClient) getCreateRequest(ctx context.Context, resourceGroupN // getHandleResponse handles the Get response. func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClientGetResponse, error) { - result := RoutesClientGetResponse{RawResponse: resp} + result := RoutesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Route); err != nil { return RoutesClientGetResponse{}, err } @@ -259,16 +256,32 @@ func (client *RoutesClient) getHandleResponse(resp *http.Response) (RoutesClient // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // options - RoutesClientListOptions contains the optional parameters for the RoutesClient.List method. -func (client *RoutesClient) List(resourceGroupName string, routeTableName string, options *RoutesClientListOptions) *RoutesClientListPager { - return &RoutesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) +func (client *RoutesClient) List(resourceGroupName string, routeTableName string, options *RoutesClientListOptions) *runtime.Pager[RoutesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[RoutesClientListResponse]{ + More: func(page RoutesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RoutesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteListResult.NextLink) + Fetcher: func(ctx context.Context, page *RoutesClientListResponse) (RoutesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, routeTableName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RoutesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RoutesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RoutesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -299,7 +312,7 @@ func (client *RoutesClient) listCreateRequest(ctx context.Context, resourceGroup // listHandleResponse handles the List response. func (client *RoutesClient) listHandleResponse(resp *http.Response) (RoutesClientListResponse, error) { - result := RoutesClientListResponse{RawResponse: resp} + result := RoutesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteListResult); err != nil { return RoutesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go index ef4ce6e6b8bd..8d13ddd0a295 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routetables_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type RouteTablesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RouteTablesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RouteTablesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &RouteTablesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Create or updates a route table in a specified resource group. @@ -57,22 +62,18 @@ func NewRouteTablesClient(subscriptionID string, credential azcore.TokenCredenti // parameters - Parameters supplied to the create or update route table operation. // options - RouteTablesClientBeginCreateOrUpdateOptions contains the optional parameters for the RouteTablesClient.BeginCreateOrUpdate // method. -func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (RouteTablesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, parameters, options) - if err != nil { - return RouteTablesClientCreateOrUpdatePollerResponse{}, err - } - result := RouteTablesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *RouteTablesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable, options *RouteTablesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[RouteTablesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, routeTableName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteTablesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteTablesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("RouteTablesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return RouteTablesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &RouteTablesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Create or updates a route table in a specified resource group. @@ -123,22 +124,18 @@ func (client *RouteTablesClient) createOrUpdateCreateRequest(ctx context.Context // resourceGroupName - The name of the resource group. // routeTableName - The name of the route table. // options - RouteTablesClientBeginDeleteOptions contains the optional parameters for the RouteTablesClient.BeginDelete method. -func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (RouteTablesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, options) - if err != nil { - return RouteTablesClientDeletePollerResponse{}, err - } - result := RouteTablesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RouteTablesClient.Delete", "location", resp, client.pl) - if err != nil { - return RouteTablesClientDeletePollerResponse{}, err +func (client *RouteTablesClient) BeginDelete(ctx context.Context, resourceGroupName string, routeTableName string, options *RouteTablesClientBeginDeleteOptions) (*armruntime.Poller[RouteTablesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, routeTableName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RouteTablesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[RouteTablesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &RouteTablesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified route table. @@ -235,7 +232,7 @@ func (client *RouteTablesClient) getCreateRequest(ctx context.Context, resourceG // getHandleResponse handles the Get response. func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTablesClientGetResponse, error) { - result := RouteTablesClientGetResponse{RawResponse: resp} + result := RouteTablesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { return RouteTablesClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *RouteTablesClient) getHandleResponse(resp *http.Response) (RouteTa // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - RouteTablesClientListOptions contains the optional parameters for the RouteTablesClient.List method. -func (client *RouteTablesClient) List(resourceGroupName string, options *RouteTablesClientListOptions) *RouteTablesClientListPager { - return &RouteTablesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *RouteTablesClient) List(resourceGroupName string, options *RouteTablesClientListOptions) *runtime.Pager[RouteTablesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[RouteTablesClientListResponse]{ + More: func(page RouteTablesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RouteTablesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteTableListResult.NextLink) + Fetcher: func(ctx context.Context, page *RouteTablesClientListResponse) (RouteTablesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RouteTablesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RouteTablesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RouteTablesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -282,7 +295,7 @@ func (client *RouteTablesClient) listCreateRequest(ctx context.Context, resource // listHandleResponse handles the List response. func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteTablesClientListResponse, error) { - result := RouteTablesClientListResponse{RawResponse: resp} + result := RouteTablesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { return RouteTablesClientListResponse{}, err } @@ -292,16 +305,32 @@ func (client *RouteTablesClient) listHandleResponse(resp *http.Response) (RouteT // ListAll - Gets all route tables in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - RouteTablesClientListAllOptions contains the optional parameters for the RouteTablesClient.ListAll method. -func (client *RouteTablesClient) ListAll(options *RouteTablesClientListAllOptions) *RouteTablesClientListAllPager { - return &RouteTablesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *RouteTablesClient) ListAll(options *RouteTablesClientListAllOptions) *runtime.Pager[RouteTablesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[RouteTablesClientListAllResponse]{ + More: func(page RouteTablesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RouteTablesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.RouteTableListResult.NextLink) + Fetcher: func(ctx context.Context, page *RouteTablesClientListAllResponse) (RouteTablesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RouteTablesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RouteTablesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RouteTablesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -324,7 +353,7 @@ func (client *RouteTablesClient) listAllCreateRequest(ctx context.Context, optio // listAllHandleResponse handles the ListAll response. func (client *RouteTablesClient) listAllHandleResponse(resp *http.Response) (RouteTablesClientListAllResponse, error) { - result := RouteTablesClientListAllResponse{RawResponse: resp} + result := RouteTablesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteTableListResult); err != nil { return RouteTablesClientListAllResponse{}, err } @@ -380,7 +409,7 @@ func (client *RouteTablesClient) updateTagsCreateRequest(ctx context.Context, re // updateTagsHandleResponse handles the UpdateTags response. func (client *RouteTablesClient) updateTagsHandleResponse(resp *http.Response) (RouteTablesClientUpdateTagsResponse, error) { - result := RouteTablesClientUpdateTagsResponse{RawResponse: resp} + result := RouteTablesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RouteTable); err != nil { return RouteTablesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go index ccad05a8c96f..dbb1c830960a 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_routingintent_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type RoutingIntentClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *RoutingIntentClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RoutingIntentClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &RoutingIntentClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. @@ -58,22 +63,18 @@ func NewRoutingIntentClient(subscriptionID string, credential azcore.TokenCreden // routingIntentParameters - Parameters supplied to create or update RoutingIntent. // options - RoutingIntentClientBeginCreateOrUpdateOptions contains the optional parameters for the RoutingIntentClient.BeginCreateOrUpdate // method. -func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (RoutingIntentClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) - if err != nil { - return RoutingIntentClientCreateOrUpdatePollerResponse{}, err - } - result := RoutingIntentClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RoutingIntentClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return RoutingIntentClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &RoutingIntentClientCreateOrUpdatePoller{ - pt: pt, +func (client *RoutingIntentClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, routingIntentParameters RoutingIntent, options *RoutingIntentClientBeginCreateOrUpdateOptions) (*armruntime.Poller[RoutingIntentClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routingIntentName, routingIntentParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RoutingIntentClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[RoutingIntentClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. @@ -130,22 +131,18 @@ func (client *RoutingIntentClient) createOrUpdateCreateRequest(ctx context.Conte // routingIntentName - The name of the RoutingIntent. // options - RoutingIntentClientBeginDeleteOptions contains the optional parameters for the RoutingIntentClient.BeginDelete // method. -func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (RoutingIntentClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routingIntentName, options) - if err != nil { - return RoutingIntentClientDeletePollerResponse{}, err - } - result := RoutingIntentClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("RoutingIntentClient.Delete", "location", resp, client.pl) - if err != nil { - return RoutingIntentClientDeletePollerResponse{}, err - } - result.Poller = &RoutingIntentClientDeletePoller{ - pt: pt, +func (client *RoutingIntentClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routingIntentName string, options *RoutingIntentClientBeginDeleteOptions) (*armruntime.Poller[RoutingIntentClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routingIntentName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[RoutingIntentClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[RoutingIntentClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a RoutingIntent. @@ -248,7 +245,7 @@ func (client *RoutingIntentClient) getCreateRequest(ctx context.Context, resourc // getHandleResponse handles the Get response. func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (RoutingIntentClientGetResponse, error) { - result := RoutingIntentClientGetResponse{RawResponse: resp} + result := RoutingIntentClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.RoutingIntent); err != nil { return RoutingIntentClientGetResponse{}, err } @@ -260,16 +257,32 @@ func (client *RoutingIntentClient) getHandleResponse(resp *http.Response) (Routi // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // options - RoutingIntentClientListOptions contains the optional parameters for the RoutingIntentClient.List method. -func (client *RoutingIntentClient) List(resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) *RoutingIntentClientListPager { - return &RoutingIntentClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *RoutingIntentClient) List(resourceGroupName string, virtualHubName string, options *RoutingIntentClientListOptions) *runtime.Pager[RoutingIntentClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[RoutingIntentClientListResponse]{ + More: func(page RoutingIntentClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp RoutingIntentClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListRoutingIntentResult.NextLink) + Fetcher: func(ctx context.Context, page *RoutingIntentClientListResponse) (RoutingIntentClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return RoutingIntentClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return RoutingIntentClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return RoutingIntentClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -300,7 +313,7 @@ func (client *RoutingIntentClient) listCreateRequest(ctx context.Context, resour // listHandleResponse handles the List response. func (client *RoutingIntentClient) listHandleResponse(resp *http.Response) (RoutingIntentClientListResponse, error) { - result := RoutingIntentClientListResponse{RawResponse: resp} + result := RoutingIntentClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListRoutingIntentResult); err != nil { return RoutingIntentClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go index 2c997cefeb16..3832ae332638 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securitygroups_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type SecurityGroupsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SecurityGroupsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityGroupsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &SecurityGroupsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a network security group in the specified resource group. @@ -57,22 +62,18 @@ func NewSecurityGroupsClient(subscriptionID string, credential azcore.TokenCrede // parameters - Parameters supplied to the create or update network security group operation. // options - SecurityGroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityGroupsClient.BeginCreateOrUpdate // method. -func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (SecurityGroupsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) - if err != nil { - return SecurityGroupsClientCreateOrUpdatePollerResponse{}, err - } - result := SecurityGroupsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *SecurityGroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, options *SecurityGroupsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[SecurityGroupsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityGroupsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityGroupsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("SecurityGroupsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return SecurityGroupsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &SecurityGroupsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a network security group in the specified resource group. @@ -124,22 +125,18 @@ func (client *SecurityGroupsClient) createOrUpdateCreateRequest(ctx context.Cont // networkSecurityGroupName - The name of the network security group. // options - SecurityGroupsClientBeginDeleteOptions contains the optional parameters for the SecurityGroupsClient.BeginDelete // method. -func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (SecurityGroupsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, options) - if err != nil { - return SecurityGroupsClientDeletePollerResponse{}, err - } - result := SecurityGroupsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SecurityGroupsClient.Delete", "location", resp, client.pl) - if err != nil { - return SecurityGroupsClientDeletePollerResponse{}, err +func (client *SecurityGroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, options *SecurityGroupsClientBeginDeleteOptions) (*armruntime.Poller[SecurityGroupsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityGroupsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityGroupsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &SecurityGroupsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified network security group. @@ -236,7 +233,7 @@ func (client *SecurityGroupsClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (SecurityGroupsClientGetResponse, error) { - result := SecurityGroupsClientGetResponse{RawResponse: resp} + result := SecurityGroupsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { return SecurityGroupsClientGetResponse{}, err } @@ -247,16 +244,32 @@ func (client *SecurityGroupsClient) getHandleResponse(resp *http.Response) (Secu // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - SecurityGroupsClientListOptions contains the optional parameters for the SecurityGroupsClient.List method. -func (client *SecurityGroupsClient) List(resourceGroupName string, options *SecurityGroupsClientListOptions) *SecurityGroupsClientListPager { - return &SecurityGroupsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *SecurityGroupsClient) List(resourceGroupName string, options *SecurityGroupsClientListOptions) *runtime.Pager[SecurityGroupsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[SecurityGroupsClientListResponse]{ + More: func(page SecurityGroupsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SecurityGroupsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *SecurityGroupsClientListResponse) (SecurityGroupsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SecurityGroupsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SecurityGroupsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SecurityGroupsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -283,7 +296,7 @@ func (client *SecurityGroupsClient) listCreateRequest(ctx context.Context, resou // listHandleResponse handles the List response. func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (SecurityGroupsClientListResponse, error) { - result := SecurityGroupsClientListResponse{RawResponse: resp} + result := SecurityGroupsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { return SecurityGroupsClientListResponse{}, err } @@ -293,16 +306,32 @@ func (client *SecurityGroupsClient) listHandleResponse(resp *http.Response) (Sec // ListAll - Gets all network security groups in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - SecurityGroupsClientListAllOptions contains the optional parameters for the SecurityGroupsClient.ListAll method. -func (client *SecurityGroupsClient) ListAll(options *SecurityGroupsClientListAllOptions) *SecurityGroupsClientListAllPager { - return &SecurityGroupsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *SecurityGroupsClient) ListAll(options *SecurityGroupsClientListAllOptions) *runtime.Pager[SecurityGroupsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[SecurityGroupsClientListAllResponse]{ + More: func(page SecurityGroupsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SecurityGroupsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityGroupListResult.NextLink) + Fetcher: func(ctx context.Context, page *SecurityGroupsClientListAllResponse) (SecurityGroupsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SecurityGroupsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SecurityGroupsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SecurityGroupsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -325,7 +354,7 @@ func (client *SecurityGroupsClient) listAllCreateRequest(ctx context.Context, op // listAllHandleResponse handles the ListAll response. func (client *SecurityGroupsClient) listAllHandleResponse(resp *http.Response) (SecurityGroupsClientListAllResponse, error) { - result := SecurityGroupsClientListAllResponse{RawResponse: resp} + result := SecurityGroupsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroupListResult); err != nil { return SecurityGroupsClientListAllResponse{}, err } @@ -382,7 +411,7 @@ func (client *SecurityGroupsClient) updateTagsCreateRequest(ctx context.Context, // updateTagsHandleResponse handles the UpdateTags response. func (client *SecurityGroupsClient) updateTagsHandleResponse(resp *http.Response) (SecurityGroupsClientUpdateTagsResponse, error) { - result := SecurityGroupsClientUpdateTagsResponse{RawResponse: resp} + result := SecurityGroupsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityGroup); err != nil { return SecurityGroupsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go index 90757ea95521..40491d4aa6b4 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securitypartnerproviders_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type SecurityPartnerProvidersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SecurityPartnerProvidersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityPartnerProvidersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &SecurityPartnerProvidersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Security Partner Provider. @@ -57,22 +62,18 @@ func NewSecurityPartnerProvidersClient(subscriptionID string, credential azcore. // parameters - Parameters supplied to the create or update Security Partner Provider operation. // options - SecurityPartnerProvidersClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginCreateOrUpdate // method. -func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (SecurityPartnerProvidersClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) - if err != nil { - return SecurityPartnerProvidersClientCreateOrUpdatePollerResponse{}, err - } - result := SecurityPartnerProvidersClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *SecurityPartnerProvidersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, parameters SecurityPartnerProvider, options *SecurityPartnerProvidersClientBeginCreateOrUpdateOptions) (*armruntime.Poller[SecurityPartnerProvidersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, securityPartnerProviderName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityPartnerProvidersClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityPartnerProvidersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("SecurityPartnerProvidersClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return SecurityPartnerProvidersClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &SecurityPartnerProvidersClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified Security Partner Provider. @@ -124,22 +125,18 @@ func (client *SecurityPartnerProvidersClient) createOrUpdateCreateRequest(ctx co // securityPartnerProviderName - The name of the Security Partner Provider. // options - SecurityPartnerProvidersClientBeginDeleteOptions contains the optional parameters for the SecurityPartnerProvidersClient.BeginDelete // method. -func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (SecurityPartnerProvidersClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, securityPartnerProviderName, options) - if err != nil { - return SecurityPartnerProvidersClientDeletePollerResponse{}, err - } - result := SecurityPartnerProvidersClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SecurityPartnerProvidersClient.Delete", "location", resp, client.pl) - if err != nil { - return SecurityPartnerProvidersClientDeletePollerResponse{}, err +func (client *SecurityPartnerProvidersClient) BeginDelete(ctx context.Context, resourceGroupName string, securityPartnerProviderName string, options *SecurityPartnerProvidersClientBeginDeleteOptions) (*armruntime.Poller[SecurityPartnerProvidersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, securityPartnerProviderName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityPartnerProvidersClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityPartnerProvidersClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &SecurityPartnerProvidersClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Security Partner Provider. @@ -234,7 +231,7 @@ func (client *SecurityPartnerProvidersClient) getCreateRequest(ctx context.Conte // getHandleResponse handles the Get response. func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientGetResponse, error) { - result := SecurityPartnerProvidersClientGetResponse{RawResponse: resp} + result := SecurityPartnerProvidersClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { return SecurityPartnerProvidersClientGetResponse{}, err } @@ -245,16 +242,32 @@ func (client *SecurityPartnerProvidersClient) getHandleResponse(resp *http.Respo // If the operation fails it returns an *azcore.ResponseError type. // options - SecurityPartnerProvidersClientListOptions contains the optional parameters for the SecurityPartnerProvidersClient.List // method. -func (client *SecurityPartnerProvidersClient) List(options *SecurityPartnerProvidersClientListOptions) *SecurityPartnerProvidersClientListPager { - return &SecurityPartnerProvidersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *SecurityPartnerProvidersClient) List(options *SecurityPartnerProvidersClientListOptions) *runtime.Pager[SecurityPartnerProvidersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[SecurityPartnerProvidersClientListResponse]{ + More: func(page SecurityPartnerProvidersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SecurityPartnerProvidersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityPartnerProviderListResult.NextLink) + Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListResponse) (SecurityPartnerProvidersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SecurityPartnerProvidersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SecurityPartnerProvidersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SecurityPartnerProvidersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -277,7 +290,7 @@ func (client *SecurityPartnerProvidersClient) listCreateRequest(ctx context.Cont // listHandleResponse handles the List response. func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListResponse, error) { - result := SecurityPartnerProvidersClientListResponse{RawResponse: resp} + result := SecurityPartnerProvidersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { return SecurityPartnerProvidersClientListResponse{}, err } @@ -289,16 +302,32 @@ func (client *SecurityPartnerProvidersClient) listHandleResponse(resp *http.Resp // resourceGroupName - The name of the resource group. // options - SecurityPartnerProvidersClientListByResourceGroupOptions contains the optional parameters for the SecurityPartnerProvidersClient.ListByResourceGroup // method. -func (client *SecurityPartnerProvidersClient) ListByResourceGroup(resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) *SecurityPartnerProvidersClientListByResourceGroupPager { - return &SecurityPartnerProvidersClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *SecurityPartnerProvidersClient) ListByResourceGroup(resourceGroupName string, options *SecurityPartnerProvidersClientListByResourceGroupOptions) *runtime.Pager[SecurityPartnerProvidersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[SecurityPartnerProvidersClientListByResourceGroupResponse]{ + More: func(page SecurityPartnerProvidersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SecurityPartnerProvidersClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityPartnerProviderListResult.NextLink) + Fetcher: func(ctx context.Context, page *SecurityPartnerProvidersClientListByResourceGroupResponse) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SecurityPartnerProvidersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -325,7 +354,7 @@ func (client *SecurityPartnerProvidersClient) listByResourceGroupCreateRequest(c // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *SecurityPartnerProvidersClient) listByResourceGroupHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientListByResourceGroupResponse, error) { - result := SecurityPartnerProvidersClientListByResourceGroupResponse{RawResponse: resp} + result := SecurityPartnerProvidersClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProviderListResult); err != nil { return SecurityPartnerProvidersClientListByResourceGroupResponse{}, err } @@ -382,7 +411,7 @@ func (client *SecurityPartnerProvidersClient) updateTagsCreateRequest(ctx contex // updateTagsHandleResponse handles the UpdateTags response. func (client *SecurityPartnerProvidersClient) updateTagsHandleResponse(resp *http.Response) (SecurityPartnerProvidersClientUpdateTagsResponse, error) { - result := SecurityPartnerProvidersClientUpdateTagsResponse{RawResponse: resp} + result := SecurityPartnerProvidersClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityPartnerProvider); err != nil { return SecurityPartnerProvidersClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go index 1a4586ba297a..45bb590a6ab8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_securityrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type SecurityRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SecurityRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SecurityRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &SecurityRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a security rule in the specified network security group. @@ -58,22 +63,18 @@ func NewSecurityRulesClient(subscriptionID string, credential azcore.TokenCreden // securityRuleParameters - Parameters supplied to the create or update network security rule operation. // options - SecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the SecurityRulesClient.BeginCreateOrUpdate // method. -func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (SecurityRulesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) - if err != nil { - return SecurityRulesClientCreateOrUpdatePollerResponse{}, err - } - result := SecurityRulesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SecurityRulesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return SecurityRulesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &SecurityRulesClientCreateOrUpdatePoller{ - pt: pt, +func (client *SecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, options *SecurityRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[SecurityRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityRulesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a security rule in the specified network security group. @@ -130,22 +131,18 @@ func (client *SecurityRulesClient) createOrUpdateCreateRequest(ctx context.Conte // securityRuleName - The name of the security rule. // options - SecurityRulesClientBeginDeleteOptions contains the optional parameters for the SecurityRulesClient.BeginDelete // method. -func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (SecurityRulesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) - if err != nil { - return SecurityRulesClientDeletePollerResponse{}, err - } - result := SecurityRulesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SecurityRulesClient.Delete", "location", resp, client.pl) - if err != nil { - return SecurityRulesClientDeletePollerResponse{}, err - } - result.Poller = &SecurityRulesClientDeletePoller{ - pt: pt, +func (client *SecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, options *SecurityRulesClientBeginDeleteOptions) (*armruntime.Poller[SecurityRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SecurityRulesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SecurityRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified network security rule. @@ -248,7 +245,7 @@ func (client *SecurityRulesClient) getCreateRequest(ctx context.Context, resourc // getHandleResponse handles the Get response. func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (SecurityRulesClientGetResponse, error) { - result := SecurityRulesClientGetResponse{RawResponse: resp} + result := SecurityRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRule); err != nil { return SecurityRulesClientGetResponse{}, err } @@ -260,16 +257,32 @@ func (client *SecurityRulesClient) getHandleResponse(resp *http.Response) (Secur // resourceGroupName - The name of the resource group. // networkSecurityGroupName - The name of the network security group. // options - SecurityRulesClientListOptions contains the optional parameters for the SecurityRulesClient.List method. -func (client *SecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) *SecurityRulesClientListPager { - return &SecurityRulesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) +func (client *SecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string, options *SecurityRulesClientListOptions) *runtime.Pager[SecurityRulesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[SecurityRulesClientListResponse]{ + More: func(page SecurityRulesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SecurityRulesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SecurityRuleListResult.NextLink) + Fetcher: func(ctx context.Context, page *SecurityRulesClientListResponse) (SecurityRulesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkSecurityGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SecurityRulesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SecurityRulesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SecurityRulesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -300,7 +313,7 @@ func (client *SecurityRulesClient) listCreateRequest(ctx context.Context, resour // listHandleResponse handles the List response. func (client *SecurityRulesClient) listHandleResponse(resp *http.Response) (SecurityRulesClientListResponse, error) { - result := SecurityRulesClientListResponse{RawResponse: resp} + result := SecurityRulesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SecurityRuleListResult); err != nil { return SecurityRulesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go index 4550cd09f936..eca8c2292cdd 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceassociationlinks_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ServiceAssociationLinksClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceAssociationLinksClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewServiceAssociationLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceAssociationLinksClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ServiceAssociationLinksClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets a list of service association links for a subnet. @@ -104,7 +109,7 @@ func (client *ServiceAssociationLinksClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *ServiceAssociationLinksClient) listHandleResponse(resp *http.Response) (ServiceAssociationLinksClientListResponse, error) { - result := ServiceAssociationLinksClientListResponse{RawResponse: resp} + result := ServiceAssociationLinksClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceAssociationLinksListResult); err != nil { return ServiceAssociationLinksClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go index 010ab5f6726b..934daf8686b6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicies_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ServiceEndpointPoliciesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceEndpointPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPoliciesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ServiceEndpointPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a service Endpoint Policies. @@ -57,22 +62,18 @@ func NewServiceEndpointPoliciesClient(subscriptionID string, credential azcore.T // parameters - Parameters supplied to the create or update service endpoint policy operation. // options - ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginCreateOrUpdate // method. -func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) - if err != nil { - return ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result := ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *ServiceEndpointPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy, options *ServiceEndpointPoliciesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServiceEndpointPoliciesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ServiceEndpointPoliciesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("ServiceEndpointPoliciesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ServiceEndpointPoliciesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ServiceEndpointPoliciesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a service Endpoint Policies. @@ -124,22 +125,18 @@ func (client *ServiceEndpointPoliciesClient) createOrUpdateCreateRequest(ctx con // serviceEndpointPolicyName - The name of the service endpoint policy. // options - ServiceEndpointPoliciesClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPoliciesClient.BeginDelete // method. -func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (ServiceEndpointPoliciesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, options) - if err != nil { - return ServiceEndpointPoliciesClientDeletePollerResponse{}, err - } - result := ServiceEndpointPoliciesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ServiceEndpointPoliciesClient.Delete", "location", resp, client.pl) - if err != nil { - return ServiceEndpointPoliciesClientDeletePollerResponse{}, err +func (client *ServiceEndpointPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPoliciesClientBeginDeleteOptions) (*armruntime.Poller[ServiceEndpointPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ServiceEndpointPoliciesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ServiceEndpointPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &ServiceEndpointPoliciesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified service endpoint policy. @@ -237,7 +234,7 @@ func (client *ServiceEndpointPoliciesClient) getCreateRequest(ctx context.Contex // getHandleResponse handles the Get response. func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientGetResponse, error) { - result := ServiceEndpointPoliciesClientGetResponse{RawResponse: resp} + result := ServiceEndpointPoliciesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { return ServiceEndpointPoliciesClientGetResponse{}, err } @@ -248,16 +245,32 @@ func (client *ServiceEndpointPoliciesClient) getHandleResponse(resp *http.Respon // If the operation fails it returns an *azcore.ResponseError type. // options - ServiceEndpointPoliciesClientListOptions contains the optional parameters for the ServiceEndpointPoliciesClient.List // method. -func (client *ServiceEndpointPoliciesClient) List(options *ServiceEndpointPoliciesClientListOptions) *ServiceEndpointPoliciesClientListPager { - return &ServiceEndpointPoliciesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *ServiceEndpointPoliciesClient) List(options *ServiceEndpointPoliciesClientListOptions) *runtime.Pager[ServiceEndpointPoliciesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ServiceEndpointPoliciesClientListResponse]{ + More: func(page ServiceEndpointPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ServiceEndpointPoliciesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ServiceEndpointPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListResponse) (ServiceEndpointPoliciesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ServiceEndpointPoliciesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ServiceEndpointPoliciesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceEndpointPoliciesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -280,7 +293,7 @@ func (client *ServiceEndpointPoliciesClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListResponse, error) { - result := ServiceEndpointPoliciesClientListResponse{RawResponse: resp} + result := ServiceEndpointPoliciesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { return ServiceEndpointPoliciesClientListResponse{}, err } @@ -292,16 +305,32 @@ func (client *ServiceEndpointPoliciesClient) listHandleResponse(resp *http.Respo // resourceGroupName - The name of the resource group. // options - ServiceEndpointPoliciesClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPoliciesClient.ListByResourceGroup // method. -func (client *ServiceEndpointPoliciesClient) ListByResourceGroup(resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) *ServiceEndpointPoliciesClientListByResourceGroupPager { - return &ServiceEndpointPoliciesClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *ServiceEndpointPoliciesClient) ListByResourceGroup(resourceGroupName string, options *ServiceEndpointPoliciesClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPoliciesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[ServiceEndpointPoliciesClientListByResourceGroupResponse]{ + More: func(page ServiceEndpointPoliciesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ServiceEndpointPoliciesClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ServiceEndpointPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *ServiceEndpointPoliciesClientListByResourceGroupResponse) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -328,7 +357,7 @@ func (client *ServiceEndpointPoliciesClient) listByResourceGroupCreateRequest(ct // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *ServiceEndpointPoliciesClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientListByResourceGroupResponse, error) { - result := ServiceEndpointPoliciesClientListByResourceGroupResponse{RawResponse: resp} + result := ServiceEndpointPoliciesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyListResult); err != nil { return ServiceEndpointPoliciesClientListByResourceGroupResponse{}, err } @@ -385,7 +414,7 @@ func (client *ServiceEndpointPoliciesClient) updateTagsCreateRequest(ctx context // updateTagsHandleResponse handles the UpdateTags response. func (client *ServiceEndpointPoliciesClient) updateTagsHandleResponse(resp *http.Response) (ServiceEndpointPoliciesClientUpdateTagsResponse, error) { - result := ServiceEndpointPoliciesClientUpdateTagsResponse{RawResponse: resp} + result := ServiceEndpointPoliciesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicy); err != nil { return ServiceEndpointPoliciesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go index ac1e40655325..9ef5eccc30c1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_serviceendpointpolicydefinitions_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ServiceEndpointPolicyDefinitionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceEndpointPolicyDefinitionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceEndpointPolicyDefinitionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ServiceEndpointPolicyDefinitionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. @@ -58,22 +63,18 @@ func NewServiceEndpointPolicyDefinitionsClient(subscriptionID string, credential // serviceEndpointPolicyDefinitions - Parameters supplied to the create or update service endpoint policy operation. // options - ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginCreateOrUpdate // method. -func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse{}, err - } - result := ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &ServiceEndpointPolicyDefinitionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *ServiceEndpointPolicyDefinitionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition, options *ServiceEndpointPolicyDefinitionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a service endpoint policy definition in the specified service endpoint policy. @@ -130,22 +131,18 @@ func (client *ServiceEndpointPolicyDefinitionsClient) createOrUpdateCreateReques // serviceEndpointPolicyDefinitionName - The name of the service endpoint policy definition. // options - ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.BeginDelete // method. -func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (ServiceEndpointPolicyDefinitionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientDeletePollerResponse{}, err - } - result := ServiceEndpointPolicyDefinitionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("ServiceEndpointPolicyDefinitionsClient.Delete", "location", resp, client.pl) - if err != nil { - return ServiceEndpointPolicyDefinitionsClientDeletePollerResponse{}, err - } - result.Poller = &ServiceEndpointPolicyDefinitionsClientDeletePoller{ - pt: pt, +func (client *ServiceEndpointPolicyDefinitionsClient) BeginDelete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, options *ServiceEndpointPolicyDefinitionsClientBeginDeleteOptions) (*armruntime.Poller[ServiceEndpointPolicyDefinitionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[ServiceEndpointPolicyDefinitionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[ServiceEndpointPolicyDefinitionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified ServiceEndpoint policy definitions. @@ -249,7 +246,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) getCreateRequest(ctx conte // getHandleResponse handles the Get response. func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientGetResponse, error) { - result := ServiceEndpointPolicyDefinitionsClientGetResponse{RawResponse: resp} + result := ServiceEndpointPolicyDefinitionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinition); err != nil { return ServiceEndpointPolicyDefinitionsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *ServiceEndpointPolicyDefinitionsClient) getHandleResponse(resp *ht // serviceEndpointPolicyName - The name of the service endpoint policy name. // options - ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions contains the optional parameters for the ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup // method. -func (client *ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) *ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager { - return &ServiceEndpointPolicyDefinitionsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) +func (client *ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(resourceGroupName string, serviceEndpointPolicyName string, options *ServiceEndpointPolicyDefinitionsClientListByResourceGroupOptions) *runtime.Pager[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse]{ + More: func(page ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ServiceEndpointPolicyDefinitionListResult.NextLink) + Fetcher: func(ctx context.Context, page *ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, serviceEndpointPolicyName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -302,7 +315,7 @@ func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupCreateR // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *ServiceEndpointPolicyDefinitionsClient) listByResourceGroupHandleResponse(resp *http.Response) (ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse, error) { - result := ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{RawResponse: resp} + result := ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceEndpointPolicyDefinitionListResult); err != nil { return ServiceEndpointPolicyDefinitionsClientListByResourceGroupResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go index 6b2bd20c68c1..92a8227e5537 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetaginformation_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -35,20 +36,24 @@ type ServiceTagInformationClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceTagInformationClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewServiceTagInformationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagInformationClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ServiceTagInformationClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets a list of service tag information resources with pagination. @@ -58,16 +63,32 @@ func NewServiceTagInformationClient(subscriptionID string, credential azcore.Tok // your subscription belongs to). // options - ServiceTagInformationClientListOptions contains the optional parameters for the ServiceTagInformationClient.List // method. -func (client *ServiceTagInformationClient) List(location string, options *ServiceTagInformationClientListOptions) *ServiceTagInformationClientListPager { - return &ServiceTagInformationClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *ServiceTagInformationClient) List(location string, options *ServiceTagInformationClientListOptions) *runtime.Pager[ServiceTagInformationClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[ServiceTagInformationClientListResponse]{ + More: func(page ServiceTagInformationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp ServiceTagInformationClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ServiceTagInformationListResult.NextLink) + Fetcher: func(ctx context.Context, page *ServiceTagInformationClientListResponse) (ServiceTagInformationClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ServiceTagInformationClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return ServiceTagInformationClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ServiceTagInformationClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -100,7 +121,7 @@ func (client *ServiceTagInformationClient) listCreateRequest(ctx context.Context // listHandleResponse handles the List response. func (client *ServiceTagInformationClient) listHandleResponse(resp *http.Response) (ServiceTagInformationClientListResponse, error) { - result := ServiceTagInformationClientListResponse{RawResponse: resp} + result := ServiceTagInformationClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagInformationListResult); err != nil { return ServiceTagInformationClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go index e55815f7acd6..038ac8b7bb02 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_servicetags_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type ServiceTagsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *ServiceTagsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewServiceTagsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceTagsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &ServiceTagsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Gets a list of service tag information resources. @@ -95,7 +100,7 @@ func (client *ServiceTagsClient) listCreateRequest(ctx context.Context, location // listHandleResponse handles the List response. func (client *ServiceTagsClient) listHandleResponse(resp *http.Response) (ServiceTagsClientListResponse, error) { - result := ServiceTagsClientListResponse{RawResponse: resp} + result := ServiceTagsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ServiceTagsListResult); err != nil { return ServiceTagsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go index ad4dc3bfe6ae..1956105e45a2 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_subnets_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type SubnetsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *SubnetsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*SubnetsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &SubnetsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a subnet in the specified virtual network. @@ -58,22 +63,18 @@ func NewSubnetsClient(subscriptionID string, credential azcore.TokenCredential, // subnetParameters - Parameters supplied to the create or update subnet operation. // options - SubnetsClientBeginCreateOrUpdateOptions contains the optional parameters for the SubnetsClient.BeginCreateOrUpdate // method. -func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (SubnetsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) - if err != nil { - return SubnetsClientCreateOrUpdatePollerResponse{}, err - } - result := SubnetsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SubnetsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return SubnetsClientCreateOrUpdatePollerResponse{}, err +func (client *SubnetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, options *SubnetsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[SubnetsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SubnetsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[SubnetsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &SubnetsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a subnet in the specified virtual network. @@ -129,22 +130,18 @@ func (client *SubnetsClient) createOrUpdateCreateRequest(ctx context.Context, re // virtualNetworkName - The name of the virtual network. // subnetName - The name of the subnet. // options - SubnetsClientBeginDeleteOptions contains the optional parameters for the SubnetsClient.BeginDelete method. -func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (SubnetsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, subnetName, options) - if err != nil { - return SubnetsClientDeletePollerResponse{}, err - } - result := SubnetsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SubnetsClient.Delete", "location", resp, client.pl) - if err != nil { - return SubnetsClientDeletePollerResponse{}, err - } - result.Poller = &SubnetsClientDeletePoller{ - pt: pt, +func (client *SubnetsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, options *SubnetsClientBeginDeleteOptions) (*armruntime.Poller[SubnetsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, subnetName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SubnetsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SubnetsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified subnet. @@ -250,7 +247,7 @@ func (client *SubnetsClient) getCreateRequest(ctx context.Context, resourceGroup // getHandleResponse handles the Get response. func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClientGetResponse, error) { - result := SubnetsClientGetResponse{RawResponse: resp} + result := SubnetsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Subnet); err != nil { return SubnetsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *SubnetsClient) getHandleResponse(resp *http.Response) (SubnetsClie // resourceGroupName - The name of the resource group. // virtualNetworkName - The name of the virtual network. // options - SubnetsClientListOptions contains the optional parameters for the SubnetsClient.List method. -func (client *SubnetsClient) List(resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) *SubnetsClientListPager { - return &SubnetsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) +func (client *SubnetsClient) List(resourceGroupName string, virtualNetworkName string, options *SubnetsClientListOptions) *runtime.Pager[SubnetsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[SubnetsClientListResponse]{ + More: func(page SubnetsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp SubnetsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.SubnetListResult.NextLink) + Fetcher: func(ctx context.Context, page *SubnetsClientListResponse) (SubnetsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return SubnetsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return SubnetsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return SubnetsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *SubnetsClient) listCreateRequest(ctx context.Context, resourceGrou // listHandleResponse handles the List response. func (client *SubnetsClient) listHandleResponse(resp *http.Response) (SubnetsClientListResponse, error) { - result := SubnetsClientListResponse{RawResponse: resp} + result := SubnetsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.SubnetListResult); err != nil { return SubnetsClientListResponse{}, err } @@ -317,22 +330,18 @@ func (client *SubnetsClient) listHandleResponse(resp *http.Response) (SubnetsCli // prepareNetworkPoliciesRequestParameters - Parameters supplied to prepare subnet by applying network intent policies. // options - SubnetsClientBeginPrepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginPrepareNetworkPolicies // method. -func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (SubnetsClientPrepareNetworkPoliciesPollerResponse, error) { - resp, err := client.prepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) - if err != nil { - return SubnetsClientPrepareNetworkPoliciesPollerResponse{}, err - } - result := SubnetsClientPrepareNetworkPoliciesPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SubnetsClient.PrepareNetworkPolicies", "location", resp, client.pl) - if err != nil { - return SubnetsClientPrepareNetworkPoliciesPollerResponse{}, err - } - result.Poller = &SubnetsClientPrepareNetworkPoliciesPoller{ - pt: pt, +func (client *SubnetsClient) BeginPrepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, prepareNetworkPoliciesRequestParameters PrepareNetworkPoliciesRequest, options *SubnetsClientBeginPrepareNetworkPoliciesOptions) (*armruntime.Poller[SubnetsClientPrepareNetworkPoliciesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.prepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, prepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SubnetsClientPrepareNetworkPoliciesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SubnetsClientPrepareNetworkPoliciesResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // PrepareNetworkPolicies - Prepares a subnet by applying network intent policies. @@ -390,22 +399,18 @@ func (client *SubnetsClient) prepareNetworkPoliciesCreateRequest(ctx context.Con // unprepareNetworkPoliciesRequestParameters - Parameters supplied to unprepare subnet to remove network intent policies. // options - SubnetsClientBeginUnprepareNetworkPoliciesOptions contains the optional parameters for the SubnetsClient.BeginUnprepareNetworkPolicies // method. -func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (SubnetsClientUnprepareNetworkPoliciesPollerResponse, error) { - resp, err := client.unprepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) - if err != nil { - return SubnetsClientUnprepareNetworkPoliciesPollerResponse{}, err +func (client *SubnetsClient) BeginUnprepareNetworkPolicies(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, unprepareNetworkPoliciesRequestParameters UnprepareNetworkPoliciesRequest, options *SubnetsClientBeginUnprepareNetworkPoliciesOptions) (*armruntime.Poller[SubnetsClientUnprepareNetworkPoliciesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.unprepareNetworkPolicies(ctx, resourceGroupName, virtualNetworkName, subnetName, unprepareNetworkPoliciesRequestParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[SubnetsClientUnprepareNetworkPoliciesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[SubnetsClientUnprepareNetworkPoliciesResponse](options.ResumeToken, client.pl, nil) } - result := SubnetsClientUnprepareNetworkPoliciesPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("SubnetsClient.UnprepareNetworkPolicies", "location", resp, client.pl) - if err != nil { - return SubnetsClientUnprepareNetworkPoliciesPollerResponse{}, err - } - result.Poller = &SubnetsClientUnprepareNetworkPoliciesPoller{ - pt: pt, - } - return result, nil } // UnprepareNetworkPolicies - Unprepares a subnet by removing network intent policies. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_time_rfc3339.go b/sdk/resourcemanager/network/armnetwork/zz_generated_time_rfc3339.go index 66ed1d8c8a9f..6c38c3843fc0 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_time_rfc3339.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_time_rfc3339.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go index 5fce6f5201ee..3bb74517bf11 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_usages_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,36 +35,56 @@ type UsagesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *UsagesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewUsagesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &UsagesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - List network usages for a subscription. // If the operation fails it returns an *azcore.ResponseError type. // location - The location where resource usage is queried. // options - UsagesClientListOptions contains the optional parameters for the UsagesClient.List method. -func (client *UsagesClient) List(location string, options *UsagesClientListOptions) *UsagesClientListPager { - return &UsagesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, location, options) +func (client *UsagesClient) List(location string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[UsagesClientListResponse]{ + More: func(page UsagesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp UsagesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.UsagesListResult.NextLink) + Fetcher: func(ctx context.Context, page *UsagesClientListResponse) (UsagesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return UsagesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return UsagesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return UsagesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -90,7 +111,7 @@ func (client *UsagesClient) listCreateRequest(ctx context.Context, location stri // listHandleResponse handles the List response. func (client *UsagesClient) listHandleResponse(resp *http.Response) (UsagesClientListResponse, error) { - result := UsagesClientListResponse{RawResponse: resp} + result := UsagesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.UsagesListResult); err != nil { return UsagesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go index 2f9d5de99640..e20e4ea2ab12 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliances_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualAppliancesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualAppliancesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualAppliancesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualAppliancesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance. @@ -57,22 +62,18 @@ func NewVirtualAppliancesClient(subscriptionID string, credential azcore.TokenCr // parameters - Parameters supplied to the create or update Network Virtual Appliance. // options - VirtualAppliancesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualAppliancesClient.BeginCreateOrUpdate // method. -func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (VirtualAppliancesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) - if err != nil { - return VirtualAppliancesClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualAppliancesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VirtualAppliancesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, parameters VirtualAppliance, options *VirtualAppliancesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualAppliancesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualAppliancesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualAppliancesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualAppliancesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualAppliancesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualAppliancesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance. @@ -124,22 +125,18 @@ func (client *VirtualAppliancesClient) createOrUpdateCreateRequest(ctx context.C // networkVirtualApplianceName - The name of Network Virtual Appliance. // options - VirtualAppliancesClientBeginDeleteOptions contains the optional parameters for the VirtualAppliancesClient.BeginDelete // method. -func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (VirtualAppliancesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, options) - if err != nil { - return VirtualAppliancesClientDeletePollerResponse{}, err - } - result := VirtualAppliancesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualAppliancesClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualAppliancesClientDeletePollerResponse{}, err +func (client *VirtualAppliancesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, options *VirtualAppliancesClientBeginDeleteOptions) (*armruntime.Poller[VirtualAppliancesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualAppliancesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualAppliancesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualAppliancesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Network Virtual Appliance. @@ -236,7 +233,7 @@ func (client *VirtualAppliancesClient) getCreateRequest(ctx context.Context, res // getHandleResponse handles the Get response. func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (VirtualAppliancesClientGetResponse, error) { - result := VirtualAppliancesClientGetResponse{RawResponse: resp} + result := VirtualAppliancesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { return VirtualAppliancesClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *VirtualAppliancesClient) getHandleResponse(resp *http.Response) (V // List - Gets all Network Virtual Appliances in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualAppliancesClientListOptions contains the optional parameters for the VirtualAppliancesClient.List method. -func (client *VirtualAppliancesClient) List(options *VirtualAppliancesClientListOptions) *VirtualAppliancesClientListPager { - return &VirtualAppliancesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VirtualAppliancesClient) List(options *VirtualAppliancesClientListOptions) *runtime.Pager[VirtualAppliancesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualAppliancesClientListResponse]{ + More: func(page VirtualAppliancesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualAppliancesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualApplianceListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListResponse) (VirtualAppliancesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualAppliancesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualAppliancesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualAppliancesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -278,7 +291,7 @@ func (client *VirtualAppliancesClient) listCreateRequest(ctx context.Context, op // listHandleResponse handles the List response. func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) (VirtualAppliancesClientListResponse, error) { - result := VirtualAppliancesClientListResponse{RawResponse: resp} + result := VirtualAppliancesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { return VirtualAppliancesClientListResponse{}, err } @@ -290,16 +303,32 @@ func (client *VirtualAppliancesClient) listHandleResponse(resp *http.Response) ( // resourceGroupName - The name of the resource group. // options - VirtualAppliancesClientListByResourceGroupOptions contains the optional parameters for the VirtualAppliancesClient.ListByResourceGroup // method. -func (client *VirtualAppliancesClient) ListByResourceGroup(resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) *VirtualAppliancesClientListByResourceGroupPager { - return &VirtualAppliancesClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualAppliancesClient) ListByResourceGroup(resourceGroupName string, options *VirtualAppliancesClientListByResourceGroupOptions) *runtime.Pager[VirtualAppliancesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualAppliancesClientListByResourceGroupResponse]{ + More: func(page VirtualAppliancesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualAppliancesClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualApplianceListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualAppliancesClientListByResourceGroupResponse) (VirtualAppliancesClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualAppliancesClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualAppliancesClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualAppliancesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -326,7 +355,7 @@ func (client *VirtualAppliancesClient) listByResourceGroupCreateRequest(ctx cont // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VirtualAppliancesClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualAppliancesClientListByResourceGroupResponse, error) { - result := VirtualAppliancesClientListByResourceGroupResponse{RawResponse: resp} + result := VirtualAppliancesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceListResult); err != nil { return VirtualAppliancesClientListByResourceGroupResponse{}, err } @@ -383,7 +412,7 @@ func (client *VirtualAppliancesClient) updateTagsCreateRequest(ctx context.Conte // updateTagsHandleResponse handles the UpdateTags response. func (client *VirtualAppliancesClient) updateTagsHandleResponse(resp *http.Response) (VirtualAppliancesClientUpdateTagsResponse, error) { - result := VirtualAppliancesClientUpdateTagsResponse{RawResponse: resp} + result := VirtualAppliancesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualAppliance); err != nil { return VirtualAppliancesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go index 25e6c79d5a45..ae4593575c75 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualappliancesites_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualApplianceSitesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualApplianceSitesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSitesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualApplianceSitesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. @@ -58,22 +63,18 @@ func NewVirtualApplianceSitesClient(subscriptionID string, credential azcore.Tok // parameters - Parameters supplied to the create or update Network Virtual Appliance Site operation. // options - VirtualApplianceSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginCreateOrUpdate // method. -func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (VirtualApplianceSitesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) - if err != nil { - return VirtualApplianceSitesClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualApplianceSitesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualApplianceSitesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualApplianceSitesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualApplianceSitesClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualApplianceSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, parameters VirtualApplianceSite, options *VirtualApplianceSitesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualApplianceSitesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, networkVirtualApplianceName, siteName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualApplianceSitesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualApplianceSitesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified Network Virtual Appliance Site. @@ -130,22 +131,18 @@ func (client *VirtualApplianceSitesClient) createOrUpdateCreateRequest(ctx conte // siteName - The name of the site. // options - VirtualApplianceSitesClientBeginDeleteOptions contains the optional parameters for the VirtualApplianceSitesClient.BeginDelete // method. -func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (VirtualApplianceSitesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) - if err != nil { - return VirtualApplianceSitesClientDeletePollerResponse{}, err - } - result := VirtualApplianceSitesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualApplianceSitesClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualApplianceSitesClientDeletePollerResponse{}, err - } - result.Poller = &VirtualApplianceSitesClientDeletePoller{ - pt: pt, +func (client *VirtualApplianceSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, networkVirtualApplianceName string, siteName string, options *VirtualApplianceSitesClientBeginDeleteOptions) (*armruntime.Poller[VirtualApplianceSitesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkVirtualApplianceName, siteName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualApplianceSitesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualApplianceSitesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified site from a Virtual Appliance. @@ -249,7 +246,7 @@ func (client *VirtualApplianceSitesClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response) (VirtualApplianceSitesClientGetResponse, error) { - result := VirtualApplianceSitesClientGetResponse{RawResponse: resp} + result := VirtualApplianceSitesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSite); err != nil { return VirtualApplianceSitesClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *VirtualApplianceSitesClient) getHandleResponse(resp *http.Response // networkVirtualApplianceName - The name of the Network Virtual Appliance. // options - VirtualApplianceSitesClientListOptions contains the optional parameters for the VirtualApplianceSitesClient.List // method. -func (client *VirtualApplianceSitesClient) List(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) *VirtualApplianceSitesClientListPager { - return &VirtualApplianceSitesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) +func (client *VirtualApplianceSitesClient) List(resourceGroupName string, networkVirtualApplianceName string, options *VirtualApplianceSitesClientListOptions) *runtime.Pager[VirtualApplianceSitesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualApplianceSitesClientListResponse]{ + More: func(page VirtualApplianceSitesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualApplianceSitesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualApplianceSiteListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualApplianceSitesClientListResponse) (VirtualApplianceSitesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, networkVirtualApplianceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualApplianceSitesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualApplianceSitesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualApplianceSitesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *VirtualApplianceSitesClient) listCreateRequest(ctx context.Context // listHandleResponse handles the List response. func (client *VirtualApplianceSitesClient) listHandleResponse(resp *http.Response) (VirtualApplianceSitesClientListResponse, error) { - result := VirtualApplianceSitesClientListResponse{RawResponse: resp} + result := VirtualApplianceSitesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSiteListResult); err != nil { return VirtualApplianceSitesClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go index 9a6644d87153..62a77ea3e034 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualapplianceskus_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualApplianceSKUsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualApplianceSKUsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualApplianceSKUsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualApplianceSKUsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualApplianceSKUsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Retrieves a single available sku for network virtual appliance. @@ -94,7 +99,7 @@ func (client *VirtualApplianceSKUsClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientGetResponse, error) { - result := VirtualApplianceSKUsClientGetResponse{RawResponse: resp} + result := VirtualApplianceSKUsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKU); err != nil { return VirtualApplianceSKUsClientGetResponse{}, err } @@ -105,16 +110,32 @@ func (client *VirtualApplianceSKUsClient) getHandleResponse(resp *http.Response) // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualApplianceSKUsClientListOptions contains the optional parameters for the VirtualApplianceSKUsClient.List // method. -func (client *VirtualApplianceSKUsClient) List(options *VirtualApplianceSKUsClientListOptions) *VirtualApplianceSKUsClientListPager { - return &VirtualApplianceSKUsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VirtualApplianceSKUsClient) List(options *VirtualApplianceSKUsClientListOptions) *runtime.Pager[VirtualApplianceSKUsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualApplianceSKUsClientListResponse]{ + More: func(page VirtualApplianceSKUsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualApplianceSKUsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualApplianceSKUListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualApplianceSKUsClientListResponse) (VirtualApplianceSKUsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualApplianceSKUsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualApplianceSKUsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualApplianceSKUsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -137,7 +158,7 @@ func (client *VirtualApplianceSKUsClient) listCreateRequest(ctx context.Context, // listHandleResponse handles the List response. func (client *VirtualApplianceSKUsClient) listHandleResponse(resp *http.Response) (VirtualApplianceSKUsClientListResponse, error) { - result := VirtualApplianceSKUsClientListResponse{RawResponse: resp} + result := VirtualApplianceSKUsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualApplianceSKUListResult); err != nil { return VirtualApplianceSKUsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go index 8239197c9efa..266f9b447de0 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnection_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualHubBgpConnectionClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualHubBgpConnectionClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualHubBgpConnectionClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. @@ -58,22 +63,18 @@ func NewVirtualHubBgpConnectionClient(subscriptionID string, credential azcore.T // parameters - Parameters of Bgp connection. // options - VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginCreateOrUpdate // method. -func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) - if err != nil { - return VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubBgpConnectionClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualHubBgpConnectionClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualHubBgpConnectionClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualHubBgpConnectionClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, parameters BgpConnection, options *VirtualHubBgpConnectionClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualHubBgpConnectionClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, connectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubBgpConnectionClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing VirtualHubBgpConnection. @@ -130,22 +131,18 @@ func (client *VirtualHubBgpConnectionClient) createOrUpdateCreateRequest(ctx con // connectionName - The name of the connection. // options - VirtualHubBgpConnectionClientBeginDeleteOptions contains the optional parameters for the VirtualHubBgpConnectionClient.BeginDelete // method. -func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (VirtualHubBgpConnectionClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) - if err != nil { - return VirtualHubBgpConnectionClientDeletePollerResponse{}, err +func (client *VirtualHubBgpConnectionClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string, options *VirtualHubBgpConnectionClientBeginDeleteOptions) (*armruntime.Poller[VirtualHubBgpConnectionClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubBgpConnectionClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubBgpConnectionClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result := VirtualHubBgpConnectionClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubBgpConnectionClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualHubBgpConnectionClientDeletePollerResponse{}, err - } - result.Poller = &VirtualHubBgpConnectionClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a VirtualHubBgpConnection. @@ -249,7 +246,7 @@ func (client *VirtualHubBgpConnectionClient) getCreateRequest(ctx context.Contex // getHandleResponse handles the Get response. func (client *VirtualHubBgpConnectionClient) getHandleResponse(resp *http.Response) (VirtualHubBgpConnectionClientGetResponse, error) { - result := VirtualHubBgpConnectionClientGetResponse{RawResponse: resp} + result := VirtualHubBgpConnectionClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.BgpConnection); err != nil { return VirtualHubBgpConnectionClientGetResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go index 1d928ef55cdf..a73769607ede 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubbgpconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualHubBgpConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualHubBgpConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubBgpConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualHubBgpConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // List - Retrieves the details of all VirtualHubBgpConnections. @@ -56,16 +61,32 @@ func NewVirtualHubBgpConnectionsClient(subscriptionID string, credential azcore. // virtualHubName - The name of the VirtualHub. // options - VirtualHubBgpConnectionsClientListOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.List // method. -func (client *VirtualHubBgpConnectionsClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) *VirtualHubBgpConnectionsClientListPager { - return &VirtualHubBgpConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *VirtualHubBgpConnectionsClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubBgpConnectionsClientListOptions) *runtime.Pager[VirtualHubBgpConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualHubBgpConnectionsClientListResponse]{ + More: func(page VirtualHubBgpConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualHubBgpConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualHubBgpConnectionResults.NextLink) + Fetcher: func(ctx context.Context, page *VirtualHubBgpConnectionsClientListResponse) (VirtualHubBgpConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualHubBgpConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualHubBgpConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualHubBgpConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -96,7 +117,7 @@ func (client *VirtualHubBgpConnectionsClient) listCreateRequest(ctx context.Cont // listHandleResponse handles the List response. func (client *VirtualHubBgpConnectionsClient) listHandleResponse(resp *http.Response) (VirtualHubBgpConnectionsClientListResponse, error) { - result := VirtualHubBgpConnectionsClientListResponse{RawResponse: resp} + result := VirtualHubBgpConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubBgpConnectionResults); err != nil { return VirtualHubBgpConnectionsClientListResponse{}, err } @@ -110,22 +131,18 @@ func (client *VirtualHubBgpConnectionsClient) listHandleResponse(resp *http.Resp // connectionName - The name of the virtual hub bgp connection. // options - VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListAdvertisedRoutes // method. -func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse, error) { - resp, err := client.listAdvertisedRoutes(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse{}, err - } - result := VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubBgpConnectionsClient.ListAdvertisedRoutes", "location", resp, client.pl) - if err != nil { - return VirtualHubBgpConnectionsClientListAdvertisedRoutesPollerResponse{}, err +func (client *VirtualHubBgpConnectionsClient) BeginListAdvertisedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListAdvertisedRoutesOptions) (*armruntime.Poller[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listAdvertisedRoutes(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListAdvertisedRoutesResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualHubBgpConnectionsClientListAdvertisedRoutesPoller{ - pt: pt, - } - return result, nil } // ListAdvertisedRoutes - Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. @@ -182,22 +199,18 @@ func (client *VirtualHubBgpConnectionsClient) listAdvertisedRoutesCreateRequest( // connectionName - The name of the virtual hub bgp connection. // options - VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions contains the optional parameters for the VirtualHubBgpConnectionsClient.BeginListLearnedRoutes // method. -func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse, error) { - resp, err := client.listLearnedRoutes(ctx, resourceGroupName, hubName, connectionName, options) - if err != nil { - return VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse{}, err - } - result := VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse{ - RawResponse: resp, +func (client *VirtualHubBgpConnectionsClient) BeginListLearnedRoutes(ctx context.Context, resourceGroupName string, hubName string, connectionName string, options *VirtualHubBgpConnectionsClientBeginListLearnedRoutesOptions) (*armruntime.Poller[VirtualHubBgpConnectionsClientListLearnedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listLearnedRoutes(ctx, resourceGroupName, hubName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubBgpConnectionsClientListLearnedRoutesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubBgpConnectionsClientListLearnedRoutesResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualHubBgpConnectionsClient.ListLearnedRoutes", "location", resp, client.pl) - if err != nil { - return VirtualHubBgpConnectionsClientListLearnedRoutesPollerResponse{}, err - } - result.Poller = &VirtualHubBgpConnectionsClientListLearnedRoutesPoller{ - pt: pt, - } - return result, nil } // ListLearnedRoutes - Retrieves a list of routes the virtual hub bgp connection has learned. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go index 4475b4833684..ce538850a7f1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubipconfiguration_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualHubIPConfigurationClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualHubIPConfigurationClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubIPConfigurationClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualHubIPConfigurationClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. @@ -58,22 +63,18 @@ func NewVirtualHubIPConfigurationClient(subscriptionID string, credential azcore // parameters - Hub Ip Configuration parameters. // options - VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginCreateOrUpdate // method. -func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) - if err != nil { - return VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubIPConfigurationClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualHubIPConfigurationClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualHubIPConfigurationClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualHubIPConfigurationClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, parameters HubIPConfiguration, options *VirtualHubIPConfigurationClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualHubIPConfigurationClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, ipConfigName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubIPConfigurationClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing VirtualHubIpConfiguration. @@ -130,22 +131,18 @@ func (client *VirtualHubIPConfigurationClient) createOrUpdateCreateRequest(ctx c // ipConfigName - The name of the ipconfig. // options - VirtualHubIPConfigurationClientBeginDeleteOptions contains the optional parameters for the VirtualHubIPConfigurationClient.BeginDelete // method. -func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (VirtualHubIPConfigurationClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, ipConfigName, options) - if err != nil { - return VirtualHubIPConfigurationClientDeletePollerResponse{}, err - } - result := VirtualHubIPConfigurationClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubIPConfigurationClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualHubIPConfigurationClientDeletePollerResponse{}, err - } - result.Poller = &VirtualHubIPConfigurationClientDeletePoller{ - pt: pt, +func (client *VirtualHubIPConfigurationClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, ipConfigName string, options *VirtualHubIPConfigurationClientBeginDeleteOptions) (*armruntime.Poller[VirtualHubIPConfigurationClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, ipConfigName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubIPConfigurationClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubIPConfigurationClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a VirtualHubIpConfiguration. @@ -249,7 +246,7 @@ func (client *VirtualHubIPConfigurationClient) getCreateRequest(ctx context.Cont // getHandleResponse handles the Get response. func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientGetResponse, error) { - result := VirtualHubIPConfigurationClientGetResponse{RawResponse: resp} + result := VirtualHubIPConfigurationClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.HubIPConfiguration); err != nil { return VirtualHubIPConfigurationClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *VirtualHubIPConfigurationClient) getHandleResponse(resp *http.Resp // virtualHubName - The name of the VirtualHub. // options - VirtualHubIPConfigurationClientListOptions contains the optional parameters for the VirtualHubIPConfigurationClient.List // method. -func (client *VirtualHubIPConfigurationClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) *VirtualHubIPConfigurationClientListPager { - return &VirtualHubIPConfigurationClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *VirtualHubIPConfigurationClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubIPConfigurationClientListOptions) *runtime.Pager[VirtualHubIPConfigurationClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualHubIPConfigurationClientListResponse]{ + More: func(page VirtualHubIPConfigurationClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualHubIPConfigurationClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualHubIPConfigurationResults.NextLink) + Fetcher: func(ctx context.Context, page *VirtualHubIPConfigurationClientListResponse) (VirtualHubIPConfigurationClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualHubIPConfigurationClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualHubIPConfigurationClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualHubIPConfigurationClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *VirtualHubIPConfigurationClient) listCreateRequest(ctx context.Con // listHandleResponse handles the List response. func (client *VirtualHubIPConfigurationClient) listHandleResponse(resp *http.Response) (VirtualHubIPConfigurationClientListResponse, error) { - result := VirtualHubIPConfigurationClientListResponse{RawResponse: resp} + result := VirtualHubIPConfigurationClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubIPConfigurationResults); err != nil { return VirtualHubIPConfigurationClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go index abf38949d120..3f02931b8eb6 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubroutetablev2s_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualHubRouteTableV2SClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualHubRouteTableV2SClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubRouteTableV2SClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualHubRouteTableV2SClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. @@ -58,22 +63,18 @@ func NewVirtualHubRouteTableV2SClient(subscriptionID string, credential azcore.T // virtualHubRouteTableV2Parameters - Parameters supplied to create or update VirtualHubRouteTableV2. // options - VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginCreateOrUpdate // method. -func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) - if err != nil { - return VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubRouteTableV2SClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualHubRouteTableV2SClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualHubRouteTableV2SClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualHubRouteTableV2SClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, virtualHubRouteTableV2Parameters VirtualHubRouteTableV2, options *VirtualHubRouteTableV2SClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualHubRouteTableV2SClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, routeTableName, virtualHubRouteTableV2Parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubRouteTableV2SClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing VirtualHubRouteTableV2. @@ -130,22 +131,18 @@ func (client *VirtualHubRouteTableV2SClient) createOrUpdateCreateRequest(ctx con // routeTableName - The name of the VirtualHubRouteTableV2. // options - VirtualHubRouteTableV2SClientBeginDeleteOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.BeginDelete // method. -func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (VirtualHubRouteTableV2SClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) - if err != nil { - return VirtualHubRouteTableV2SClientDeletePollerResponse{}, err - } - result := VirtualHubRouteTableV2SClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubRouteTableV2SClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualHubRouteTableV2SClientDeletePollerResponse{}, err - } - result.Poller = &VirtualHubRouteTableV2SClientDeletePoller{ - pt: pt, +func (client *VirtualHubRouteTableV2SClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, routeTableName string, options *VirtualHubRouteTableV2SClientBeginDeleteOptions) (*armruntime.Poller[VirtualHubRouteTableV2SClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, routeTableName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubRouteTableV2SClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubRouteTableV2SClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a VirtualHubRouteTableV2. @@ -249,7 +246,7 @@ func (client *VirtualHubRouteTableV2SClient) getCreateRequest(ctx context.Contex // getHandleResponse handles the Get response. func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientGetResponse, error) { - result := VirtualHubRouteTableV2SClientGetResponse{RawResponse: resp} + result := VirtualHubRouteTableV2SClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHubRouteTableV2); err != nil { return VirtualHubRouteTableV2SClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *VirtualHubRouteTableV2SClient) getHandleResponse(resp *http.Respon // virtualHubName - The name of the VirtualHub. // options - VirtualHubRouteTableV2SClientListOptions contains the optional parameters for the VirtualHubRouteTableV2SClient.List // method. -func (client *VirtualHubRouteTableV2SClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) *VirtualHubRouteTableV2SClientListPager { - return &VirtualHubRouteTableV2SClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) +func (client *VirtualHubRouteTableV2SClient) List(resourceGroupName string, virtualHubName string, options *VirtualHubRouteTableV2SClientListOptions) *runtime.Pager[VirtualHubRouteTableV2SClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualHubRouteTableV2SClientListResponse]{ + More: func(page VirtualHubRouteTableV2SClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualHubRouteTableV2SClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualHubRouteTableV2SResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualHubRouteTableV2SClientListResponse) (VirtualHubRouteTableV2SClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualHubName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualHubRouteTableV2SClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualHubRouteTableV2SClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualHubRouteTableV2SClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *VirtualHubRouteTableV2SClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *VirtualHubRouteTableV2SClient) listHandleResponse(resp *http.Response) (VirtualHubRouteTableV2SClientListResponse, error) { - result := VirtualHubRouteTableV2SClientListResponse{RawResponse: resp} + result := VirtualHubRouteTableV2SClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubRouteTableV2SResult); err != nil { return VirtualHubRouteTableV2SClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go index ca21f89e321a..e14725aa62d8 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualhubs_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualHubsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualHubsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualHubsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualHubsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. @@ -57,22 +62,18 @@ func NewVirtualHubsClient(subscriptionID string, credential azcore.TokenCredenti // virtualHubParameters - Parameters supplied to create or update VirtualHub. // options - VirtualHubsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualHubsClient.BeginCreateOrUpdate // method. -func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (VirtualHubsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) - if err != nil { - return VirtualHubsClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualHubsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualHubsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualHubsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualHubsClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualHubsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub, options *VirtualHubsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualHubsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualHubName, virtualHubParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. @@ -123,22 +124,18 @@ func (client *VirtualHubsClient) createOrUpdateCreateRequest(ctx context.Context // resourceGroupName - The resource group name of the VirtualHub. // virtualHubName - The name of the VirtualHub. // options - VirtualHubsClientBeginDeleteOptions contains the optional parameters for the VirtualHubsClient.BeginDelete method. -func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (VirtualHubsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return VirtualHubsClientDeletePollerResponse{}, err - } - result := VirtualHubsClientDeletePollerResponse{ - RawResponse: resp, +func (client *VirtualHubsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginDeleteOptions) (*armruntime.Poller[VirtualHubsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualHubsClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualHubsClientDeletePollerResponse{}, err - } - result.Poller = &VirtualHubsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a VirtualHub. @@ -232,7 +229,7 @@ func (client *VirtualHubsClient) getCreateRequest(ctx context.Context, resourceG // getHandleResponse handles the Get response. func (client *VirtualHubsClient) getHandleResponse(resp *http.Response) (VirtualHubsClientGetResponse, error) { - result := VirtualHubsClientGetResponse{RawResponse: resp} + result := VirtualHubsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { return VirtualHubsClientGetResponse{}, err } @@ -246,22 +243,18 @@ func (client *VirtualHubsClient) getHandleResponse(resp *http.Response) (Virtual // virtualHubName - The name of the VirtualHub. // options - VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions contains the optional parameters for the VirtualHubsClient.BeginGetEffectiveVirtualHubRoutes // method. -func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse, error) { - resp, err := client.getEffectiveVirtualHubRoutes(ctx, resourceGroupName, virtualHubName, options) - if err != nil { - return VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse{}, err - } - result := VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse{ - RawResponse: resp, +func (client *VirtualHubsClient) BeginGetEffectiveVirtualHubRoutes(ctx context.Context, resourceGroupName string, virtualHubName string, options *VirtualHubsClientBeginGetEffectiveVirtualHubRoutesOptions) (*armruntime.Poller[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getEffectiveVirtualHubRoutes(ctx, resourceGroupName, virtualHubName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualHubsClientGetEffectiveVirtualHubRoutesResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualHubsClient.GetEffectiveVirtualHubRoutes", "location", resp, client.pl) - if err != nil { - return VirtualHubsClientGetEffectiveVirtualHubRoutesPollerResponse{}, err - } - result.Poller = &VirtualHubsClientGetEffectiveVirtualHubRoutesPoller{ - pt: pt, - } - return result, nil } // GetEffectiveVirtualHubRoutes - Gets the effective routes configured for the Virtual Hub resource or the specified resource @@ -314,16 +307,32 @@ func (client *VirtualHubsClient) getEffectiveVirtualHubRoutesCreateRequest(ctx c // List - Lists all the VirtualHubs in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualHubsClientListOptions contains the optional parameters for the VirtualHubsClient.List method. -func (client *VirtualHubsClient) List(options *VirtualHubsClientListOptions) *VirtualHubsClientListPager { - return &VirtualHubsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VirtualHubsClient) List(options *VirtualHubsClientListOptions) *runtime.Pager[VirtualHubsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualHubsClientListResponse]{ + More: func(page VirtualHubsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualHubsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualHubsResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualHubsClientListResponse) (VirtualHubsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualHubsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualHubsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualHubsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -346,7 +355,7 @@ func (client *VirtualHubsClient) listCreateRequest(ctx context.Context, options // listHandleResponse handles the List response. func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (VirtualHubsClientListResponse, error) { - result := VirtualHubsClientListResponse{RawResponse: resp} + result := VirtualHubsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { return VirtualHubsClientListResponse{}, err } @@ -358,16 +367,32 @@ func (client *VirtualHubsClient) listHandleResponse(resp *http.Response) (Virtua // resourceGroupName - The resource group name of the VirtualHub. // options - VirtualHubsClientListByResourceGroupOptions contains the optional parameters for the VirtualHubsClient.ListByResourceGroup // method. -func (client *VirtualHubsClient) ListByResourceGroup(resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) *VirtualHubsClientListByResourceGroupPager { - return &VirtualHubsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualHubsClient) ListByResourceGroup(resourceGroupName string, options *VirtualHubsClientListByResourceGroupOptions) *runtime.Pager[VirtualHubsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualHubsClientListByResourceGroupResponse]{ + More: func(page VirtualHubsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualHubsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualHubsResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualHubsClientListByResourceGroupResponse) (VirtualHubsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualHubsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualHubsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualHubsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -394,7 +419,7 @@ func (client *VirtualHubsClient) listByResourceGroupCreateRequest(ctx context.Co // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VirtualHubsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualHubsClientListByResourceGroupResponse, error) { - result := VirtualHubsClientListByResourceGroupResponse{RawResponse: resp} + result := VirtualHubsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualHubsResult); err != nil { return VirtualHubsClientListByResourceGroupResponse{}, err } @@ -450,7 +475,7 @@ func (client *VirtualHubsClient) updateTagsCreateRequest(ctx context.Context, re // updateTagsHandleResponse handles the UpdateTags response. func (client *VirtualHubsClient) updateTagsHandleResponse(resp *http.Response) (VirtualHubsClientUpdateTagsResponse, error) { - result := VirtualHubsClientUpdateTagsResponse{RawResponse: resp} + result := VirtualHubsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualHub); err != nil { return VirtualHubsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go index 9d6c1496b350..a14933302eaf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewayconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworkGatewayConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworkGatewayConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworkGatewayConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. @@ -57,22 +62,18 @@ func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string, credential // parameters - Parameters supplied to the create or update virtual network gateway connection operation. // options - VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualNetworkGatewayConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, options *VirtualNetworkGatewayConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a virtual network gateway connection in the specified resource group. @@ -124,22 +125,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) createOrUpdateCreateReques // virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. // options - VirtualNetworkGatewayConnectionsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginDelete // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (VirtualNetworkGatewayConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientDeletePollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewayConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified virtual network Gateway connection. @@ -234,7 +231,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getCreateRequest(ctx conte // getHandleResponse handles the Get response. func (client *VirtualNetworkGatewayConnectionsClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetResponse, error) { - result := VirtualNetworkGatewayConnectionsClientGetResponse{RawResponse: resp} + result := VirtualNetworkGatewayConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnection); err != nil { return VirtualNetworkGatewayConnectionsClientGetResponse{}, err } @@ -247,22 +244,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) getHandleResponse(resp *ht // virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. // options - VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginGetIkeSas // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse, error) { - resp, err := client.getIkeSas(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse{}, err - } - result := VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.GetIkeSas", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientGetIkeSasPollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginGetIkeSasOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getIkeSas(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientGetIkeSasResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewayConnectionsClientGetIkeSasPoller{ - pt: pt, - } - return result, nil } // GetIkeSas - Lists IKE Security Associations for the virtual network gateway connection in the specified resource group. @@ -358,7 +351,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyCreateRequest( // getSharedKeyHandleResponse handles the GetSharedKey response. func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse, error) { - result := VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{RawResponse: resp} + result := VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ConnectionSharedKey); err != nil { return VirtualNetworkGatewayConnectionsClientGetSharedKeyResponse{}, err } @@ -370,16 +363,32 @@ func (client *VirtualNetworkGatewayConnectionsClient) getSharedKeyHandleResponse // resourceGroupName - The name of the resource group. // options - VirtualNetworkGatewayConnectionsClientListOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.List // method. -func (client *VirtualNetworkGatewayConnectionsClient) List(resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) *VirtualNetworkGatewayConnectionsClientListPager { - return &VirtualNetworkGatewayConnectionsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualNetworkGatewayConnectionsClient) List(resourceGroupName string, options *VirtualNetworkGatewayConnectionsClientListOptions) *runtime.Pager[VirtualNetworkGatewayConnectionsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkGatewayConnectionsClientListResponse]{ + More: func(page VirtualNetworkGatewayConnectionsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkGatewayConnectionsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkGatewayConnectionListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayConnectionsClientListResponse) (VirtualNetworkGatewayConnectionsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkGatewayConnectionsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkGatewayConnectionsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkGatewayConnectionsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -406,7 +415,7 @@ func (client *VirtualNetworkGatewayConnectionsClient) listCreateRequest(ctx cont // listHandleResponse handles the List response. func (client *VirtualNetworkGatewayConnectionsClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewayConnectionsClientListResponse, error) { - result := VirtualNetworkGatewayConnectionsClientListResponse{RawResponse: resp} + result := VirtualNetworkGatewayConnectionsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayConnectionListResult); err != nil { return VirtualNetworkGatewayConnectionsClientListResponse{}, err } @@ -419,22 +428,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) listHandleResponse(resp *h // virtualNetworkGatewayConnectionName - The name of the virtual network gateway Connection. // options - VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetConnection // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse, error) { - resp, err := client.resetConnection(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse{}, err - } - result := VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.ResetConnection", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetConnectionPollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginResetConnectionOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientResetConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetConnection(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetConnectionResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetConnectionResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewayConnectionsClientResetConnectionPoller{ - pt: pt, - } - return result, nil } // ResetConnection - Resets the virtual network gateway connection specified. @@ -490,22 +495,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetConnectionCreateReque // resource provider. // options - VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginResetSharedKey // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse, error) { - resp, err := client.resetSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginResetSharedKeyOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientResetSharedKeyResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.ResetSharedKey", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientResetSharedKeyPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientResetSharedKeyPoller{ - pt: pt, - } - return result, nil } // ResetSharedKey - The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway connection @@ -563,22 +564,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) resetSharedKeyCreateReques // resource provider. // options - VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginSetSharedKey // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse, error) { - resp, err := client.setSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginSetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, options *VirtualNetworkGatewayConnectionsClientBeginSetSharedKeyOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setSharedKey(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientSetSharedKeyResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.SetSharedKey", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientSetSharedKeyPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientSetSharedKeyPoller{ - pt: pt, - } - return result, nil } // SetSharedKey - The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared @@ -632,22 +629,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) setSharedKeyCreateRequest( // virtualNetworkGatewayConnectionName - The name of the virtual network gateway connection. // options - VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the // VirtualNetworkGatewayConnectionsClient.BeginStartPacketCapture method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse, error) { - resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse{}, err - } - result := VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.StartPacketCapture", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStartPacketCapturePollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, options *VirtualNetworkGatewayConnectionsClientBeginStartPacketCaptureOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewayConnectionsClientStartPacketCapturePoller{ - pt: pt, - } - return result, nil } // StartPacketCapture - Starts packet capture on virtual network gateway connection in the specified resource group. @@ -703,22 +696,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) startPacketCaptureCreateRe // parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway connection. // options - VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the // VirtualNetworkGatewayConnectionsClient.BeginStopPacketCapture method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse, error) { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse{}, err - } - result := VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.StopPacketCapture", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientStopPacketCapturePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientStopPacketCapturePoller{ - pt: pt, +func (client *VirtualNetworkGatewayConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewayConnectionsClientBeginStopPacketCaptureOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // StopPacketCapture - Stops packet capture on virtual network gateway connection in the specified resource group. @@ -771,22 +760,18 @@ func (client *VirtualNetworkGatewayConnectionsClient) stopPacketCaptureCreateReq // parameters - Parameters supplied to update virtual network gateway connection tags. // options - VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewayConnectionsClient.BeginUpdateTags // method. -func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) - if err != nil { - return VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse{}, err +func (client *VirtualNetworkGatewayConnectionsClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject, options *VirtualNetworkGatewayConnectionsClientBeginUpdateTagsOptions) (*armruntime.Poller[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayConnectionsClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayConnectionsClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayConnectionsClientUpdateTagsPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayConnectionsClientUpdateTagsPoller{ - pt: pt, - } - return result, nil } // UpdateTags - Updates a virtual network gateway connection tags. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go index aa064fe33a7a..f0021d75f2bf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgatewaynatrules_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworkGatewayNatRulesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworkGatewayNatRulesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewayNatRulesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworkGatewayNatRulesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing @@ -59,22 +64,18 @@ func NewVirtualNetworkGatewayNatRulesClient(subscriptionID string, credential az // natRuleParameters - Parameters supplied to create or Update a Nat Rule. // options - VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) - if err != nil { - return VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayNatRulesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayNatRulesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayNatRulesClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualNetworkGatewayNatRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, natRuleParameters VirtualNetworkGatewayNatRule, options *VirtualNetworkGatewayNatRulesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, natRuleParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing @@ -132,22 +133,18 @@ func (client *VirtualNetworkGatewayNatRulesClient) createOrUpdateCreateRequest(c // natRuleName - The name of the nat rule. // options - VirtualNetworkGatewayNatRulesClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewayNatRulesClient.BeginDelete // method. -func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (VirtualNetworkGatewayNatRulesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) - if err != nil { - return VirtualNetworkGatewayNatRulesClientDeletePollerResponse{}, err - } - result := VirtualNetworkGatewayNatRulesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewayNatRulesClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewayNatRulesClientDeletePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewayNatRulesClientDeletePoller{ - pt: pt, +func (client *VirtualNetworkGatewayNatRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, natRuleName string, options *VirtualNetworkGatewayNatRulesClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkGatewayNatRulesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, natRuleName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewayNatRulesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewayNatRulesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a nat rule. @@ -251,7 +248,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) getCreateRequest(ctx context. // getHandleResponse handles the Get response. func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientGetResponse, error) { - result := VirtualNetworkGatewayNatRulesClientGetResponse{RawResponse: resp} + result := VirtualNetworkGatewayNatRulesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayNatRule); err != nil { return VirtualNetworkGatewayNatRulesClientGetResponse{}, err } @@ -264,16 +261,32 @@ func (client *VirtualNetworkGatewayNatRulesClient) getHandleResponse(resp *http. // virtualNetworkGatewayName - The name of the gateway. // options - VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions contains the optional parameters for the // VirtualNetworkGatewayNatRulesClient.ListByVirtualNetworkGateway method. -func (client *VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGateway(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager { - return &VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) +func (client *VirtualNetworkGatewayNatRulesClient) ListByVirtualNetworkGateway(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayOptions) *runtime.Pager[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse]{ + More: func(page VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualNetworkGatewayNatRulesResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByVirtualNetworkGatewayCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, runtime.NewResponseError(resp) + } + return client.listByVirtualNetworkGatewayHandleResponse(resp) }, - } + }) } // listByVirtualNetworkGatewayCreateRequest creates the ListByVirtualNetworkGateway request. @@ -304,7 +317,7 @@ func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayCr // listByVirtualNetworkGatewayHandleResponse handles the ListByVirtualNetworkGateway response. func (client *VirtualNetworkGatewayNatRulesClient) listByVirtualNetworkGatewayHandleResponse(resp *http.Response) (VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse, error) { - result := VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{RawResponse: resp} + result := VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualNetworkGatewayNatRulesResult); err != nil { return VirtualNetworkGatewayNatRulesClientListByVirtualNetworkGatewayResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go index 38d18e9d4e21..0b2cbe1570a1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkgateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworkGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworkGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworkGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. @@ -57,22 +62,18 @@ func NewVirtualNetworkGatewaysClient(subscriptionID string, credential azcore.To // parameters - Parameters supplied to create or update virtual network gateway operation. // options - VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientCreateOrUpdatePollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, options *VirtualNetworkGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a virtual network gateway in the specified resource group. @@ -124,22 +125,18 @@ func (client *VirtualNetworkGatewaysClient) createOrUpdateCreateRequest(ctx cont // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginDelete // method. -func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (VirtualNetworkGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientDeletePollerResponse{}, err - } - result := VirtualNetworkGatewaysClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientDeletePoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified virtual network gateway. @@ -193,22 +190,18 @@ func (client *VirtualNetworkGatewaysClient) deleteCreateRequest(ctx context.Cont // request - The parameters are supplied to disconnect vpn connections. // options - VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions contains the optional parameters // for the VirtualNetworkGatewaysClient.BeginDisconnectVirtualNetworkGatewayVPNConnections method. -func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse, error) { - resp, err := client.disconnectVirtualNetworkGatewayVPNConnections(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) - if err != nil { - return VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginDisconnectVirtualNetworkGatewayVPNConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, request P2SVPNConnectionRequest, options *VirtualNetworkGatewaysClientBeginDisconnectVirtualNetworkGatewayVPNConnectionsOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.disconnectVirtualNetworkGatewayVPNConnections(ctx, resourceGroupName, virtualNetworkGatewayName, request, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.DisconnectVirtualNetworkGatewayVPNConnections", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientDisconnectVirtualNetworkGatewayVPNConnectionsPoller{ - pt: pt, - } - return result, nil } // DisconnectVirtualNetworkGatewayVPNConnections - Disconnect vpn connections of virtual network gateway in the specified @@ -263,22 +256,18 @@ func (client *VirtualNetworkGatewaysClient) disconnectVirtualNetworkGatewayVPNCo // parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. // options - VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGenerateVPNProfile // method. -func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse, error) { - resp, err := client.generateVPNProfile(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GenerateVPNProfile", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGenerateVPNProfilePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGenerateVPNProfilePoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginGenerateVPNProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGenerateVPNProfileOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGenerateVPNProfileResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generateVPNProfile(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGenerateVPNProfileResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGenerateVPNProfileResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GenerateVPNProfile - Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. @@ -333,22 +322,18 @@ func (client *VirtualNetworkGatewaysClient) generateVPNProfileCreateRequest(ctx // parameters - Parameters supplied to the generate virtual network gateway VPN client package operation. // options - VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGeneratevpnclientpackage // method. -func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse, error) { - resp, err := client.generatevpnclientpackage(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.Generatevpnclientpackage", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGeneratevpnclientpackagePollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginGeneratevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNClientParameters, options *VirtualNetworkGatewaysClientBeginGeneratevpnclientpackageOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.generatevpnclientpackage(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGeneratevpnclientpackageResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewaysClientGeneratevpnclientpackagePoller{ - pt: pt, - } - return result, nil } // Generatevpnclientpackage - Generates VPN client package for P2S client of the virtual network gateway in the specified @@ -444,7 +429,7 @@ func (client *VirtualNetworkGatewaysClient) getCreateRequest(ctx context.Context // getHandleResponse handles the Get response. func (client *VirtualNetworkGatewaysClient) getHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientGetResponse, error) { - result := VirtualNetworkGatewaysClientGetResponse{RawResponse: resp} + result := VirtualNetworkGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGateway); err != nil { return VirtualNetworkGatewaysClientGetResponse{}, err } @@ -459,22 +444,18 @@ func (client *VirtualNetworkGatewaysClient) getHandleResponse(resp *http.Respons // peer - The IP address of the peer. // options - VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetAdvertisedRoutes // method. -func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse, error) { - resp, err := client.getAdvertisedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) - if err != nil { - return VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginGetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string, options *VirtualNetworkGatewaysClientBeginGetAdvertisedRoutesOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getAdvertisedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, peer, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetAdvertisedRoutesResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetAdvertisedRoutes", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetAdvertisedRoutesPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGetAdvertisedRoutesPoller{ - pt: pt, - } - return result, nil } // GetAdvertisedRoutes - This operation retrieves a list of routes the virtual network gateway is advertising to the specified @@ -528,22 +509,18 @@ func (client *VirtualNetworkGatewaysClient) getAdvertisedRoutesCreateRequest(ctx // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetBgpPeerStatus // method. -func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse, error) { - resp, err := client.getBgpPeerStatus(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse{ - RawResponse: resp, +func (client *VirtualNetworkGatewaysClient) BeginGetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetBgpPeerStatusOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getBgpPeerStatus(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetBgpPeerStatusResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetBgpPeerStatus", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetBgpPeerStatusPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGetBgpPeerStatusPoller{ - pt: pt, - } - return result, nil } // GetBgpPeerStatus - The GetBgpPeerStatus operation retrieves the status of all BGP peers. @@ -599,22 +576,18 @@ func (client *VirtualNetworkGatewaysClient) getBgpPeerStatusCreateRequest(ctx co // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetLearnedRoutes // method. -func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse, error) { - resp, err := client.getLearnedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse{ - RawResponse: resp, +func (client *VirtualNetworkGatewaysClient) BeginGetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetLearnedRoutesOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetLearnedRoutesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getLearnedRoutes(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetLearnedRoutesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetLearnedRoutesResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetLearnedRoutes", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetLearnedRoutesPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGetLearnedRoutesPoller{ - pt: pt, - } - return result, nil } // GetLearnedRoutes - This operation retrieves a list of routes the virtual network gateway has learned, including routes @@ -668,22 +641,18 @@ func (client *VirtualNetworkGatewaysClient) getLearnedRoutesCreateRequest(ctx co // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginGetVPNProfilePackageURL // method. -func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse, error) { - resp, err := client.getVPNProfilePackageURL(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse{ - RawResponse: resp, +func (client *VirtualNetworkGatewaysClient) BeginGetVPNProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVPNProfilePackageURLOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVPNProfilePackageURL(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVPNProfilePackageURLResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetVPNProfilePackageURL", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetVPNProfilePackageURLPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGetVPNProfilePackageURLPoller{ - pt: pt, - } - return result, nil } // GetVPNProfilePackageURL - Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified @@ -737,22 +706,18 @@ func (client *VirtualNetworkGatewaysClient) getVPNProfilePackageURLCreateRequest // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions contains the optional parameters for the // VirtualNetworkGatewaysClient.BeginGetVpnclientConnectionHealth method. -func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse, error) { - resp, err := client.getVpnclientConnectionHealth(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetVpnclientConnectionHealth", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientConnectionHealth(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientConnectionHealthOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVpnclientConnectionHealth(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientConnectionHealthResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewaysClientGetVpnclientConnectionHealthPoller{ - pt: pt, - } - return result, nil } // GetVpnclientConnectionHealth - Get VPN client connection health detail per P2S client connection of the virtual network @@ -807,22 +772,18 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientConnectionHealthCreateRe // virtualNetworkGatewayName - The virtual network gateway name. // options - VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions contains the optional parameters for the // VirtualNetworkGatewaysClient.BeginGetVpnclientIPSecParameters method. -func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse, error) { - resp, err := client.getVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.GetVpnclientIPSecParameters", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientGetVpnclientIPSecParametersPoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginGetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginGetVpnclientIPSecParametersOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientGetVpnclientIPSecParametersResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GetVpnclientIPSecParameters - The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec @@ -875,16 +836,32 @@ func (client *VirtualNetworkGatewaysClient) getVpnclientIPSecParametersCreateReq // resourceGroupName - The name of the resource group. // options - VirtualNetworkGatewaysClientListOptions contains the optional parameters for the VirtualNetworkGatewaysClient.List // method. -func (client *VirtualNetworkGatewaysClient) List(resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) *VirtualNetworkGatewaysClientListPager { - return &VirtualNetworkGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualNetworkGatewaysClient) List(resourceGroupName string, options *VirtualNetworkGatewaysClientListOptions) *runtime.Pager[VirtualNetworkGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkGatewaysClientListResponse]{ + More: func(page VirtualNetworkGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkGatewayListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListResponse) (VirtualNetworkGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -911,7 +888,7 @@ func (client *VirtualNetworkGatewaysClient) listCreateRequest(ctx context.Contex // listHandleResponse handles the List response. func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListResponse, error) { - result := VirtualNetworkGatewaysClientListResponse{RawResponse: resp} + result := VirtualNetworkGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListResult); err != nil { return VirtualNetworkGatewaysClientListResponse{}, err } @@ -924,16 +901,32 @@ func (client *VirtualNetworkGatewaysClient) listHandleResponse(resp *http.Respon // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientListConnectionsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.ListConnections // method. -func (client *VirtualNetworkGatewaysClient) ListConnections(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) *VirtualNetworkGatewaysClientListConnectionsPager { - return &VirtualNetworkGatewaysClientListConnectionsPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) +func (client *VirtualNetworkGatewaysClient) ListConnections(resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientListConnectionsOptions) *runtime.Pager[VirtualNetworkGatewaysClientListConnectionsResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkGatewaysClientListConnectionsResponse]{ + More: func(page VirtualNetworkGatewaysClientListConnectionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkGatewaysClientListConnectionsResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkGatewayListConnectionsResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkGatewaysClientListConnectionsResponse) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listConnectionsCreateRequest(ctx, resourceGroupName, virtualNetworkGatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkGatewaysClientListConnectionsResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkGatewaysClientListConnectionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkGatewaysClientListConnectionsResponse{}, runtime.NewResponseError(resp) + } + return client.listConnectionsHandleResponse(resp) }, - } + }) } // listConnectionsCreateRequest creates the ListConnections request. @@ -964,7 +957,7 @@ func (client *VirtualNetworkGatewaysClient) listConnectionsCreateRequest(ctx con // listConnectionsHandleResponse handles the ListConnections response. func (client *VirtualNetworkGatewaysClient) listConnectionsHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientListConnectionsResponse, error) { - result := VirtualNetworkGatewaysClientListConnectionsResponse{RawResponse: resp} + result := VirtualNetworkGatewaysClientListConnectionsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkGatewayListConnectionsResult); err != nil { return VirtualNetworkGatewaysClientListConnectionsResponse{}, err } @@ -977,22 +970,18 @@ func (client *VirtualNetworkGatewaysClient) listConnectionsHandleResponse(resp * // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginResetOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginReset // method. -func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (VirtualNetworkGatewaysClientResetPollerResponse, error) { - resp, err := client.reset(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientResetPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientResetPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.Reset", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientResetPollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientResetResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewaysClientResetPoller{ - pt: pt, - } - return result, nil } // Reset - Resets the primary of the virtual network gateway in the specified resource group. @@ -1048,22 +1037,18 @@ func (client *VirtualNetworkGatewaysClient) resetCreateRequest(ctx context.Conte // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginResetVPNClientSharedKey // method. -func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse, error) { - resp, err := client.resetVPNClientSharedKey(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.ResetVPNClientSharedKey", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientResetVPNClientSharedKeyPollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginResetVPNClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginResetVPNClientSharedKeyOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetVPNClientSharedKey(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientResetVPNClientSharedKeyResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkGatewaysClientResetVPNClientSharedKeyPoller{ - pt: pt, - } - return result, nil } // ResetVPNClientSharedKey - Resets the VPN client shared key of the virtual network gateway in the specified resource group. @@ -1118,22 +1103,18 @@ func (client *VirtualNetworkGatewaysClient) resetVPNClientSharedKeyCreateRequest // operation through Network resource provider. // options - VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions contains the optional parameters for the // VirtualNetworkGatewaysClient.BeginSetVpnclientIPSecParameters method. -func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse, error) { - resp, err := client.setVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) - if err != nil { - return VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.SetVpnclientIPSecParameters", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientSetVpnclientIPSecParametersPoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginSetVpnclientIPSecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIPSecParams VPNClientIPsecParameters, options *VirtualNetworkGatewaysClientBeginSetVpnclientIPSecParametersOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setVpnclientIPSecParameters(ctx, resourceGroupName, virtualNetworkGatewayName, vpnclientIPSecParams, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientSetVpnclientIPSecParametersResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // SetVpnclientIPSecParameters - The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client @@ -1186,22 +1167,18 @@ func (client *VirtualNetworkGatewaysClient) setVpnclientIPSecParametersCreateReq // virtualNetworkGatewayName - The name of the virtual network gateway. // options - VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStartPacketCapture // method. -func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (VirtualNetworkGatewaysClientStartPacketCapturePollerResponse, error) { - resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, options) - if err != nil { - return VirtualNetworkGatewaysClientStartPacketCapturePollerResponse{}, err - } - result := VirtualNetworkGatewaysClientStartPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.StartPacketCapture", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientStartPacketCapturePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientStartPacketCapturePoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, options *VirtualNetworkGatewaysClientBeginStartPacketCaptureOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientStartPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // StartPacketCapture - Starts packet capture on virtual network gateway in the specified resource group. @@ -1257,22 +1234,18 @@ func (client *VirtualNetworkGatewaysClient) startPacketCaptureCreateRequest(ctx // parameters - Virtual network gateway packet capture parameters supplied to stop packet capture on gateway. // options - VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginStopPacketCapture // method. -func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (VirtualNetworkGatewaysClientStopPacketCapturePollerResponse, error) { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientStopPacketCapturePollerResponse{}, err +func (client *VirtualNetworkGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VPNPacketCaptureStopParameters, options *VirtualNetworkGatewaysClientBeginStopPacketCaptureOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientStopPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - result := VirtualNetworkGatewaysClientStopPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.StopPacketCapture", "location", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientStopPacketCapturePollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientStopPacketCapturePoller{ - pt: pt, - } - return result, nil } // StopPacketCapture - Stops packet capture on virtual network gateway in the specified resource group. @@ -1367,7 +1340,7 @@ func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesCreateRequest(ctx // supportedVPNDevicesHandleResponse handles the SupportedVPNDevices response. func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientSupportedVPNDevicesResponse, error) { - result := VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{RawResponse: resp} + result := VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { return VirtualNetworkGatewaysClientSupportedVPNDevicesResponse{}, err } @@ -1381,22 +1354,18 @@ func (client *VirtualNetworkGatewaysClient) supportedVPNDevicesHandleResponse(re // parameters - Parameters supplied to update virtual network gateway tags. // options - VirtualNetworkGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VirtualNetworkGatewaysClient.BeginUpdateTags // method. -func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (VirtualNetworkGatewaysClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) - if err != nil { - return VirtualNetworkGatewaysClientUpdateTagsPollerResponse{}, err - } - result := VirtualNetworkGatewaysClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkGatewaysClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkGatewaysClientUpdateTagsPollerResponse{}, err - } - result.Poller = &VirtualNetworkGatewaysClientUpdateTagsPoller{ - pt: pt, +func (client *VirtualNetworkGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject, options *VirtualNetworkGatewaysClientBeginUpdateTagsOptions) (*armruntime.Poller[VirtualNetworkGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, virtualNetworkGatewayName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkGatewaysClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // UpdateTags - Updates a virtual network gateway tags. @@ -1493,7 +1462,7 @@ func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptCreateRe // vpnDeviceConfigurationScriptHandleResponse handles the VPNDeviceConfigurationScript response. func (client *VirtualNetworkGatewaysClient) vpnDeviceConfigurationScriptHandleResponse(resp *http.Response) (VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse, error) { - result := VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{RawResponse: resp} + result := VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Value); err != nil { return VirtualNetworkGatewaysClientVPNDeviceConfigurationScriptResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go index 9087173441b2..2bded6c18dbf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworkpeerings_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworkPeeringsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworkPeeringsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkPeeringsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworkPeeringsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a peering in the specified virtual network. @@ -58,22 +63,18 @@ func NewVirtualNetworkPeeringsClient(subscriptionID string, credential azcore.To // virtualNetworkPeeringParameters - Parameters supplied to the create or update virtual network peering operation. // options - VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) - if err != nil { - return VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkPeeringsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualNetworkPeeringsClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualNetworkPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, options *VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates a peering in the specified virtual network. @@ -133,22 +134,18 @@ func (client *VirtualNetworkPeeringsClient) createOrUpdateCreateRequest(ctx cont // virtualNetworkPeeringName - The name of the virtual network peering. // options - VirtualNetworkPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkPeeringsClient.BeginDelete // method. -func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (VirtualNetworkPeeringsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) - if err != nil { - return VirtualNetworkPeeringsClientDeletePollerResponse{}, err - } - result := VirtualNetworkPeeringsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkPeeringsClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworkPeeringsClientDeletePollerResponse{}, err - } - result.Poller = &VirtualNetworkPeeringsClientDeletePoller{ - pt: pt, +func (client *VirtualNetworkPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, options *VirtualNetworkPeeringsClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkPeeringsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified virtual network peering. @@ -252,7 +249,7 @@ func (client *VirtualNetworkPeeringsClient) getCreateRequest(ctx context.Context // getHandleResponse handles the Get response. func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientGetResponse, error) { - result := VirtualNetworkPeeringsClientGetResponse{RawResponse: resp} + result := VirtualNetworkPeeringsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeering); err != nil { return VirtualNetworkPeeringsClientGetResponse{}, err } @@ -265,16 +262,32 @@ func (client *VirtualNetworkPeeringsClient) getHandleResponse(resp *http.Respons // virtualNetworkName - The name of the virtual network. // options - VirtualNetworkPeeringsClientListOptions contains the optional parameters for the VirtualNetworkPeeringsClient.List // method. -func (client *VirtualNetworkPeeringsClient) List(resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) *VirtualNetworkPeeringsClientListPager { - return &VirtualNetworkPeeringsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) +func (client *VirtualNetworkPeeringsClient) List(resourceGroupName string, virtualNetworkName string, options *VirtualNetworkPeeringsClientListOptions) *runtime.Pager[VirtualNetworkPeeringsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkPeeringsClientListResponse]{ + More: func(page VirtualNetworkPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkPeeringsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkPeeringListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkPeeringsClientListResponse) (VirtualNetworkPeeringsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkPeeringsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkPeeringsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkPeeringsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -305,7 +318,7 @@ func (client *VirtualNetworkPeeringsClient) listCreateRequest(ctx context.Contex // listHandleResponse handles the List response. func (client *VirtualNetworkPeeringsClient) listHandleResponse(resp *http.Response) (VirtualNetworkPeeringsClientListResponse, error) { - result := VirtualNetworkPeeringsClientListResponse{RawResponse: resp} + result := VirtualNetworkPeeringsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkPeeringListResult); err != nil { return VirtualNetworkPeeringsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go index 0d0825388eb3..fef4d87a3570 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworks_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworksClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworksClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworksClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // CheckIPAddressAvailability - Checks whether a private IP address is available for use. @@ -101,7 +106,7 @@ func (client *VirtualNetworksClient) checkIPAddressAvailabilityCreateRequest(ctx // checkIPAddressAvailabilityHandleResponse handles the CheckIPAddressAvailability response. func (client *VirtualNetworksClient) checkIPAddressAvailabilityHandleResponse(resp *http.Response) (VirtualNetworksClientCheckIPAddressAvailabilityResponse, error) { - result := VirtualNetworksClientCheckIPAddressAvailabilityResponse{RawResponse: resp} + result := VirtualNetworksClientCheckIPAddressAvailabilityResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.IPAddressAvailabilityResult); err != nil { return VirtualNetworksClientCheckIPAddressAvailabilityResponse{}, err } @@ -115,22 +120,18 @@ func (client *VirtualNetworksClient) checkIPAddressAvailabilityHandleResponse(re // parameters - Parameters supplied to the create or update virtual network operation. // options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (VirtualNetworksClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, parameters, options) - if err != nil { - return VirtualNetworksClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworksClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualNetworkName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworksClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworksClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualNetworksClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworksClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualNetworksClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a virtual network in the specified resource group. @@ -182,22 +183,18 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con // virtualNetworkName - The name of the virtual network. // options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete // method. -func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (VirtualNetworksClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, options) - if err != nil { - return VirtualNetworksClientDeletePollerResponse{}, err - } - result := VirtualNetworksClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworksClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworksClientDeletePollerResponse{}, err - } - result.Poller = &VirtualNetworksClientDeletePoller{ - pt: pt, +func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworksClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualNetworkName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworksClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworksClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified virtual network. @@ -294,7 +291,7 @@ func (client *VirtualNetworksClient) getCreateRequest(ctx context.Context, resou // getHandleResponse handles the Get response. func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (VirtualNetworksClientGetResponse, error) { - result := VirtualNetworksClientGetResponse{RawResponse: resp} + result := VirtualNetworksClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { return VirtualNetworksClientGetResponse{}, err } @@ -305,16 +302,32 @@ func (client *VirtualNetworksClient) getHandleResponse(resp *http.Response) (Vir // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - VirtualNetworksClientListOptions contains the optional parameters for the VirtualNetworksClient.List method. -func (client *VirtualNetworksClient) List(resourceGroupName string, options *VirtualNetworksClientListOptions) *VirtualNetworksClientListPager { - return &VirtualNetworksClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualNetworksClient) List(resourceGroupName string, options *VirtualNetworksClientListOptions) *runtime.Pager[VirtualNetworksClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworksClientListResponse]{ + More: func(page VirtualNetworksClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworksClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListResponse) (VirtualNetworksClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworksClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworksClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworksClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -341,7 +354,7 @@ func (client *VirtualNetworksClient) listCreateRequest(ctx context.Context, reso // listHandleResponse handles the List response. func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (VirtualNetworksClientListResponse, error) { - result := VirtualNetworksClientListResponse{RawResponse: resp} + result := VirtualNetworksClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { return VirtualNetworksClientListResponse{}, err } @@ -351,16 +364,32 @@ func (client *VirtualNetworksClient) listHandleResponse(resp *http.Response) (Vi // ListAll - Gets all virtual networks in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualNetworksClientListAllOptions contains the optional parameters for the VirtualNetworksClient.ListAll method. -func (client *VirtualNetworksClient) ListAll(options *VirtualNetworksClientListAllOptions) *VirtualNetworksClientListAllPager { - return &VirtualNetworksClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *VirtualNetworksClient) ListAll(options *VirtualNetworksClientListAllOptions) *runtime.Pager[VirtualNetworksClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworksClientListAllResponse]{ + More: func(page VirtualNetworksClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworksClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListAllResponse) (VirtualNetworksClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworksClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworksClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworksClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -383,7 +412,7 @@ func (client *VirtualNetworksClient) listAllCreateRequest(ctx context.Context, o // listAllHandleResponse handles the ListAll response. func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) (VirtualNetworksClientListAllResponse, error) { - result := VirtualNetworksClientListAllResponse{RawResponse: resp} + result := VirtualNetworksClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListResult); err != nil { return VirtualNetworksClientListAllResponse{}, err } @@ -396,16 +425,32 @@ func (client *VirtualNetworksClient) listAllHandleResponse(resp *http.Response) // virtualNetworkName - The name of the virtual network. // options - VirtualNetworksClientListUsageOptions contains the optional parameters for the VirtualNetworksClient.ListUsage // method. -func (client *VirtualNetworksClient) ListUsage(resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) *VirtualNetworksClientListUsagePager { - return &VirtualNetworksClientListUsagePager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) +func (client *VirtualNetworksClient) ListUsage(resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientListUsageOptions) *runtime.Pager[VirtualNetworksClientListUsageResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworksClientListUsageResponse]{ + More: func(page VirtualNetworksClientListUsageResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworksClientListUsageResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkListUsageResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworksClientListUsageResponse) (VirtualNetworksClientListUsageResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listUsageCreateRequest(ctx, resourceGroupName, virtualNetworkName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworksClientListUsageResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworksClientListUsageResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworksClientListUsageResponse{}, runtime.NewResponseError(resp) + } + return client.listUsageHandleResponse(resp) }, - } + }) } // listUsageCreateRequest creates the ListUsage request. @@ -436,7 +481,7 @@ func (client *VirtualNetworksClient) listUsageCreateRequest(ctx context.Context, // listUsageHandleResponse handles the ListUsage response. func (client *VirtualNetworksClient) listUsageHandleResponse(resp *http.Response) (VirtualNetworksClientListUsageResponse, error) { - result := VirtualNetworksClientListUsageResponse{RawResponse: resp} + result := VirtualNetworksClientListUsageResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkListUsageResult); err != nil { return VirtualNetworksClientListUsageResponse{}, err } @@ -493,7 +538,7 @@ func (client *VirtualNetworksClient) updateTagsCreateRequest(ctx context.Context // updateTagsHandleResponse handles the UpdateTags response. func (client *VirtualNetworksClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworksClientUpdateTagsResponse, error) { - result := VirtualNetworksClientUpdateTagsResponse{RawResponse: resp} + result := VirtualNetworksClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetwork); err != nil { return VirtualNetworksClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go index ebc4abc10418..a14f78a74bbf 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualnetworktaps_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualNetworkTapsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualNetworkTapsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkTapsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualNetworkTapsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates a Virtual Network Tap. @@ -57,22 +62,18 @@ func NewVirtualNetworkTapsClient(subscriptionID string, credential azcore.TokenC // parameters - Parameters supplied to the create or update virtual network tap operation. // options - VirtualNetworkTapsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginCreateOrUpdate // method. -func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (VirtualNetworkTapsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, tapName, parameters, options) - if err != nil { - return VirtualNetworkTapsClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualNetworkTapsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VirtualNetworkTapsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap, options *VirtualNetworkTapsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualNetworkTapsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, tapName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkTapsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkTapsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualNetworkTapsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualNetworkTapsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualNetworkTapsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates a Virtual Network Tap. @@ -124,22 +125,18 @@ func (client *VirtualNetworkTapsClient) createOrUpdateCreateRequest(ctx context. // tapName - The name of the virtual network tap. // options - VirtualNetworkTapsClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkTapsClient.BeginDelete // method. -func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (VirtualNetworkTapsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, tapName, options) - if err != nil { - return VirtualNetworkTapsClientDeletePollerResponse{}, err - } - result := VirtualNetworkTapsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualNetworkTapsClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualNetworkTapsClientDeletePollerResponse{}, err +func (client *VirtualNetworkTapsClient) BeginDelete(ctx context.Context, resourceGroupName string, tapName string, options *VirtualNetworkTapsClientBeginDeleteOptions) (*armruntime.Poller[VirtualNetworkTapsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, tapName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualNetworkTapsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualNetworkTapsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualNetworkTapsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified virtual network tap. @@ -233,7 +230,7 @@ func (client *VirtualNetworkTapsClient) getCreateRequest(ctx context.Context, re // getHandleResponse handles the Get response. func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) (VirtualNetworkTapsClientGetResponse, error) { - result := VirtualNetworkTapsClientGetResponse{RawResponse: resp} + result := VirtualNetworkTapsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { return VirtualNetworkTapsClientGetResponse{}, err } @@ -244,16 +241,32 @@ func (client *VirtualNetworkTapsClient) getHandleResponse(resp *http.Response) ( // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualNetworkTapsClientListAllOptions contains the optional parameters for the VirtualNetworkTapsClient.ListAll // method. -func (client *VirtualNetworkTapsClient) ListAll(options *VirtualNetworkTapsClientListAllOptions) *VirtualNetworkTapsClientListAllPager { - return &VirtualNetworkTapsClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *VirtualNetworkTapsClient) ListAll(options *VirtualNetworkTapsClientListAllOptions) *runtime.Pager[VirtualNetworkTapsClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkTapsClientListAllResponse]{ + More: func(page VirtualNetworkTapsClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkTapsClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkTapListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListAllResponse) (VirtualNetworkTapsClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkTapsClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkTapsClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkTapsClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -276,7 +289,7 @@ func (client *VirtualNetworkTapsClient) listAllCreateRequest(ctx context.Context // listAllHandleResponse handles the ListAll response. func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListAllResponse, error) { - result := VirtualNetworkTapsClientListAllResponse{RawResponse: resp} + result := VirtualNetworkTapsClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { return VirtualNetworkTapsClientListAllResponse{}, err } @@ -288,16 +301,32 @@ func (client *VirtualNetworkTapsClient) listAllHandleResponse(resp *http.Respons // resourceGroupName - The name of the resource group. // options - VirtualNetworkTapsClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworkTapsClient.ListByResourceGroup // method. -func (client *VirtualNetworkTapsClient) ListByResourceGroup(resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) *VirtualNetworkTapsClientListByResourceGroupPager { - return &VirtualNetworkTapsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualNetworkTapsClient) ListByResourceGroup(resourceGroupName string, options *VirtualNetworkTapsClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworkTapsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualNetworkTapsClientListByResourceGroupResponse]{ + More: func(page VirtualNetworkTapsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualNetworkTapsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualNetworkTapListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualNetworkTapsClientListByResourceGroupResponse) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualNetworkTapsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualNetworkTapsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualNetworkTapsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -324,7 +353,7 @@ func (client *VirtualNetworkTapsClient) listByResourceGroupCreateRequest(ctx con // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VirtualNetworkTapsClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualNetworkTapsClientListByResourceGroupResponse, error) { - result := VirtualNetworkTapsClientListByResourceGroupResponse{RawResponse: resp} + result := VirtualNetworkTapsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTapListResult); err != nil { return VirtualNetworkTapsClientListByResourceGroupResponse{}, err } @@ -381,7 +410,7 @@ func (client *VirtualNetworkTapsClient) updateTagsCreateRequest(ctx context.Cont // updateTagsHandleResponse handles the UpdateTags response. func (client *VirtualNetworkTapsClient) updateTagsHandleResponse(resp *http.Response) (VirtualNetworkTapsClientUpdateTagsResponse, error) { - result := VirtualNetworkTapsClientUpdateTagsResponse{RawResponse: resp} + result := VirtualNetworkTapsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualNetworkTap); err != nil { return VirtualNetworkTapsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go index b586ae8662d8..f5bd99d7ccc9 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouterpeerings_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualRouterPeeringsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualRouterPeeringsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRouterPeeringsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualRouterPeeringsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Virtual Router Peering. @@ -58,22 +63,18 @@ func NewVirtualRouterPeeringsClient(subscriptionID string, credential azcore.Tok // parameters - Parameters supplied to the create or update Virtual Router Peering operation. // options - VirtualRouterPeeringsClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginCreateOrUpdate // method. -func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (VirtualRouterPeeringsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) - if err != nil { - return VirtualRouterPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualRouterPeeringsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualRouterPeeringsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualRouterPeeringsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualRouterPeeringsClientCreateOrUpdatePoller{ - pt: pt, +func (client *VirtualRouterPeeringsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, parameters VirtualRouterPeering, options *VirtualRouterPeeringsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualRouterPeeringsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, peeringName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualRouterPeeringsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualRouterPeeringsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CreateOrUpdate - Creates or updates the specified Virtual Router Peering. @@ -130,22 +131,18 @@ func (client *VirtualRouterPeeringsClient) createOrUpdateCreateRequest(ctx conte // peeringName - The name of the peering. // options - VirtualRouterPeeringsClientBeginDeleteOptions contains the optional parameters for the VirtualRouterPeeringsClient.BeginDelete // method. -func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (VirtualRouterPeeringsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, peeringName, options) - if err != nil { - return VirtualRouterPeeringsClientDeletePollerResponse{}, err - } - result := VirtualRouterPeeringsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualRouterPeeringsClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualRouterPeeringsClientDeletePollerResponse{}, err - } - result.Poller = &VirtualRouterPeeringsClientDeletePoller{ - pt: pt, +func (client *VirtualRouterPeeringsClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, peeringName string, options *VirtualRouterPeeringsClientBeginDeleteOptions) (*armruntime.Poller[VirtualRouterPeeringsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, peeringName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualRouterPeeringsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualRouterPeeringsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified peering from a Virtual Router. @@ -249,7 +246,7 @@ func (client *VirtualRouterPeeringsClient) getCreateRequest(ctx context.Context, // getHandleResponse handles the Get response. func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientGetResponse, error) { - result := VirtualRouterPeeringsClientGetResponse{RawResponse: resp} + result := VirtualRouterPeeringsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeering); err != nil { return VirtualRouterPeeringsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *VirtualRouterPeeringsClient) getHandleResponse(resp *http.Response // virtualRouterName - The name of the Virtual Router. // options - VirtualRouterPeeringsClientListOptions contains the optional parameters for the VirtualRouterPeeringsClient.List // method. -func (client *VirtualRouterPeeringsClient) List(resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) *VirtualRouterPeeringsClientListPager { - return &VirtualRouterPeeringsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) +func (client *VirtualRouterPeeringsClient) List(resourceGroupName string, virtualRouterName string, options *VirtualRouterPeeringsClientListOptions) *runtime.Pager[VirtualRouterPeeringsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualRouterPeeringsClientListResponse]{ + More: func(page VirtualRouterPeeringsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualRouterPeeringsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualRouterPeeringListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualRouterPeeringsClientListResponse) (VirtualRouterPeeringsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, virtualRouterName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualRouterPeeringsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualRouterPeeringsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualRouterPeeringsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -302,7 +315,7 @@ func (client *VirtualRouterPeeringsClient) listCreateRequest(ctx context.Context // listHandleResponse handles the List response. func (client *VirtualRouterPeeringsClient) listHandleResponse(resp *http.Response) (VirtualRouterPeeringsClientListResponse, error) { - result := VirtualRouterPeeringsClientListResponse{RawResponse: resp} + result := VirtualRouterPeeringsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterPeeringListResult); err != nil { return VirtualRouterPeeringsClientListResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go index 910c354bc6d5..a5ea3127c4bd 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualrouters_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualRoutersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualRoutersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualRoutersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualRoutersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates or updates the specified Virtual Router. @@ -57,22 +62,18 @@ func NewVirtualRoutersClient(subscriptionID string, credential azcore.TokenCrede // parameters - Parameters supplied to the create or update Virtual Router. // options - VirtualRoutersClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualRoutersClient.BeginCreateOrUpdate // method. -func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (VirtualRoutersClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, parameters, options) - if err != nil { - return VirtualRoutersClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualRoutersClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VirtualRoutersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualRouterName string, parameters VirtualRouter, options *VirtualRoutersClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualRoutersClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualRouterName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualRoutersClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualRoutersClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualRoutersClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualRoutersClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualRoutersClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates or updates the specified Virtual Router. @@ -124,22 +125,18 @@ func (client *VirtualRoutersClient) createOrUpdateCreateRequest(ctx context.Cont // virtualRouterName - The name of the Virtual Router. // options - VirtualRoutersClientBeginDeleteOptions contains the optional parameters for the VirtualRoutersClient.BeginDelete // method. -func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (VirtualRoutersClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, options) - if err != nil { - return VirtualRoutersClientDeletePollerResponse{}, err - } - result := VirtualRoutersClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualRoutersClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualRoutersClientDeletePollerResponse{}, err +func (client *VirtualRoutersClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualRouterName string, options *VirtualRoutersClientBeginDeleteOptions) (*armruntime.Poller[VirtualRoutersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualRouterName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualRoutersClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualRoutersClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualRoutersClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes the specified Virtual Router. @@ -236,7 +233,7 @@ func (client *VirtualRoutersClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (VirtualRoutersClientGetResponse, error) { - result := VirtualRoutersClientGetResponse{RawResponse: resp} + result := VirtualRoutersClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouter); err != nil { return VirtualRoutersClientGetResponse{}, err } @@ -246,16 +243,32 @@ func (client *VirtualRoutersClient) getHandleResponse(resp *http.Response) (Virt // List - Gets all the Virtual Routers in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualRoutersClientListOptions contains the optional parameters for the VirtualRoutersClient.List method. -func (client *VirtualRoutersClient) List(options *VirtualRoutersClientListOptions) *VirtualRoutersClientListPager { - return &VirtualRoutersClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VirtualRoutersClient) List(options *VirtualRoutersClientListOptions) *runtime.Pager[VirtualRoutersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualRoutersClientListResponse]{ + More: func(page VirtualRoutersClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualRoutersClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualRouterListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualRoutersClientListResponse) (VirtualRoutersClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualRoutersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualRoutersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualRoutersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -278,7 +291,7 @@ func (client *VirtualRoutersClient) listCreateRequest(ctx context.Context, optio // listHandleResponse handles the List response. func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (VirtualRoutersClientListResponse, error) { - result := VirtualRoutersClientListResponse{RawResponse: resp} + result := VirtualRoutersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { return VirtualRoutersClientListResponse{}, err } @@ -290,16 +303,32 @@ func (client *VirtualRoutersClient) listHandleResponse(resp *http.Response) (Vir // resourceGroupName - The name of the resource group. // options - VirtualRoutersClientListByResourceGroupOptions contains the optional parameters for the VirtualRoutersClient.ListByResourceGroup // method. -func (client *VirtualRoutersClient) ListByResourceGroup(resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) *VirtualRoutersClientListByResourceGroupPager { - return &VirtualRoutersClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualRoutersClient) ListByResourceGroup(resourceGroupName string, options *VirtualRoutersClientListByResourceGroupOptions) *runtime.Pager[VirtualRoutersClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualRoutersClientListByResourceGroupResponse]{ + More: func(page VirtualRoutersClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualRoutersClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.VirtualRouterListResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualRoutersClientListByResourceGroupResponse) (VirtualRoutersClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualRoutersClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualRoutersClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualRoutersClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -326,7 +355,7 @@ func (client *VirtualRoutersClient) listByResourceGroupCreateRequest(ctx context // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VirtualRoutersClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualRoutersClientListByResourceGroupResponse, error) { - result := VirtualRoutersClientListByResourceGroupResponse{RawResponse: resp} + result := VirtualRoutersClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualRouterListResult); err != nil { return VirtualRoutersClientListByResourceGroupResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go index 5ff548c95020..e92d75ba9861 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_virtualwans_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VirtualWansClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VirtualWansClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualWansClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VirtualWansClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. @@ -57,22 +62,18 @@ func NewVirtualWansClient(subscriptionID string, credential azcore.TokenCredenti // wanParameters - Parameters supplied to create or update VirtualWAN. // options - VirtualWansClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualWansClient.BeginCreateOrUpdate // method. -func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (VirtualWansClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualWANName, wanParameters, options) - if err != nil { - return VirtualWansClientCreateOrUpdatePollerResponse{}, err - } - result := VirtualWansClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VirtualWansClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wanParameters VirtualWAN, options *VirtualWansClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VirtualWansClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, virtualWANName, wanParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualWansClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualWansClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VirtualWansClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VirtualWansClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VirtualWansClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. @@ -123,22 +124,18 @@ func (client *VirtualWansClient) createOrUpdateCreateRequest(ctx context.Context // resourceGroupName - The resource group name of the VirtualWan. // virtualWANName - The name of the VirtualWAN being deleted. // options - VirtualWansClientBeginDeleteOptions contains the optional parameters for the VirtualWansClient.BeginDelete method. -func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (VirtualWansClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return VirtualWansClientDeletePollerResponse{}, err - } - result := VirtualWansClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VirtualWansClient.Delete", "location", resp, client.pl) - if err != nil { - return VirtualWansClientDeletePollerResponse{}, err +func (client *VirtualWansClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualWANName string, options *VirtualWansClientBeginDeleteOptions) (*armruntime.Poller[VirtualWansClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VirtualWansClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VirtualWansClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VirtualWansClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a VirtualWAN. @@ -232,7 +229,7 @@ func (client *VirtualWansClient) getCreateRequest(ctx context.Context, resourceG // getHandleResponse handles the Get response. func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (VirtualWansClientGetResponse, error) { - result := VirtualWansClientGetResponse{RawResponse: resp} + result := VirtualWansClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { return VirtualWansClientGetResponse{}, err } @@ -242,16 +239,32 @@ func (client *VirtualWansClient) getHandleResponse(resp *http.Response) (Virtual // List - Lists all the VirtualWANs in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VirtualWansClientListOptions contains the optional parameters for the VirtualWansClient.List method. -func (client *VirtualWansClient) List(options *VirtualWansClientListOptions) *VirtualWansClientListPager { - return &VirtualWansClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VirtualWansClient) List(options *VirtualWansClientListOptions) *runtime.Pager[VirtualWansClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualWansClientListResponse]{ + More: func(page VirtualWansClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualWansClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualWANsResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualWansClientListResponse) (VirtualWansClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualWansClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualWansClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualWansClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -274,7 +287,7 @@ func (client *VirtualWansClient) listCreateRequest(ctx context.Context, options // listHandleResponse handles the List response. func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (VirtualWansClientListResponse, error) { - result := VirtualWansClientListResponse{RawResponse: resp} + result := VirtualWansClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { return VirtualWansClientListResponse{}, err } @@ -286,16 +299,32 @@ func (client *VirtualWansClient) listHandleResponse(resp *http.Response) (Virtua // resourceGroupName - The resource group name of the VirtualWan. // options - VirtualWansClientListByResourceGroupOptions contains the optional parameters for the VirtualWansClient.ListByResourceGroup // method. -func (client *VirtualWansClient) ListByResourceGroup(resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) *VirtualWansClientListByResourceGroupPager { - return &VirtualWansClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VirtualWansClient) ListByResourceGroup(resourceGroupName string, options *VirtualWansClientListByResourceGroupOptions) *runtime.Pager[VirtualWansClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VirtualWansClientListByResourceGroupResponse]{ + More: func(page VirtualWansClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VirtualWansClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVirtualWANsResult.NextLink) + Fetcher: func(ctx context.Context, page *VirtualWansClientListByResourceGroupResponse) (VirtualWansClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VirtualWansClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VirtualWansClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VirtualWansClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -322,7 +351,7 @@ func (client *VirtualWansClient) listByResourceGroupCreateRequest(ctx context.Co // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VirtualWansClient) listByResourceGroupHandleResponse(resp *http.Response) (VirtualWansClientListByResourceGroupResponse, error) { - result := VirtualWansClientListByResourceGroupResponse{RawResponse: resp} + result := VirtualWansClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVirtualWANsResult); err != nil { return VirtualWansClientListByResourceGroupResponse{}, err } @@ -378,7 +407,7 @@ func (client *VirtualWansClient) updateTagsCreateRequest(ctx context.Context, re // updateTagsHandleResponse handles the UpdateTags response. func (client *VirtualWansClient) updateTagsHandleResponse(resp *http.Response) (VirtualWansClientUpdateTagsResponse, error) { - result := VirtualWansClientUpdateTagsResponse{RawResponse: resp} + result := VirtualWansClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VirtualWAN); err != nil { return VirtualWansClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go index aabee13fdc7f..6aecd2f40cb3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing @@ -59,22 +64,18 @@ func NewVPNConnectionsClient(subscriptionID string, credential azcore.TokenCrede // vpnConnectionParameters - Parameters supplied to create or Update a VPN Connection. // options - VPNConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNConnectionsClient.BeginCreateOrUpdate // method. -func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (VPNConnectionsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) - if err != nil { - return VPNConnectionsClientCreateOrUpdatePollerResponse{}, err - } - result := VPNConnectionsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNConnectionsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VPNConnectionsClientCreateOrUpdatePollerResponse{}, err +func (client *VPNConnectionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VPNConnection, options *VPNConnectionsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VPNConnectionsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNConnectionsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNConnectionsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VPNConnectionsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the existing connection. @@ -131,22 +132,18 @@ func (client *VPNConnectionsClient) createOrUpdateCreateRequest(ctx context.Cont // connectionName - The name of the connection. // options - VPNConnectionsClientBeginDeleteOptions contains the optional parameters for the VPNConnectionsClient.BeginDelete // method. -func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (VPNConnectionsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, connectionName, options) - if err != nil { - return VPNConnectionsClientDeletePollerResponse{}, err - } - result := VPNConnectionsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNConnectionsClient.Delete", "location", resp, client.pl) - if err != nil { - return VPNConnectionsClientDeletePollerResponse{}, err - } - result.Poller = &VPNConnectionsClientDeletePoller{ - pt: pt, +func (client *VPNConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, options *VPNConnectionsClientBeginDeleteOptions) (*armruntime.Poller[VPNConnectionsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, connectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNConnectionsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNConnectionsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes a vpn connection. @@ -249,7 +246,7 @@ func (client *VPNConnectionsClient) getCreateRequest(ctx context.Context, resour // getHandleResponse handles the Get response. func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNConnectionsClientGetResponse, error) { - result := VPNConnectionsClientGetResponse{RawResponse: resp} + result := VPNConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNConnection); err != nil { return VPNConnectionsClientGetResponse{}, err } @@ -262,16 +259,32 @@ func (client *VPNConnectionsClient) getHandleResponse(resp *http.Response) (VPNC // gatewayName - The name of the gateway. // options - VPNConnectionsClientListByVPNGatewayOptions contains the optional parameters for the VPNConnectionsClient.ListByVPNGateway // method. -func (client *VPNConnectionsClient) ListByVPNGateway(resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) *VPNConnectionsClientListByVPNGatewayPager { - return &VPNConnectionsClientListByVPNGatewayPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) +func (client *VPNConnectionsClient) ListByVPNGateway(resourceGroupName string, gatewayName string, options *VPNConnectionsClientListByVPNGatewayOptions) *runtime.Pager[VPNConnectionsClientListByVPNGatewayResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNConnectionsClientListByVPNGatewayResponse]{ + More: func(page VPNConnectionsClientListByVPNGatewayResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNConnectionsClientListByVPNGatewayResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNConnectionsResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNConnectionsClientListByVPNGatewayResponse) (VPNConnectionsClientListByVPNGatewayResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByVPNGatewayCreateRequest(ctx, resourceGroupName, gatewayName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNConnectionsClientListByVPNGatewayResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNConnectionsClientListByVPNGatewayResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNConnectionsClientListByVPNGatewayResponse{}, runtime.NewResponseError(resp) + } + return client.listByVPNGatewayHandleResponse(resp) }, - } + }) } // listByVPNGatewayCreateRequest creates the ListByVPNGateway request. @@ -302,7 +315,7 @@ func (client *VPNConnectionsClient) listByVPNGatewayCreateRequest(ctx context.Co // listByVPNGatewayHandleResponse handles the ListByVPNGateway response. func (client *VPNConnectionsClient) listByVPNGatewayHandleResponse(resp *http.Response) (VPNConnectionsClientListByVPNGatewayResponse, error) { - result := VPNConnectionsClientListByVPNGatewayResponse{RawResponse: resp} + result := VPNConnectionsClientListByVPNGatewayResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNConnectionsResult); err != nil { return VPNConnectionsClientListByVPNGatewayResponse{}, err } @@ -316,22 +329,18 @@ func (client *VPNConnectionsClient) listByVPNGatewayHandleResponse(resp *http.Re // vpnConnectionName - The name of the vpn connection. // options - VPNConnectionsClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStartPacketCapture // method. -func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (VPNConnectionsClientStartPacketCapturePollerResponse, error) { - resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return VPNConnectionsClientStartPacketCapturePollerResponse{}, err - } - result := VPNConnectionsClientStartPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNConnectionsClient.StartPacketCapture", "location", resp, client.pl) - if err != nil { - return VPNConnectionsClientStartPacketCapturePollerResponse{}, err - } - result.Poller = &VPNConnectionsClientStartPacketCapturePoller{ - pt: pt, +func (client *VPNConnectionsClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStartPacketCaptureOptions) (*armruntime.Poller[VPNConnectionsClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNConnectionsClientStartPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNConnectionsClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // StartPacketCapture - Starts packet capture on Vpn connection in the specified resource group. @@ -391,22 +400,18 @@ func (client *VPNConnectionsClient) startPacketCaptureCreateRequest(ctx context. // vpnConnectionName - The name of the vpn connection. // options - VPNConnectionsClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNConnectionsClient.BeginStopPacketCapture // method. -func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (VPNConnectionsClientStopPacketCapturePollerResponse, error) { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) - if err != nil { - return VPNConnectionsClientStopPacketCapturePollerResponse{}, err +func (client *VPNConnectionsClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, vpnConnectionName string, options *VPNConnectionsClientBeginStopPacketCaptureOptions) (*armruntime.Poller[VPNConnectionsClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, vpnConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNConnectionsClientStopPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNConnectionsClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - result := VPNConnectionsClientStopPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNConnectionsClient.StopPacketCapture", "location", resp, client.pl) - if err != nil { - return VPNConnectionsClientStopPacketCapturePollerResponse{}, err - } - result.Poller = &VPNConnectionsClientStopPacketCapturePoller{ - pt: pt, - } - return result, nil } // StopPacketCapture - Stops packet capture on Vpn connection in the specified resource group. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go index fc97872a41dd..b865392f9337 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpngateways_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNGatewaysClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNGatewaysClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNGatewaysClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNGatewaysClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @@ -57,22 +62,18 @@ func NewVPNGatewaysClient(subscriptionID string, credential azcore.TokenCredenti // vpnGatewayParameters - Parameters supplied to create or Update a virtual wan vpn gateway. // options - VPNGatewaysClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNGatewaysClient.BeginCreateOrUpdate // method. -func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (VPNGatewaysClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return VPNGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result := VPNGatewaysClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VPNGatewaysClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VPNGateway, options *VPNGatewaysClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VPNGatewaysClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNGatewaysClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VPNGatewaysClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VPNGatewaysClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @@ -123,22 +124,18 @@ func (client *VPNGatewaysClient) createOrUpdateCreateRequest(ctx context.Context // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // options - VPNGatewaysClientBeginDeleteOptions contains the optional parameters for the VPNGatewaysClient.BeginDelete method. -func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (VPNGatewaysClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return VPNGatewaysClientDeletePollerResponse{}, err - } - result := VPNGatewaysClientDeletePollerResponse{ - RawResponse: resp, +func (client *VPNGatewaysClient) BeginDelete(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginDeleteOptions) (*armruntime.Poller[VPNGatewaysClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNGatewaysClient.Delete", "location", resp, client.pl) - if err != nil { - return VPNGatewaysClientDeletePollerResponse{}, err - } - result.Poller = &VPNGatewaysClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a virtual wan vpn gateway. @@ -232,7 +229,7 @@ func (client *VPNGatewaysClient) getCreateRequest(ctx context.Context, resourceG // getHandleResponse handles the Get response. func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGatewaysClientGetResponse, error) { - result := VPNGatewaysClientGetResponse{RawResponse: resp} + result := VPNGatewaysClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNGateway); err != nil { return VPNGatewaysClientGetResponse{}, err } @@ -242,16 +239,32 @@ func (client *VPNGatewaysClient) getHandleResponse(resp *http.Response) (VPNGate // List - Lists all the VpnGateways in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VPNGatewaysClientListOptions contains the optional parameters for the VPNGatewaysClient.List method. -func (client *VPNGatewaysClient) List(options *VPNGatewaysClientListOptions) *VPNGatewaysClientListPager { - return &VPNGatewaysClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VPNGatewaysClient) List(options *VPNGatewaysClientListOptions) *runtime.Pager[VPNGatewaysClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNGatewaysClientListResponse]{ + More: func(page VPNGatewaysClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNGatewaysClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNGatewaysResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNGatewaysClientListResponse) (VPNGatewaysClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNGatewaysClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNGatewaysClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNGatewaysClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -274,7 +287,7 @@ func (client *VPNGatewaysClient) listCreateRequest(ctx context.Context, options // listHandleResponse handles the List response. func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGatewaysClientListResponse, error) { - result := VPNGatewaysClientListResponse{RawResponse: resp} + result := VPNGatewaysClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { return VPNGatewaysClientListResponse{}, err } @@ -286,16 +299,32 @@ func (client *VPNGatewaysClient) listHandleResponse(resp *http.Response) (VPNGat // resourceGroupName - The resource group name of the VpnGateway. // options - VPNGatewaysClientListByResourceGroupOptions contains the optional parameters for the VPNGatewaysClient.ListByResourceGroup // method. -func (client *VPNGatewaysClient) ListByResourceGroup(resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) *VPNGatewaysClientListByResourceGroupPager { - return &VPNGatewaysClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VPNGatewaysClient) ListByResourceGroup(resourceGroupName string, options *VPNGatewaysClientListByResourceGroupOptions) *runtime.Pager[VPNGatewaysClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNGatewaysClientListByResourceGroupResponse]{ + More: func(page VPNGatewaysClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNGatewaysClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNGatewaysResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNGatewaysClientListByResourceGroupResponse) (VPNGatewaysClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNGatewaysClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNGatewaysClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNGatewaysClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -322,7 +351,7 @@ func (client *VPNGatewaysClient) listByResourceGroupCreateRequest(ctx context.Co // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNGatewaysClientListByResourceGroupResponse, error) { - result := VPNGatewaysClientListByResourceGroupResponse{RawResponse: resp} + result := VPNGatewaysClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNGatewaysResult); err != nil { return VPNGatewaysClientListByResourceGroupResponse{}, err } @@ -334,22 +363,18 @@ func (client *VPNGatewaysClient) listByResourceGroupHandleResponse(resp *http.Re // resourceGroupName - The resource group name of the VpnGateway. // gatewayName - The name of the gateway. // options - VPNGatewaysClientBeginResetOptions contains the optional parameters for the VPNGatewaysClient.BeginReset method. -func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (VPNGatewaysClientResetPollerResponse, error) { - resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return VPNGatewaysClientResetPollerResponse{}, err - } - result := VPNGatewaysClientResetPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNGatewaysClient.Reset", "location", resp, client.pl) - if err != nil { - return VPNGatewaysClientResetPollerResponse{}, err +func (client *VPNGatewaysClient) BeginReset(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginResetOptions) (*armruntime.Poller[VPNGatewaysClientResetResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.reset(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientResetResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientResetResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VPNGatewaysClientResetPoller{ - pt: pt, - } - return result, nil } // Reset - Resets the primary of the vpn gateway in the specified resource group. @@ -401,22 +426,18 @@ func (client *VPNGatewaysClient) resetCreateRequest(ctx context.Context, resourc // gatewayName - The name of the gateway. // options - VPNGatewaysClientBeginStartPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStartPacketCapture // method. -func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (VPNGatewaysClientStartPacketCapturePollerResponse, error) { - resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return VPNGatewaysClientStartPacketCapturePollerResponse{}, err - } - result := VPNGatewaysClientStartPacketCapturePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNGatewaysClient.StartPacketCapture", "location", resp, client.pl) - if err != nil { - return VPNGatewaysClientStartPacketCapturePollerResponse{}, err - } - result.Poller = &VPNGatewaysClientStartPacketCapturePoller{ - pt: pt, +func (client *VPNGatewaysClient) BeginStartPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStartPacketCaptureOptions) (*armruntime.Poller[VPNGatewaysClientStartPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.startPacketCapture(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientStartPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientStartPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // StartPacketCapture - Starts packet capture on vpn gateway in the specified resource group. @@ -471,22 +492,18 @@ func (client *VPNGatewaysClient) startPacketCaptureCreateRequest(ctx context.Con // gatewayName - The name of the gateway. // options - VPNGatewaysClientBeginStopPacketCaptureOptions contains the optional parameters for the VPNGatewaysClient.BeginStopPacketCapture // method. -func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (VPNGatewaysClientStopPacketCapturePollerResponse, error) { - resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, options) - if err != nil { - return VPNGatewaysClientStopPacketCapturePollerResponse{}, err - } - result := VPNGatewaysClientStopPacketCapturePollerResponse{ - RawResponse: resp, +func (client *VPNGatewaysClient) BeginStopPacketCapture(ctx context.Context, resourceGroupName string, gatewayName string, options *VPNGatewaysClientBeginStopPacketCaptureOptions) (*armruntime.Poller[VPNGatewaysClientStopPacketCaptureResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.stopPacketCapture(ctx, resourceGroupName, gatewayName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientStopPacketCaptureResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientStopPacketCaptureResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNGatewaysClient.StopPacketCapture", "location", resp, client.pl) - if err != nil { - return VPNGatewaysClientStopPacketCapturePollerResponse{}, err - } - result.Poller = &VPNGatewaysClientStopPacketCapturePoller{ - pt: pt, - } - return result, nil } // StopPacketCapture - Stops packet capture on vpn gateway in the specified resource group. @@ -542,22 +559,18 @@ func (client *VPNGatewaysClient) stopPacketCaptureCreateRequest(ctx context.Cont // vpnGatewayParameters - Parameters supplied to update a virtual wan vpn gateway tags. // options - VPNGatewaysClientBeginUpdateTagsOptions contains the optional parameters for the VPNGatewaysClient.BeginUpdateTags // method. -func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (VPNGatewaysClientUpdateTagsPollerResponse, error) { - resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) - if err != nil { - return VPNGatewaysClientUpdateTagsPollerResponse{}, err +func (client *VPNGatewaysClient) BeginUpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject, options *VPNGatewaysClientBeginUpdateTagsOptions) (*armruntime.Poller[VPNGatewaysClientUpdateTagsResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.updateTags(ctx, resourceGroupName, gatewayName, vpnGatewayParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNGatewaysClientUpdateTagsResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNGatewaysClientUpdateTagsResponse](options.ResumeToken, client.pl, nil) } - result := VPNGatewaysClientUpdateTagsPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNGatewaysClient.UpdateTags", "azure-async-operation", resp, client.pl) - if err != nil { - return VPNGatewaysClientUpdateTagsPollerResponse{}, err - } - result.Poller = &VPNGatewaysClientUpdateTagsPoller{ - pt: pt, - } - return result, nil } // UpdateTags - Updates virtual wan vpn gateway tags. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go index 8a478d252c92..fea747f2c417 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnlinkconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNLinkConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNLinkConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNLinkConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNLinkConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginGetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. @@ -58,22 +63,18 @@ func NewVPNLinkConnectionsClient(subscriptionID string, credential azcore.TokenC // linkConnectionName - The name of the vpn link connection. // options - VPNLinkConnectionsClientBeginGetIkeSasOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginGetIkeSas // method. -func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (VPNLinkConnectionsClientGetIkeSasPollerResponse, error) { - resp, err := client.getIkeSas(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return VPNLinkConnectionsClientGetIkeSasPollerResponse{}, err - } - result := VPNLinkConnectionsClientGetIkeSasPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNLinkConnectionsClient.GetIkeSas", "location", resp, client.pl) - if err != nil { - return VPNLinkConnectionsClientGetIkeSasPollerResponse{}, err - } - result.Poller = &VPNLinkConnectionsClientGetIkeSasPoller{ - pt: pt, +func (client *VPNLinkConnectionsClient) BeginGetIkeSas(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginGetIkeSasOptions) (*armruntime.Poller[VPNLinkConnectionsClientGetIkeSasResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getIkeSas(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNLinkConnectionsClientGetIkeSasResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNLinkConnectionsClientGetIkeSasResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GetIkeSas - Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. @@ -134,16 +135,32 @@ func (client *VPNLinkConnectionsClient) getIkeSasCreateRequest(ctx context.Conte // connectionName - The name of the vpn connection. // options - VPNLinkConnectionsClientListByVPNConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.ListByVPNConnection // method. -func (client *VPNLinkConnectionsClient) ListByVPNConnection(resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) *VPNLinkConnectionsClientListByVPNConnectionPager { - return &VPNLinkConnectionsClientListByVPNConnectionPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) +func (client *VPNLinkConnectionsClient) ListByVPNConnection(resourceGroupName string, gatewayName string, connectionName string, options *VPNLinkConnectionsClientListByVPNConnectionOptions) *runtime.Pager[VPNLinkConnectionsClientListByVPNConnectionResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNLinkConnectionsClientListByVPNConnectionResponse]{ + More: func(page VPNLinkConnectionsClientListByVPNConnectionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNLinkConnectionsClientListByVPNConnectionResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNSiteLinkConnectionsResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNLinkConnectionsClientListByVPNConnectionResponse) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByVPNConnectionCreateRequest(ctx, resourceGroupName, gatewayName, connectionName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNLinkConnectionsClientListByVPNConnectionResponse{}, runtime.NewResponseError(resp) + } + return client.listByVPNConnectionHandleResponse(resp) }, - } + }) } // listByVPNConnectionCreateRequest creates the ListByVPNConnection request. @@ -178,7 +195,7 @@ func (client *VPNLinkConnectionsClient) listByVPNConnectionCreateRequest(ctx con // listByVPNConnectionHandleResponse handles the ListByVPNConnection response. func (client *VPNLinkConnectionsClient) listByVPNConnectionHandleResponse(resp *http.Response) (VPNLinkConnectionsClientListByVPNConnectionResponse, error) { - result := VPNLinkConnectionsClientListByVPNConnectionResponse{RawResponse: resp} + result := VPNLinkConnectionsClientListByVPNConnectionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinkConnectionsResult); err != nil { return VPNLinkConnectionsClientListByVPNConnectionResponse{}, err } @@ -193,22 +210,18 @@ func (client *VPNLinkConnectionsClient) listByVPNConnectionHandleResponse(resp * // linkConnectionName - The name of the vpn link connection. // options - VPNLinkConnectionsClientBeginResetConnectionOptions contains the optional parameters for the VPNLinkConnectionsClient.BeginResetConnection // method. -func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (VPNLinkConnectionsClientResetConnectionPollerResponse, error) { - resp, err := client.resetConnection(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) - if err != nil { - return VPNLinkConnectionsClientResetConnectionPollerResponse{}, err - } - result := VPNLinkConnectionsClientResetConnectionPollerResponse{ - RawResponse: resp, +func (client *VPNLinkConnectionsClient) BeginResetConnection(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, linkConnectionName string, options *VPNLinkConnectionsClientBeginResetConnectionOptions) (*armruntime.Poller[VPNLinkConnectionsClientResetConnectionResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.resetConnection(ctx, resourceGroupName, gatewayName, connectionName, linkConnectionName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNLinkConnectionsClientResetConnectionResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNLinkConnectionsClientResetConnectionResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNLinkConnectionsClient.ResetConnection", "location", resp, client.pl) - if err != nil { - return VPNLinkConnectionsClientResetConnectionPollerResponse{}, err - } - result.Poller = &VPNLinkConnectionsClientResetConnectionPoller{ - pt: pt, - } - return result, nil } // ResetConnection - Resets the VpnLink connection specified. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go index b8014fea52d1..b8823f2b679c 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurations_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNServerConfigurationsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNServerConfigurationsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNServerConfigurationsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. @@ -57,22 +62,18 @@ func NewVPNServerConfigurationsClient(subscriptionID string, credential azcore.T // vpnServerConfigurationParameters - Parameters supplied to create or update VpnServerConfiguration. // options - VPNServerConfigurationsClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginCreateOrUpdate // method. -func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (VPNServerConfigurationsClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) - if err != nil { - return VPNServerConfigurationsClientCreateOrUpdatePollerResponse{}, err - } - result := VPNServerConfigurationsClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VPNServerConfigurationsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, vpnServerConfigurationParameters VPNServerConfiguration, options *VPNServerConfigurationsClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VPNServerConfigurationsClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnServerConfigurationName, vpnServerConfigurationParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNServerConfigurationsClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNServerConfigurationsClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNServerConfigurationsClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VPNServerConfigurationsClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VPNServerConfigurationsClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing VpnServerConfiguration. @@ -124,22 +125,18 @@ func (client *VPNServerConfigurationsClient) createOrUpdateCreateRequest(ctx con // vpnServerConfigurationName - The name of the VpnServerConfiguration being deleted. // options - VPNServerConfigurationsClientBeginDeleteOptions contains the optional parameters for the VPNServerConfigurationsClient.BeginDelete // method. -func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (VPNServerConfigurationsClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, options) - if err != nil { - return VPNServerConfigurationsClientDeletePollerResponse{}, err - } - result := VPNServerConfigurationsClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNServerConfigurationsClient.Delete", "location", resp, client.pl) - if err != nil { - return VPNServerConfigurationsClientDeletePollerResponse{}, err +func (client *VPNServerConfigurationsClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnServerConfigurationName string, options *VPNServerConfigurationsClientBeginDeleteOptions) (*armruntime.Poller[VPNServerConfigurationsClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vpnServerConfigurationName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNServerConfigurationsClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNServerConfigurationsClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VPNServerConfigurationsClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a VpnServerConfiguration. @@ -234,7 +231,7 @@ func (client *VPNServerConfigurationsClient) getCreateRequest(ctx context.Contex // getHandleResponse handles the Get response. func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Response) (VPNServerConfigurationsClientGetResponse, error) { - result := VPNServerConfigurationsClientGetResponse{RawResponse: resp} + result := VPNServerConfigurationsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { return VPNServerConfigurationsClientGetResponse{}, err } @@ -245,16 +242,32 @@ func (client *VPNServerConfigurationsClient) getHandleResponse(resp *http.Respon // If the operation fails it returns an *azcore.ResponseError type. // options - VPNServerConfigurationsClientListOptions contains the optional parameters for the VPNServerConfigurationsClient.List // method. -func (client *VPNServerConfigurationsClient) List(options *VPNServerConfigurationsClientListOptions) *VPNServerConfigurationsClientListPager { - return &VPNServerConfigurationsClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VPNServerConfigurationsClient) List(options *VPNServerConfigurationsClientListOptions) *runtime.Pager[VPNServerConfigurationsClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNServerConfigurationsClientListResponse]{ + More: func(page VPNServerConfigurationsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNServerConfigurationsClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNServerConfigurationsResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListResponse) (VPNServerConfigurationsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNServerConfigurationsClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNServerConfigurationsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNServerConfigurationsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -277,7 +290,7 @@ func (client *VPNServerConfigurationsClient) listCreateRequest(ctx context.Conte // listHandleResponse handles the List response. func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListResponse, error) { - result := VPNServerConfigurationsClientListResponse{RawResponse: resp} + result := VPNServerConfigurationsClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { return VPNServerConfigurationsClientListResponse{}, err } @@ -289,16 +302,32 @@ func (client *VPNServerConfigurationsClient) listHandleResponse(resp *http.Respo // resourceGroupName - The resource group name of the VpnServerConfiguration. // options - VPNServerConfigurationsClientListByResourceGroupOptions contains the optional parameters for the VPNServerConfigurationsClient.ListByResourceGroup // method. -func (client *VPNServerConfigurationsClient) ListByResourceGroup(resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) *VPNServerConfigurationsClientListByResourceGroupPager { - return &VPNServerConfigurationsClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VPNServerConfigurationsClient) ListByResourceGroup(resourceGroupName string, options *VPNServerConfigurationsClientListByResourceGroupOptions) *runtime.Pager[VPNServerConfigurationsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNServerConfigurationsClientListByResourceGroupResponse]{ + More: func(page VPNServerConfigurationsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNServerConfigurationsClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNServerConfigurationsResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNServerConfigurationsClientListByResourceGroupResponse) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNServerConfigurationsClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNServerConfigurationsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNServerConfigurationsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -325,7 +354,7 @@ func (client *VPNServerConfigurationsClient) listByResourceGroupCreateRequest(ct // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VPNServerConfigurationsClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNServerConfigurationsClientListByResourceGroupResponse, error) { - result := VPNServerConfigurationsClientListByResourceGroupResponse{RawResponse: resp} + result := VPNServerConfigurationsClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNServerConfigurationsResult); err != nil { return VPNServerConfigurationsClientListByResourceGroupResponse{}, err } @@ -382,7 +411,7 @@ func (client *VPNServerConfigurationsClient) updateTagsCreateRequest(ctx context // updateTagsHandleResponse handles the UpdateTags response. func (client *VPNServerConfigurationsClient) updateTagsHandleResponse(resp *http.Response) (VPNServerConfigurationsClientUpdateTagsResponse, error) { - result := VPNServerConfigurationsClientUpdateTagsResponse{RawResponse: resp} + result := VPNServerConfigurationsClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNServerConfiguration); err != nil { return VPNServerConfigurationsClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go index 9cd8146e5f6d..ec00d476b9fb 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnserverconfigurationsassociatedwithvirtualwan_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNServerConfigurationsAssociatedWithVirtualWanClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNServerConfigurationsAssociatedWithVirtualWanClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNServerConfigurationsAssociatedWithVirtualWanClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNServerConfigurationsAssociatedWithVirtualWanClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginList - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. @@ -56,22 +61,18 @@ func NewVPNServerConfigurationsAssociatedWithVirtualWanClient(subscriptionID str // virtualWANName - The name of the VirtualWAN whose associated VpnServerConfigurations is needed. // options - VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions contains the optional parameters for the // VPNServerConfigurationsAssociatedWithVirtualWanClient.BeginList method. -func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse, error) { - resp, err := client.listOperation(ctx, resourceGroupName, virtualWANName, options) - if err != nil { - return VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse{}, err - } - result := VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNServerConfigurationsAssociatedWithVirtualWanClient.List", "location", resp, client.pl) - if err != nil { - return VPNServerConfigurationsAssociatedWithVirtualWanClientListPollerResponse{}, err - } - result.Poller = &VPNServerConfigurationsAssociatedWithVirtualWanClientListPoller{ - pt: pt, +func (client *VPNServerConfigurationsAssociatedWithVirtualWanClient) BeginList(ctx context.Context, resourceGroupName string, virtualWANName string, options *VPNServerConfigurationsAssociatedWithVirtualWanClientBeginListOptions) (*armruntime.Poller[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listOperation(ctx, resourceGroupName, virtualWANName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNServerConfigurationsAssociatedWithVirtualWanClientListResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // List - Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go index 78f85c9ba911..ae976cb06929 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinkconnections_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNSiteLinkConnectionsClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNSiteLinkConnectionsClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNSiteLinkConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinkConnectionsClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNSiteLinkConnectionsClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Retrieves the details of a vpn site link connection. @@ -109,7 +114,7 @@ func (client *VPNSiteLinkConnectionsClient) getCreateRequest(ctx context.Context // getHandleResponse handles the Get response. func (client *VPNSiteLinkConnectionsClient) getHandleResponse(resp *http.Response) (VPNSiteLinkConnectionsClientGetResponse, error) { - result := VPNSiteLinkConnectionsClientGetResponse{RawResponse: resp} + result := VPNSiteLinkConnectionsClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLinkConnection); err != nil { return VPNSiteLinkConnectionsClientGetResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go index 7101916b23ef..d088b3e5c0ee 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitelinks_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNSiteLinksClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNSiteLinksClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNSiteLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSiteLinksClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNSiteLinksClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Retrieves the details of a VPN site link. @@ -103,7 +108,7 @@ func (client *VPNSiteLinksClient) getCreateRequest(ctx context.Context, resource // getHandleResponse handles the Get response. func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSiteLinksClientGetResponse, error) { - result := VPNSiteLinksClientGetResponse{RawResponse: resp} + result := VPNSiteLinksClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNSiteLink); err != nil { return VPNSiteLinksClientGetResponse{}, err } @@ -116,16 +121,32 @@ func (client *VPNSiteLinksClient) getHandleResponse(resp *http.Response) (VPNSit // vpnSiteName - The name of the VpnSite. // options - VPNSiteLinksClientListByVPNSiteOptions contains the optional parameters for the VPNSiteLinksClient.ListByVPNSite // method. -func (client *VPNSiteLinksClient) ListByVPNSite(resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) *VPNSiteLinksClientListByVPNSitePager { - return &VPNSiteLinksClientListByVPNSitePager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) +func (client *VPNSiteLinksClient) ListByVPNSite(resourceGroupName string, vpnSiteName string, options *VPNSiteLinksClientListByVPNSiteOptions) *runtime.Pager[VPNSiteLinksClientListByVPNSiteResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNSiteLinksClientListByVPNSiteResponse]{ + More: func(page VPNSiteLinksClientListByVPNSiteResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNSiteLinksClientListByVPNSiteResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNSiteLinksResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNSiteLinksClientListByVPNSiteResponse) (VPNSiteLinksClientListByVPNSiteResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByVPNSiteCreateRequest(ctx, resourceGroupName, vpnSiteName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNSiteLinksClientListByVPNSiteResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNSiteLinksClientListByVPNSiteResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNSiteLinksClientListByVPNSiteResponse{}, runtime.NewResponseError(resp) + } + return client.listByVPNSiteHandleResponse(resp) }, - } + }) } // listByVPNSiteCreateRequest creates the ListByVPNSite request. @@ -156,7 +177,7 @@ func (client *VPNSiteLinksClient) listByVPNSiteCreateRequest(ctx context.Context // listByVPNSiteHandleResponse handles the ListByVPNSite response. func (client *VPNSiteLinksClient) listByVPNSiteHandleResponse(resp *http.Response) (VPNSiteLinksClientListByVPNSiteResponse, error) { - result := VPNSiteLinksClientListByVPNSiteResponse{RawResponse: resp} + result := VPNSiteLinksClientListByVPNSiteResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSiteLinksResult); err != nil { return VPNSiteLinksClientListByVPNSiteResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go index 68a7441f3338..f296ac75461d 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsites_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNSitesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNSitesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNSitesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. @@ -57,22 +62,18 @@ func NewVPNSitesClient(subscriptionID string, credential azcore.TokenCredential, // vpnSiteParameters - Parameters supplied to create or update VpnSite. // options - VPNSitesClientBeginCreateOrUpdateOptions contains the optional parameters for the VPNSitesClient.BeginCreateOrUpdate // method. -func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (VPNSitesClientCreateOrUpdatePollerResponse, error) { - resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) - if err != nil { - return VPNSitesClientCreateOrUpdatePollerResponse{}, err - } - result := VPNSitesClientCreateOrUpdatePollerResponse{ - RawResponse: resp, +func (client *VPNSitesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VPNSite, options *VPNSitesClientBeginCreateOrUpdateOptions) (*armruntime.Poller[VPNSitesClientCreateOrUpdateResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.createOrUpdate(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNSitesClientCreateOrUpdateResponse]{ + FinalStateVia: armruntime.FinalStateViaAzureAsyncOp, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNSitesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("VPNSitesClient.CreateOrUpdate", "azure-async-operation", resp, client.pl) - if err != nil { - return VPNSitesClientCreateOrUpdatePollerResponse{}, err - } - result.Poller = &VPNSitesClientCreateOrUpdatePoller{ - pt: pt, - } - return result, nil } // CreateOrUpdate - Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. @@ -123,22 +124,18 @@ func (client *VPNSitesClient) createOrUpdateCreateRequest(ctx context.Context, r // resourceGroupName - The resource group name of the VpnSite. // vpnSiteName - The name of the VpnSite being deleted. // options - VPNSitesClientBeginDeleteOptions contains the optional parameters for the VPNSitesClient.BeginDelete method. -func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (VPNSitesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, vpnSiteName, options) - if err != nil { - return VPNSitesClientDeletePollerResponse{}, err - } - result := VPNSitesClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNSitesClient.Delete", "location", resp, client.pl) - if err != nil { - return VPNSitesClientDeletePollerResponse{}, err +func (client *VPNSitesClient) BeginDelete(ctx context.Context, resourceGroupName string, vpnSiteName string, options *VPNSitesClientBeginDeleteOptions) (*armruntime.Poller[VPNSitesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, vpnSiteName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNSitesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNSitesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - result.Poller = &VPNSitesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes a VpnSite. @@ -232,7 +229,7 @@ func (client *VPNSitesClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesClientGetResponse, error) { - result := VPNSitesClientGetResponse{RawResponse: resp} + result := VPNSitesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { return VPNSitesClientGetResponse{}, err } @@ -242,16 +239,32 @@ func (client *VPNSitesClient) getHandleResponse(resp *http.Response) (VPNSitesCl // List - Lists all the VpnSites in a subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - VPNSitesClientListOptions contains the optional parameters for the VPNSitesClient.List method. -func (client *VPNSitesClient) List(options *VPNSitesClientListOptions) *VPNSitesClientListPager { - return &VPNSitesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, options) +func (client *VPNSitesClient) List(options *VPNSitesClientListOptions) *runtime.Pager[VPNSitesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNSitesClientListResponse]{ + More: func(page VPNSitesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNSitesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNSitesResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNSitesClientListResponse) (VPNSitesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNSitesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNSitesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNSitesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -274,7 +287,7 @@ func (client *VPNSitesClient) listCreateRequest(ctx context.Context, options *VP // listHandleResponse handles the List response. func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesClientListResponse, error) { - result := VPNSitesClientListResponse{RawResponse: resp} + result := VPNSitesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { return VPNSitesClientListResponse{}, err } @@ -286,16 +299,32 @@ func (client *VPNSitesClient) listHandleResponse(resp *http.Response) (VPNSitesC // resourceGroupName - The resource group name of the VpnSite. // options - VPNSitesClientListByResourceGroupOptions contains the optional parameters for the VPNSitesClient.ListByResourceGroup // method. -func (client *VPNSitesClient) ListByResourceGroup(resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) *VPNSitesClientListByResourceGroupPager { - return &VPNSitesClientListByResourceGroupPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) +func (client *VPNSitesClient) ListByResourceGroup(resourceGroupName string, options *VPNSitesClientListByResourceGroupOptions) *runtime.Pager[VPNSitesClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PageProcessor[VPNSitesClientListByResourceGroupResponse]{ + More: func(page VPNSitesClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp VPNSitesClientListByResourceGroupResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.ListVPNSitesResult.NextLink) + Fetcher: func(ctx context.Context, page *VPNSitesClientListByResourceGroupResponse) (VPNSitesClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return VPNSitesClientListByResourceGroupResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return VPNSitesClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return VPNSitesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) }, - } + }) } // listByResourceGroupCreateRequest creates the ListByResourceGroup request. @@ -322,7 +351,7 @@ func (client *VPNSitesClient) listByResourceGroupCreateRequest(ctx context.Conte // listByResourceGroupHandleResponse handles the ListByResourceGroup response. func (client *VPNSitesClient) listByResourceGroupHandleResponse(resp *http.Response) (VPNSitesClientListByResourceGroupResponse, error) { - result := VPNSitesClientListByResourceGroupResponse{RawResponse: resp} + result := VPNSitesClientListByResourceGroupResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.ListVPNSitesResult); err != nil { return VPNSitesClientListByResourceGroupResponse{}, err } @@ -378,7 +407,7 @@ func (client *VPNSitesClient) updateTagsCreateRequest(ctx context.Context, resou // updateTagsHandleResponse handles the UpdateTags response. func (client *VPNSitesClient) updateTagsHandleResponse(resp *http.Response) (VPNSitesClientUpdateTagsResponse, error) { - result := VPNSitesClientUpdateTagsResponse{RawResponse: resp} + result := VPNSitesClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.VPNSite); err != nil { return VPNSitesClientUpdateTagsResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go index bcd140281fa7..d7fbc6e121c1 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_vpnsitesconfiguration_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type VPNSitesConfigurationClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *VPNSitesConfigurationClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VPNSitesConfigurationClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &VPNSitesConfigurationClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginDownload - Gives the sas-url to download the configurations for vpn-sites in a resource group. @@ -57,22 +62,18 @@ func NewVPNSitesConfigurationClient(subscriptionID string, credential azcore.Tok // request - Parameters supplied to download vpn-sites configuration. // options - VPNSitesConfigurationClientBeginDownloadOptions contains the optional parameters for the VPNSitesConfigurationClient.BeginDownload // method. -func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (VPNSitesConfigurationClientDownloadPollerResponse, error) { - resp, err := client.download(ctx, resourceGroupName, virtualWANName, request, options) - if err != nil { - return VPNSitesConfigurationClientDownloadPollerResponse{}, err - } - result := VPNSitesConfigurationClientDownloadPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("VPNSitesConfigurationClient.Download", "location", resp, client.pl) - if err != nil { - return VPNSitesConfigurationClientDownloadPollerResponse{}, err - } - result.Poller = &VPNSitesConfigurationClientDownloadPoller{ - pt: pt, +func (client *VPNSitesConfigurationClient) BeginDownload(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVPNSitesConfigurationRequest, options *VPNSitesConfigurationClientBeginDownloadOptions) (*armruntime.Poller[VPNSitesConfigurationClientDownloadResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.download(ctx, resourceGroupName, virtualWANName, request, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[VPNSitesConfigurationClientDownloadResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[VPNSitesConfigurationClientDownloadResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Download - Gives the sas-url to download the configurations for vpn-sites in a resource group. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go index e2fc3b4be0c5..86ea4c484cdb 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_watchers_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type WatchersClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *WatchersClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WatchersClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &WatchersClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // BeginCheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given @@ -58,22 +63,18 @@ func NewWatchersClient(subscriptionID string, credential azcore.TokenCredential, // parameters - Parameters that determine how the connectivity check will be performed. // options - WatchersClientBeginCheckConnectivityOptions contains the optional parameters for the WatchersClient.BeginCheckConnectivity // method. -func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (WatchersClientCheckConnectivityPollerResponse, error) { - resp, err := client.checkConnectivity(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientCheckConnectivityPollerResponse{}, err - } - result := WatchersClientCheckConnectivityPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.CheckConnectivity", "location", resp, client.pl) - if err != nil { - return WatchersClientCheckConnectivityPollerResponse{}, err - } - result.Poller = &WatchersClientCheckConnectivityPoller{ - pt: pt, +func (client *WatchersClient) BeginCheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, options *WatchersClientBeginCheckConnectivityOptions) (*armruntime.Poller[WatchersClientCheckConnectivityResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.checkConnectivity(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientCheckConnectivityResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientCheckConnectivityResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // CheckConnectivity - Verifies the possibility of establishing a direct TCP connection from a virtual machine to a given @@ -169,7 +170,7 @@ func (client *WatchersClient) createOrUpdateCreateRequest(ctx context.Context, r // createOrUpdateHandleResponse handles the CreateOrUpdate response. func (client *WatchersClient) createOrUpdateHandleResponse(resp *http.Response) (WatchersClientCreateOrUpdateResponse, error) { - result := WatchersClientCreateOrUpdateResponse{RawResponse: resp} + result := WatchersClientCreateOrUpdateResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { return WatchersClientCreateOrUpdateResponse{}, err } @@ -181,22 +182,18 @@ func (client *WatchersClient) createOrUpdateHandleResponse(resp *http.Response) // resourceGroupName - The name of the resource group. // networkWatcherName - The name of the network watcher. // options - WatchersClientBeginDeleteOptions contains the optional parameters for the WatchersClient.BeginDelete method. -func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (WatchersClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, options) - if err != nil { - return WatchersClientDeletePollerResponse{}, err - } - result := WatchersClientDeletePollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.Delete", "location", resp, client.pl) - if err != nil { - return WatchersClientDeletePollerResponse{}, err - } - result.Poller = &WatchersClientDeletePoller{ - pt: pt, +func (client *WatchersClient) BeginDelete(ctx context.Context, resourceGroupName string, networkWatcherName string, options *WatchersClientBeginDeleteOptions) (*armruntime.Poller[WatchersClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, networkWatcherName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientDeleteResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // Delete - Deletes the specified network watcher resource. @@ -290,7 +287,7 @@ func (client *WatchersClient) getCreateRequest(ctx context.Context, resourceGrou // getHandleResponse handles the Get response. func (client *WatchersClient) getHandleResponse(resp *http.Response) (WatchersClientGetResponse, error) { - result := WatchersClientGetResponse{RawResponse: resp} + result := WatchersClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { return WatchersClientGetResponse{}, err } @@ -305,22 +302,18 @@ func (client *WatchersClient) getHandleResponse(resp *http.Response) (WatchersCl // parameters - Parameters that determine Azure reachability report configuration. // options - WatchersClientBeginGetAzureReachabilityReportOptions contains the optional parameters for the WatchersClient.BeginGetAzureReachabilityReport // method. -func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (WatchersClientGetAzureReachabilityReportPollerResponse, error) { - resp, err := client.getAzureReachabilityReport(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetAzureReachabilityReportPollerResponse{}, err - } - result := WatchersClientGetAzureReachabilityReportPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.GetAzureReachabilityReport", "location", resp, client.pl) - if err != nil { - return WatchersClientGetAzureReachabilityReportPollerResponse{}, err - } - result.Poller = &WatchersClientGetAzureReachabilityReportPoller{ - pt: pt, +func (client *WatchersClient) BeginGetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, options *WatchersClientBeginGetAzureReachabilityReportOptions) (*armruntime.Poller[WatchersClientGetAzureReachabilityReportResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getAzureReachabilityReport(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetAzureReachabilityReportResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetAzureReachabilityReportResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GetAzureReachabilityReport - NOTE: This feature is currently in preview and still being tested for stability. Gets the @@ -374,22 +367,18 @@ func (client *WatchersClient) getAzureReachabilityReportCreateRequest(ctx contex // parameters - Parameters that define a resource to query flow log and traffic analytics (optional) status. // options - WatchersClientBeginGetFlowLogStatusOptions contains the optional parameters for the WatchersClient.BeginGetFlowLogStatus // method. -func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (WatchersClientGetFlowLogStatusPollerResponse, error) { - resp, err := client.getFlowLogStatus(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetFlowLogStatusPollerResponse{}, err - } - result := WatchersClientGetFlowLogStatusPollerResponse{ - RawResponse: resp, +func (client *WatchersClient) BeginGetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, options *WatchersClientBeginGetFlowLogStatusOptions) (*armruntime.Poller[WatchersClientGetFlowLogStatusResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getFlowLogStatus(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetFlowLogStatusResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetFlowLogStatusResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WatchersClient.GetFlowLogStatus", "location", resp, client.pl) - if err != nil { - return WatchersClientGetFlowLogStatusPollerResponse{}, err - } - result.Poller = &WatchersClientGetFlowLogStatusPoller{ - pt: pt, - } - return result, nil } // GetFlowLogStatus - Queries status of flow log and traffic analytics (optional) on a specified resource. @@ -446,22 +435,18 @@ func (client *WatchersClient) getFlowLogStatusCreateRequest(ctx context.Context, // parameters - Parameters to get network configuration diagnostic. // options - WatchersClientBeginGetNetworkConfigurationDiagnosticOptions contains the optional parameters for the WatchersClient.BeginGetNetworkConfigurationDiagnostic // method. -func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (WatchersClientGetNetworkConfigurationDiagnosticPollerResponse, error) { - resp, err := client.getNetworkConfigurationDiagnostic(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetNetworkConfigurationDiagnosticPollerResponse{}, err - } - result := WatchersClientGetNetworkConfigurationDiagnosticPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.GetNetworkConfigurationDiagnostic", "location", resp, client.pl) - if err != nil { - return WatchersClientGetNetworkConfigurationDiagnosticPollerResponse{}, err - } - result.Poller = &WatchersClientGetNetworkConfigurationDiagnosticPoller{ - pt: pt, +func (client *WatchersClient) BeginGetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters, options *WatchersClientBeginGetNetworkConfigurationDiagnosticOptions) (*armruntime.Poller[WatchersClientGetNetworkConfigurationDiagnosticResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getNetworkConfigurationDiagnostic(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetNetworkConfigurationDiagnosticResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetNetworkConfigurationDiagnosticResponse](options.ResumeToken, client.pl, nil) } - return result, nil } // GetNetworkConfigurationDiagnostic - Gets Network Configuration Diagnostic data to help customers understand and debug network @@ -518,22 +503,18 @@ func (client *WatchersClient) getNetworkConfigurationDiagnosticCreateRequest(ctx // parameters - Parameters that define the source and destination endpoint. // options - WatchersClientBeginGetNextHopOptions contains the optional parameters for the WatchersClient.BeginGetNextHop // method. -func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (WatchersClientGetNextHopPollerResponse, error) { - resp, err := client.getNextHop(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetNextHopPollerResponse{}, err - } - result := WatchersClientGetNextHopPollerResponse{ - RawResponse: resp, +func (client *WatchersClient) BeginGetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters, options *WatchersClientBeginGetNextHopOptions) (*armruntime.Poller[WatchersClientGetNextHopResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getNextHop(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetNextHopResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetNextHopResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WatchersClient.GetNextHop", "location", resp, client.pl) - if err != nil { - return WatchersClientGetNextHopPollerResponse{}, err - } - result.Poller = &WatchersClientGetNextHopPoller{ - pt: pt, - } - return result, nil } // GetNextHop - Gets the next hop from the specified VM. @@ -628,7 +609,7 @@ func (client *WatchersClient) getTopologyCreateRequest(ctx context.Context, reso // getTopologyHandleResponse handles the GetTopology response. func (client *WatchersClient) getTopologyHandleResponse(resp *http.Response) (WatchersClientGetTopologyResponse, error) { - result := WatchersClientGetTopologyResponse{RawResponse: resp} + result := WatchersClientGetTopologyResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Topology); err != nil { return WatchersClientGetTopologyResponse{}, err } @@ -642,22 +623,18 @@ func (client *WatchersClient) getTopologyHandleResponse(resp *http.Response) (Wa // parameters - Parameters that define the resource to troubleshoot. // options - WatchersClientBeginGetTroubleshootingOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshooting // method. -func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (WatchersClientGetTroubleshootingPollerResponse, error) { - resp, err := client.getTroubleshooting(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetTroubleshootingPollerResponse{}, err - } - result := WatchersClientGetTroubleshootingPollerResponse{ - RawResponse: resp, +func (client *WatchersClient) BeginGetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingOptions) (*armruntime.Poller[WatchersClientGetTroubleshootingResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getTroubleshooting(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetTroubleshootingResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WatchersClient.GetTroubleshooting", "location", resp, client.pl) - if err != nil { - return WatchersClientGetTroubleshootingPollerResponse{}, err - } - result.Poller = &WatchersClientGetTroubleshootingPoller{ - pt: pt, - } - return result, nil } // GetTroubleshooting - Initiate troubleshooting on a specified resource. @@ -710,22 +687,18 @@ func (client *WatchersClient) getTroubleshootingCreateRequest(ctx context.Contex // parameters - Parameters that define the resource to query the troubleshooting result. // options - WatchersClientBeginGetTroubleshootingResultOptions contains the optional parameters for the WatchersClient.BeginGetTroubleshootingResult // method. -func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (WatchersClientGetTroubleshootingResultPollerResponse, error) { - resp, err := client.getTroubleshootingResult(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetTroubleshootingResultPollerResponse{}, err - } - result := WatchersClientGetTroubleshootingResultPollerResponse{ - RawResponse: resp, +func (client *WatchersClient) BeginGetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, options *WatchersClientBeginGetTroubleshootingResultOptions) (*armruntime.Poller[WatchersClientGetTroubleshootingResultResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getTroubleshootingResult(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetTroubleshootingResultResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetTroubleshootingResultResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WatchersClient.GetTroubleshootingResult", "location", resp, client.pl) - if err != nil { - return WatchersClientGetTroubleshootingResultPollerResponse{}, err - } - result.Poller = &WatchersClientGetTroubleshootingResultPoller{ - pt: pt, - } - return result, nil } // GetTroubleshootingResult - Get the last completed troubleshooting result on a specified resource. @@ -778,22 +751,18 @@ func (client *WatchersClient) getTroubleshootingResultCreateRequest(ctx context. // parameters - Parameters that define the VM to check security groups for. // options - WatchersClientBeginGetVMSecurityRulesOptions contains the optional parameters for the WatchersClient.BeginGetVMSecurityRules // method. -func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (WatchersClientGetVMSecurityRulesPollerResponse, error) { - resp, err := client.getVMSecurityRules(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientGetVMSecurityRulesPollerResponse{}, err - } - result := WatchersClientGetVMSecurityRulesPollerResponse{ - RawResponse: resp, +func (client *WatchersClient) BeginGetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, options *WatchersClientBeginGetVMSecurityRulesOptions) (*armruntime.Poller[WatchersClientGetVMSecurityRulesResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.getVMSecurityRules(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientGetVMSecurityRulesResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientGetVMSecurityRulesResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WatchersClient.GetVMSecurityRules", "location", resp, client.pl) - if err != nil { - return WatchersClientGetVMSecurityRulesPollerResponse{}, err - } - result.Poller = &WatchersClientGetVMSecurityRulesPoller{ - pt: pt, - } - return result, nil } // GetVMSecurityRules - Gets the configured and effective security group rules on the specified VM. @@ -843,19 +812,26 @@ func (client *WatchersClient) getVMSecurityRulesCreateRequest(ctx context.Contex // If the operation fails it returns an *azcore.ResponseError type. // resourceGroupName - The name of the resource group. // options - WatchersClientListOptions contains the optional parameters for the WatchersClient.List method. -func (client *WatchersClient) List(ctx context.Context, resourceGroupName string, options *WatchersClientListOptions) (WatchersClientListResponse, error) { - req, err := client.listCreateRequest(ctx, resourceGroupName, options) - if err != nil { - return WatchersClientListResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientListResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientListResponse{}, runtime.NewResponseError(resp) - } - return client.listHandleResponse(resp) +func (client *WatchersClient) List(resourceGroupName string, options *WatchersClientListOptions) *runtime.Pager[WatchersClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[WatchersClientListResponse]{ + More: func(page WatchersClientListResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *WatchersClientListResponse) (WatchersClientListResponse, error) { + req, err := client.listCreateRequest(ctx, resourceGroupName, options) + if err != nil { + return WatchersClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WatchersClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WatchersClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) } // listCreateRequest creates the List request. @@ -882,7 +858,7 @@ func (client *WatchersClient) listCreateRequest(ctx context.Context, resourceGro // listHandleResponse handles the List response. func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersClientListResponse, error) { - result := WatchersClientListResponse{RawResponse: resp} + result := WatchersClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { return WatchersClientListResponse{}, err } @@ -892,19 +868,26 @@ func (client *WatchersClient) listHandleResponse(resp *http.Response) (WatchersC // ListAll - Gets all network watchers by subscription. // If the operation fails it returns an *azcore.ResponseError type. // options - WatchersClientListAllOptions contains the optional parameters for the WatchersClient.ListAll method. -func (client *WatchersClient) ListAll(ctx context.Context, options *WatchersClientListAllOptions) (WatchersClientListAllResponse, error) { - req, err := client.listAllCreateRequest(ctx, options) - if err != nil { - return WatchersClientListAllResponse{}, err - } - resp, err := client.pl.Do(req) - if err != nil { - return WatchersClientListAllResponse{}, err - } - if !runtime.HasStatusCode(resp, http.StatusOK) { - return WatchersClientListAllResponse{}, runtime.NewResponseError(resp) - } - return client.listAllHandleResponse(resp) +func (client *WatchersClient) ListAll(options *WatchersClientListAllOptions) *runtime.Pager[WatchersClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[WatchersClientListAllResponse]{ + More: func(page WatchersClientListAllResponse) bool { + return false + }, + Fetcher: func(ctx context.Context, page *WatchersClientListAllResponse) (WatchersClientListAllResponse, error) { + req, err := client.listAllCreateRequest(ctx, options) + if err != nil { + return WatchersClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WatchersClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WatchersClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) + }, + }) } // listAllCreateRequest creates the ListAll request. @@ -927,7 +910,7 @@ func (client *WatchersClient) listAllCreateRequest(ctx context.Context, options // listAllHandleResponse handles the ListAll response. func (client *WatchersClient) listAllHandleResponse(resp *http.Response) (WatchersClientListAllResponse, error) { - result := WatchersClientListAllResponse{RawResponse: resp} + result := WatchersClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WatcherListResult); err != nil { return WatchersClientListAllResponse{}, err } @@ -942,22 +925,18 @@ func (client *WatchersClient) listAllHandleResponse(resp *http.Response) (Watche // parameters - Parameters that scope the list of available providers. // options - WatchersClientBeginListAvailableProvidersOptions contains the optional parameters for the WatchersClient.BeginListAvailableProviders // method. -func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (WatchersClientListAvailableProvidersPollerResponse, error) { - resp, err := client.listAvailableProviders(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientListAvailableProvidersPollerResponse{}, err +func (client *WatchersClient) BeginListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, options *WatchersClientBeginListAvailableProvidersOptions) (*armruntime.Poller[WatchersClientListAvailableProvidersResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.listAvailableProviders(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientListAvailableProvidersResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientListAvailableProvidersResponse](options.ResumeToken, client.pl, nil) } - result := WatchersClientListAvailableProvidersPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.ListAvailableProviders", "location", resp, client.pl) - if err != nil { - return WatchersClientListAvailableProvidersPollerResponse{}, err - } - result.Poller = &WatchersClientListAvailableProvidersPoller{ - pt: pt, - } - return result, nil } // ListAvailableProviders - NOTE: This feature is currently in preview and still being tested for stability. Lists all available @@ -1011,22 +990,18 @@ func (client *WatchersClient) listAvailableProvidersCreateRequest(ctx context.Co // parameters - Parameters that define the configuration of flow log. // options - WatchersClientBeginSetFlowLogConfigurationOptions contains the optional parameters for the WatchersClient.BeginSetFlowLogConfiguration // method. -func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (WatchersClientSetFlowLogConfigurationPollerResponse, error) { - resp, err := client.setFlowLogConfiguration(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientSetFlowLogConfigurationPollerResponse{}, err +func (client *WatchersClient) BeginSetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, options *WatchersClientBeginSetFlowLogConfigurationOptions) (*armruntime.Poller[WatchersClientSetFlowLogConfigurationResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.setFlowLogConfiguration(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientSetFlowLogConfigurationResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientSetFlowLogConfigurationResponse](options.ResumeToken, client.pl, nil) } - result := WatchersClientSetFlowLogConfigurationPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.SetFlowLogConfiguration", "location", resp, client.pl) - if err != nil { - return WatchersClientSetFlowLogConfigurationPollerResponse{}, err - } - result.Poller = &WatchersClientSetFlowLogConfigurationPoller{ - pt: pt, - } - return result, nil } // SetFlowLogConfiguration - Configures flow log and traffic analytics (optional) on a specified resource. @@ -1121,7 +1096,7 @@ func (client *WatchersClient) updateTagsCreateRequest(ctx context.Context, resou // updateTagsHandleResponse handles the UpdateTags response. func (client *WatchersClient) updateTagsHandleResponse(resp *http.Response) (WatchersClientUpdateTagsResponse, error) { - result := WatchersClientUpdateTagsResponse{RawResponse: resp} + result := WatchersClientUpdateTagsResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.Watcher); err != nil { return WatchersClientUpdateTagsResponse{}, err } @@ -1135,22 +1110,18 @@ func (client *WatchersClient) updateTagsHandleResponse(resp *http.Response) (Wat // parameters - Parameters that define the IP flow to be verified. // options - WatchersClientBeginVerifyIPFlowOptions contains the optional parameters for the WatchersClient.BeginVerifyIPFlow // method. -func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (WatchersClientVerifyIPFlowPollerResponse, error) { - resp, err := client.verifyIPFlow(ctx, resourceGroupName, networkWatcherName, parameters, options) - if err != nil { - return WatchersClientVerifyIPFlowPollerResponse{}, err +func (client *WatchersClient) BeginVerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, options *WatchersClientBeginVerifyIPFlowOptions) (*armruntime.Poller[WatchersClientVerifyIPFlowResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.verifyIPFlow(ctx, resourceGroupName, networkWatcherName, parameters, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WatchersClientVerifyIPFlowResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WatchersClientVerifyIPFlowResponse](options.ResumeToken, client.pl, nil) } - result := WatchersClientVerifyIPFlowPollerResponse{ - RawResponse: resp, - } - pt, err := armruntime.NewPoller("WatchersClient.VerifyIPFlow", "location", resp, client.pl) - if err != nil { - return WatchersClientVerifyIPFlowPollerResponse{}, err - } - result.Poller = &WatchersClientVerifyIPFlowPoller{ - pt: pt, - } - return result, nil } // VerifyIPFlow - Verify IP flow from the specified VM to a location given the currently configured NSG rules. diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go index c60091c55eed..4ea58fd1fa59 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_webapplicationfirewallpolicies_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type WebApplicationFirewallPoliciesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *WebApplicationFirewallPoliciesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewWebApplicationFirewallPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebApplicationFirewallPoliciesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &WebApplicationFirewallPoliciesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // CreateOrUpdate - Creates or update policy with specified rule set name within a resource group. @@ -100,7 +105,7 @@ func (client *WebApplicationFirewallPoliciesClient) createOrUpdateCreateRequest( // createOrUpdateHandleResponse handles the CreateOrUpdate response. func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientCreateOrUpdateResponse, error) { - result := WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{RawResponse: resp} + result := WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { return WebApplicationFirewallPoliciesClientCreateOrUpdateResponse{}, err } @@ -113,22 +118,18 @@ func (client *WebApplicationFirewallPoliciesClient) createOrUpdateHandleResponse // policyName - The name of the policy. // options - WebApplicationFirewallPoliciesClientBeginDeleteOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.BeginDelete // method. -func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (WebApplicationFirewallPoliciesClientDeletePollerResponse, error) { - resp, err := client.deleteOperation(ctx, resourceGroupName, policyName, options) - if err != nil { - return WebApplicationFirewallPoliciesClientDeletePollerResponse{}, err - } - result := WebApplicationFirewallPoliciesClientDeletePollerResponse{ - RawResponse: resp, +func (client *WebApplicationFirewallPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, policyName string, options *WebApplicationFirewallPoliciesClientBeginDeleteOptions) (*armruntime.Poller[WebApplicationFirewallPoliciesClientDeleteResponse], error) { + if options == nil || options.ResumeToken == "" { + resp, err := client.deleteOperation(ctx, resourceGroupName, policyName, options) + if err != nil { + return nil, err + } + return armruntime.NewPoller(resp, client.pl, &armruntime.NewPollerOptions[WebApplicationFirewallPoliciesClientDeleteResponse]{ + FinalStateVia: armruntime.FinalStateViaLocation, + }) + } else { + return armruntime.NewPollerFromResumeToken[WebApplicationFirewallPoliciesClientDeleteResponse](options.ResumeToken, client.pl, nil) } - pt, err := armruntime.NewPoller("WebApplicationFirewallPoliciesClient.Delete", "location", resp, client.pl) - if err != nil { - return WebApplicationFirewallPoliciesClientDeletePollerResponse{}, err - } - result.Poller = &WebApplicationFirewallPoliciesClientDeletePoller{ - pt: pt, - } - return result, nil } // Delete - Deletes Policy. @@ -223,7 +224,7 @@ func (client *WebApplicationFirewallPoliciesClient) getCreateRequest(ctx context // getHandleResponse handles the Get response. func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientGetResponse, error) { - result := WebApplicationFirewallPoliciesClientGetResponse{RawResponse: resp} + result := WebApplicationFirewallPoliciesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicy); err != nil { return WebApplicationFirewallPoliciesClientGetResponse{}, err } @@ -235,16 +236,32 @@ func (client *WebApplicationFirewallPoliciesClient) getHandleResponse(resp *http // resourceGroupName - The name of the resource group. // options - WebApplicationFirewallPoliciesClientListOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.List // method. -func (client *WebApplicationFirewallPoliciesClient) List(resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) *WebApplicationFirewallPoliciesClientListPager { - return &WebApplicationFirewallPoliciesClientListPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listCreateRequest(ctx, resourceGroupName, options) +func (client *WebApplicationFirewallPoliciesClient) List(resourceGroupName string, options *WebApplicationFirewallPoliciesClientListOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListResponse] { + return runtime.NewPager(runtime.PageProcessor[WebApplicationFirewallPoliciesClientListResponse]{ + More: func(page WebApplicationFirewallPoliciesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp WebApplicationFirewallPoliciesClientListResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.WebApplicationFirewallPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListResponse) (WebApplicationFirewallPoliciesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebApplicationFirewallPoliciesClientListResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebApplicationFirewallPoliciesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebApplicationFirewallPoliciesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) }, - } + }) } // listCreateRequest creates the List request. @@ -271,7 +288,7 @@ func (client *WebApplicationFirewallPoliciesClient) listCreateRequest(ctx contex // listHandleResponse handles the List response. func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListResponse, error) { - result := WebApplicationFirewallPoliciesClientListResponse{RawResponse: resp} + result := WebApplicationFirewallPoliciesClientListResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { return WebApplicationFirewallPoliciesClientListResponse{}, err } @@ -282,16 +299,32 @@ func (client *WebApplicationFirewallPoliciesClient) listHandleResponse(resp *htt // If the operation fails it returns an *azcore.ResponseError type. // options - WebApplicationFirewallPoliciesClientListAllOptions contains the optional parameters for the WebApplicationFirewallPoliciesClient.ListAll // method. -func (client *WebApplicationFirewallPoliciesClient) ListAll(options *WebApplicationFirewallPoliciesClientListAllOptions) *WebApplicationFirewallPoliciesClientListAllPager { - return &WebApplicationFirewallPoliciesClientListAllPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listAllCreateRequest(ctx, options) +func (client *WebApplicationFirewallPoliciesClient) ListAll(options *WebApplicationFirewallPoliciesClientListAllOptions) *runtime.Pager[WebApplicationFirewallPoliciesClientListAllResponse] { + return runtime.NewPager(runtime.PageProcessor[WebApplicationFirewallPoliciesClientListAllResponse]{ + More: func(page WebApplicationFirewallPoliciesClientListAllResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp WebApplicationFirewallPoliciesClientListAllResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.WebApplicationFirewallPolicyListResult.NextLink) + Fetcher: func(ctx context.Context, page *WebApplicationFirewallPoliciesClientListAllResponse) (WebApplicationFirewallPoliciesClientListAllResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listAllCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebApplicationFirewallPoliciesClientListAllResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebApplicationFirewallPoliciesClientListAllResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebApplicationFirewallPoliciesClientListAllResponse{}, runtime.NewResponseError(resp) + } + return client.listAllHandleResponse(resp) }, - } + }) } // listAllCreateRequest creates the ListAll request. @@ -314,7 +347,7 @@ func (client *WebApplicationFirewallPoliciesClient) listAllCreateRequest(ctx con // listAllHandleResponse handles the ListAll response. func (client *WebApplicationFirewallPoliciesClient) listAllHandleResponse(resp *http.Response) (WebApplicationFirewallPoliciesClientListAllResponse, error) { - result := WebApplicationFirewallPoliciesClientListAllResponse{RawResponse: resp} + result := WebApplicationFirewallPoliciesClientListAllResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.WebApplicationFirewallPolicyListResult); err != nil { return WebApplicationFirewallPoliciesClientListAllResponse{}, err } diff --git a/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go b/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go index 919b59a61468..2967bf373ae3 100644 --- a/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go +++ b/sdk/resourcemanager/network/armnetwork/zz_generated_webcategories_client.go @@ -1,5 +1,5 @@ -//go:build go1.16 -// +build go1.16 +//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. @@ -14,6 +14,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" @@ -34,20 +35,24 @@ type WebCategoriesClient struct { // ID forms part of the URI for every service call. // credential - used to authorize requests. Usually a credential from azidentity. // options - pass nil to accept the default values. -func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) *WebCategoriesClient { - cp := arm.ClientOptions{} - if options != nil { - cp = *options +func NewWebCategoriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WebCategoriesClient, error) { + if options == nil { + options = &arm.ClientOptions{} } - if len(cp.Endpoint) == 0 { - cp.Endpoint = arm.AzurePublicCloud + ep := cloud.AzurePublicCloud.Services[cloud.ResourceManager].Endpoint + if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok { + ep = c.Endpoint + } + pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options) + if err != nil { + return nil, err } client := &WebCategoriesClient{ subscriptionID: subscriptionID, - host: string(cp.Endpoint), - pl: armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, &cp), + host: ep, + pl: pl, } - return client + return client, nil } // Get - Gets the specified Azure Web Category. @@ -96,7 +101,7 @@ func (client *WebCategoriesClient) getCreateRequest(ctx context.Context, name st // getHandleResponse handles the Get response. func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCategoriesClientGetResponse, error) { - result := WebCategoriesClientGetResponse{RawResponse: resp} + result := WebCategoriesClientGetResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategory); err != nil { return WebCategoriesClientGetResponse{}, err } @@ -107,16 +112,32 @@ func (client *WebCategoriesClient) getHandleResponse(resp *http.Response) (WebCa // If the operation fails it returns an *azcore.ResponseError type. // options - WebCategoriesClientListBySubscriptionOptions contains the optional parameters for the WebCategoriesClient.ListBySubscription // method. -func (client *WebCategoriesClient) ListBySubscription(options *WebCategoriesClientListBySubscriptionOptions) *WebCategoriesClientListBySubscriptionPager { - return &WebCategoriesClientListBySubscriptionPager{ - client: client, - requester: func(ctx context.Context) (*policy.Request, error) { - return client.listBySubscriptionCreateRequest(ctx, options) +func (client *WebCategoriesClient) ListBySubscription(options *WebCategoriesClientListBySubscriptionOptions) *runtime.Pager[WebCategoriesClientListBySubscriptionResponse] { + return runtime.NewPager(runtime.PageProcessor[WebCategoriesClientListBySubscriptionResponse]{ + More: func(page WebCategoriesClientListBySubscriptionResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 }, - advancer: func(ctx context.Context, resp WebCategoriesClientListBySubscriptionResponse) (*policy.Request, error) { - return runtime.NewRequest(ctx, http.MethodGet, *resp.AzureWebCategoryListResult.NextLink) + Fetcher: func(ctx context.Context, page *WebCategoriesClientListBySubscriptionResponse) (WebCategoriesClientListBySubscriptionResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listBySubscriptionCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return WebCategoriesClientListBySubscriptionResponse{}, err + } + resp, err := client.pl.Do(req) + if err != nil { + return WebCategoriesClientListBySubscriptionResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return WebCategoriesClientListBySubscriptionResponse{}, runtime.NewResponseError(resp) + } + return client.listBySubscriptionHandleResponse(resp) }, - } + }) } // listBySubscriptionCreateRequest creates the ListBySubscription request. @@ -139,7 +160,7 @@ func (client *WebCategoriesClient) listBySubscriptionCreateRequest(ctx context.C // listBySubscriptionHandleResponse handles the ListBySubscription response. func (client *WebCategoriesClient) listBySubscriptionHandleResponse(resp *http.Response) (WebCategoriesClientListBySubscriptionResponse, error) { - result := WebCategoriesClientListBySubscriptionResponse{RawResponse: resp} + result := WebCategoriesClientListBySubscriptionResponse{} if err := runtime.UnmarshalAsJSON(resp, &result.AzureWebCategoryListResult); err != nil { return WebCategoriesClientListBySubscriptionResponse{}, err }